OLD | NEW |
| (Empty) |
1 // Generated by dart2js, the Dart to JavaScript compiler version: 1.11.0-edge.13
1474. | |
2 // The code supports the following hooks: | |
3 // dartPrint(message): | |
4 // if this function is defined it is called instead of the Dart [print] | |
5 // method. | |
6 // | |
7 // dartMainRunner(main, args): | |
8 // if this function is defined, the Dart [main] method will not be invoked | |
9 // directly. Instead, a closure that will invoke [main], and its arguments | |
10 // [args] is passed to [dartMainRunner]. | |
11 // | |
12 // dartDeferredLibraryLoader(uri, successCallback, errorCallback): | |
13 // if this function is defined, it will be called when a deferered library | |
14 // is loaded. It should load and eval the javascript of `uri`, and call | |
15 // successCallback. If it fails to do so, it should call errorCallback with | |
16 // an error. | |
17 (function($) { | |
18 var supportsDirectProtoAccess = function() { | |
19 var cls = function() { | |
20 }; | |
21 cls.prototype = {p: {}}; | |
22 var object = new cls(); | |
23 return object.__proto__ && object.__proto__.p === cls.prototype.p; | |
24 }(); | |
25 ; | |
26 function map(x) { | |
27 x = Object.create(null); | |
28 x.x = 0; | |
29 delete x.x; | |
30 return x; | |
31 } | |
32 var A = map(); | |
33 var B = map(); | |
34 var C = map(); | |
35 var D = map(); | |
36 var E = map(); | |
37 var F = map(); | |
38 var G = map(); | |
39 var H = map(); | |
40 var J = map(); | |
41 var K = map(); | |
42 var L = map(); | |
43 var M = map(); | |
44 var N = map(); | |
45 var O = map(); | |
46 var P = map(); | |
47 var Q = map(); | |
48 var R = map(); | |
49 var S = map(); | |
50 var T = map(); | |
51 var U = map(); | |
52 var V = map(); | |
53 var W = map(); | |
54 var X = map(); | |
55 var Y = map(); | |
56 var Z = map(); | |
57 function Isolate() {} | |
58 init(); | |
59 | |
60 $ = Isolate.$isolateProperties; | |
61 $.functionThatReturnsNull = function() { | |
62 }; | |
63 ; | |
64 function setupProgram(programData, typesOffset) { | |
65 "use strict"; | |
66 function generateAccessor(fieldDescriptor, accessors, cls) { | |
67 var fieldInformation = fieldDescriptor.split("-"); | |
68 var field = fieldInformation[0]; | |
69 var len = field.length; | |
70 var code = field.charCodeAt(len - 1); | |
71 var reflectable; | |
72 if (fieldInformation.length > 1) | |
73 reflectable = true; | |
74 else | |
75 reflectable = false; | |
76 code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? c
ode - 117 : code >= 37 && code <= 43 ? code - 27 : 0; | |
77 if (code) { | |
78 var getterCode = code & 3; | |
79 var setterCode = code >> 2; | |
80 var accessorName = field = field.substring(0, len - 1); | |
81 var divider = field.indexOf(":"); | |
82 if (divider > 0) { | |
83 accessorName = field.substring(0, divider); | |
84 field = field.substring(divider + 1); | |
85 } | |
86 if (getterCode) { | |
87 var args = getterCode & 2 ? "receiver" : ""; | |
88 var receiver = getterCode & 1 ? "this" : "receiver"; | |
89 var body = "return " + receiver + "." + field; | |
90 var property = cls + ".prototype.get$" + accessorName + "="; | |
91 var fn = "function(" + args + "){" + body + "}"; | |
92 if (reflectable) | |
93 accessors.push(property + "$reflectable(" + fn + ");\n"); | |
94 else | |
95 accessors.push(property + fn + ";\n"); | |
96 } | |
97 if (setterCode) { | |
98 var args = setterCode & 2 ? "receiver, value" : "value"; | |
99 var receiver = setterCode & 1 ? "this" : "receiver"; | |
100 var body = receiver + "." + field + " = value"; | |
101 var property = cls + ".prototype.set$" + accessorName + "="; | |
102 var fn = "function(" + args + "){" + body + "}"; | |
103 if (reflectable) | |
104 accessors.push(property + "$reflectable(" + fn + ");\n"); | |
105 else | |
106 accessors.push(property + fn + ";\n"); | |
107 } | |
108 } | |
109 return field; | |
110 } | |
111 function defineClass(name, fields) { | |
112 var accessors = []; | |
113 var str = "function " + name + "("; | |
114 var body = ""; | |
115 var fieldNames = ""; | |
116 for (var i = 0; i < fields.length; i++) { | |
117 if (i != 0) | |
118 str += ", "; | |
119 var field = generateAccessor(fields[i], accessors, name); | |
120 fieldNames += "'" + field + "',"; | |
121 var parameter = "p_" + field; | |
122 str += parameter; | |
123 body += "this." + field + " = " + parameter + ";\n"; | |
124 } | |
125 if (supportsDirectProtoAccess) | |
126 body += "this." + "$deferredAction" + "();"; | |
127 str += ") {\n" + body + "}\n"; | |
128 str += name + ".builtin$cls=\"" + name + "\";\n"; | |
129 str += "$desc=$collectedClasses." + name + "[1];\n"; | |
130 str += name + ".prototype = $desc;\n"; | |
131 if (typeof defineClass.name != "string") | |
132 str += name + ".name=\"" + name + "\";\n"; | |
133 str += name + "." + "$__fields__" + "=[" + fieldNames + "];\n"; | |
134 str += accessors.join(""); | |
135 return str; | |
136 } | |
137 init.createNewIsolate = function() { | |
138 return new Isolate(); | |
139 }; | |
140 init.classIdExtractor = function(o) { | |
141 return o.constructor.name; | |
142 }; | |
143 init.classFieldsExtractor = function(o) { | |
144 var fieldNames = o.constructor.$__fields__; | |
145 if (!fieldNames) | |
146 return []; | |
147 var result = []; | |
148 result.length = fieldNames.length; | |
149 for (var i = 0; i < fieldNames.length; i++) | |
150 result[i] = o[fieldNames[i]]; | |
151 return result; | |
152 }; | |
153 init.instanceFromClassId = function(name) { | |
154 return new init.allClasses[name](); | |
155 }; | |
156 init.initializeEmptyInstance = function(name, o, fields) { | |
157 init.allClasses[name].apply(o, fields); | |
158 return o; | |
159 }; | |
160 var inheritFrom = supportsDirectProtoAccess ? function(constructor, superConst
ructor) { | |
161 var prototype = constructor.prototype; | |
162 prototype.__proto__ = superConstructor.prototype; | |
163 prototype.constructor = constructor; | |
164 prototype["$is" + constructor.name] = constructor; | |
165 return convertToFastObject(prototype); | |
166 } : function() { | |
167 function tmp() { | |
168 } | |
169 return function(constructor, superConstructor) { | |
170 tmp.prototype = superConstructor.prototype; | |
171 var object = new tmp(); | |
172 convertToSlowObject(object); | |
173 var properties = constructor.prototype; | |
174 var members = Object.keys(properties); | |
175 for (var i = 0; i < members.length; i++) { | |
176 var member = members[i]; | |
177 object[member] = properties[member]; | |
178 } | |
179 object["$is" + constructor.name] = constructor; | |
180 object.constructor = constructor; | |
181 constructor.prototype = object; | |
182 return object; | |
183 }; | |
184 }(); | |
185 function finishClasses(processedClasses) { | |
186 var allClasses = init.allClasses; | |
187 processedClasses.combinedConstructorFunction += "return [\n" + processedClas
ses.constructorsList.join(",\n ") + "\n]"; | |
188 var constructors = new Function("$collectedClasses", processedClasses.combin
edConstructorFunction)(processedClasses.collected); | |
189 processedClasses.combinedConstructorFunction = null; | |
190 for (var i = 0; i < constructors.length; i++) { | |
191 var constructor = constructors[i]; | |
192 var cls = constructor.name; | |
193 var desc = processedClasses.collected[cls]; | |
194 var globalObject = desc[0]; | |
195 desc = desc[1]; | |
196 allClasses[cls] = constructor; | |
197 globalObject[cls] = constructor; | |
198 } | |
199 constructors = null; | |
200 var finishedClasses = init.finishedClasses; | |
201 function finishClass(cls) { | |
202 if (finishedClasses[cls]) | |
203 return; | |
204 finishedClasses[cls] = true; | |
205 var superclass = processedClasses.pending[cls]; | |
206 if (!superclass || typeof superclass != "string") { | |
207 var constructor = allClasses[cls]; | |
208 var prototype = constructor.prototype; | |
209 prototype.constructor = constructor; | |
210 prototype.$isObject = constructor; | |
211 prototype.$deferredAction = function() { | |
212 }; | |
213 return; | |
214 } | |
215 finishClass(superclass); | |
216 var superConstructor = allClasses[superclass]; | |
217 if (!superConstructor) | |
218 superConstructor = existingIsolateProperties[superclass]; | |
219 var constructor = allClasses[cls]; | |
220 var prototype = inheritFrom(constructor, superConstructor); | |
221 if (prototype.$isInterceptor) | |
222 prototype.$deferredAction(); | |
223 } | |
224 var properties = Object.keys(processedClasses.pending); | |
225 for (var i = 0; i < properties.length; i++) | |
226 finishClass(properties[i]); | |
227 } | |
228 function finishAddStubsHelper() { | |
229 var prototype = this; | |
230 while (!prototype.hasOwnProperty("$deferredAction")) | |
231 prototype = prototype.__proto__; | |
232 delete prototype.$deferredAction; | |
233 var properties = Object.keys(prototype); | |
234 for (var index = 0; index < properties.length; index++) { | |
235 var property = properties[index]; | |
236 var firstChar = property.charCodeAt(0); | |
237 var elem; | |
238 if (property !== "^" && property !== "$reflectable" && firstChar !== 43 &&
firstChar !== 42 && (elem = prototype[property]) != null && elem.constructor ==
= Array && property !== "<>") | |
239 addStubs(prototype, elem, property, false, []); | |
240 } | |
241 convertToFastObject(prototype); | |
242 prototype = prototype.__proto__; | |
243 prototype.$deferredAction(); | |
244 } | |
245 function processClassData(cls, descriptor, processedClasses) { | |
246 descriptor = convertToSlowObject(descriptor); | |
247 var previousProperty; | |
248 var properties = Object.keys(descriptor); | |
249 var hasDeferredWork = false; | |
250 var shouldDeferWork = supportsDirectProtoAccess && cls != "Object"; | |
251 for (var i = 0; i < properties.length; i++) { | |
252 var property = properties[i]; | |
253 var firstChar = property.charCodeAt(0); | |
254 if (property === "static") { | |
255 processStatics(init.statics[cls] = descriptor.static, processedClasses); | |
256 delete descriptor.static; | |
257 } else if (firstChar === 43) { | |
258 mangledNames[previousProperty] = property.substring(1); | |
259 var flag = descriptor[property]; | |
260 if (flag > 0) | |
261 descriptor[previousProperty].$reflectable = flag; | |
262 } else if (firstChar === 42) { | |
263 descriptor[previousProperty].$defaultValues = descriptor[property]; | |
264 var optionalMethods = descriptor.$methodsWithOptionalArguments; | |
265 if (!optionalMethods) | |
266 descriptor.$methodsWithOptionalArguments = optionalMethods = {}; | |
267 optionalMethods[property] = previousProperty; | |
268 } else { | |
269 var elem = descriptor[property]; | |
270 if (property !== "^" && elem != null && elem.constructor === Array && pr
operty !== "<>") | |
271 if (shouldDeferWork) | |
272 hasDeferredWork = true; | |
273 else | |
274 addStubs(descriptor, elem, property, false, []); | |
275 else | |
276 previousProperty = property; | |
277 } | |
278 } | |
279 if (hasDeferredWork) | |
280 descriptor.$deferredAction = finishAddStubsHelper; | |
281 var classData = descriptor["^"], split, supr, fields = classData; | |
282 var s = fields.split(";"); | |
283 fields = s[1] == "" ? [] : s[1].split(","); | |
284 supr = s[0]; | |
285 split = supr.split(":"); | |
286 if (split.length == 2) { | |
287 supr = split[0]; | |
288 var functionSignature = split[1]; | |
289 if (functionSignature) | |
290 descriptor.$signature = function(s) { | |
291 return function() { | |
292 return init.types[s]; | |
293 }; | |
294 }(functionSignature); | |
295 } | |
296 if (supr) | |
297 processedClasses.pending[cls] = supr; | |
298 processedClasses.combinedConstructorFunction += defineClass(cls, fields); | |
299 processedClasses.constructorsList.push(cls); | |
300 processedClasses.collected[cls] = [globalObject, descriptor]; | |
301 classes.push(cls); | |
302 } | |
303 function processStatics(descriptor, processedClasses) { | |
304 var properties = Object.keys(descriptor); | |
305 for (var i = 0; i < properties.length; i++) { | |
306 var property = properties[i]; | |
307 if (property === "^") | |
308 continue; | |
309 var element = descriptor[property]; | |
310 var firstChar = property.charCodeAt(0); | |
311 var previousProperty; | |
312 if (firstChar === 43) { | |
313 mangledGlobalNames[previousProperty] = property.substring(1); | |
314 var flag = descriptor[property]; | |
315 if (flag > 0) | |
316 descriptor[previousProperty].$reflectable = flag; | |
317 if (element && element.length) | |
318 init.typeInformation[previousProperty] = element; | |
319 } else if (firstChar === 42) { | |
320 globalObject[previousProperty].$defaultValues = element; | |
321 var optionalMethods = descriptor.$methodsWithOptionalArguments; | |
322 if (!optionalMethods) | |
323 descriptor.$methodsWithOptionalArguments = optionalMethods = {}; | |
324 optionalMethods[property] = previousProperty; | |
325 } else if (typeof element === "function") { | |
326 globalObject[previousProperty = property] = element; | |
327 functions.push(property); | |
328 init.globalFunctions[property] = element; | |
329 } else if (element.constructor === Array) | |
330 addStubs(globalObject, element, property, true, functions); | |
331 else { | |
332 previousProperty = property; | |
333 processClassData(property, element, processedClasses); | |
334 } | |
335 } | |
336 } | |
337 function addStubs(prototype, array, name, isStatic, functions) { | |
338 var index = 0, alias = array[index], f; | |
339 if (typeof alias == "string") | |
340 f = array[++index]; | |
341 else { | |
342 f = alias; | |
343 alias = name; | |
344 } | |
345 var funcs = [prototype[name] = prototype[alias] = f]; | |
346 f.$stubName = name; | |
347 functions.push(name); | |
348 for (index++; index < array.length; index++) { | |
349 f = array[index]; | |
350 if (typeof f != "function") | |
351 break; | |
352 if (!isStatic) | |
353 f.$stubName = array[++index]; | |
354 funcs.push(f); | |
355 if (f.$stubName) { | |
356 prototype[f.$stubName] = f; | |
357 functions.push(f.$stubName); | |
358 } | |
359 } | |
360 for (var i = 0; i < funcs.length; index++, i++) | |
361 funcs[i].$callName = array[index]; | |
362 var getterStubName = array[index]; | |
363 array = array.slice(++index); | |
364 var requiredParameterInfo = array[0]; | |
365 var requiredParameterCount = requiredParameterInfo >> 1; | |
366 var isAccessor = (requiredParameterInfo & 1) === 1; | |
367 var isSetter = requiredParameterInfo === 3; | |
368 var isGetter = requiredParameterInfo === 1; | |
369 var optionalParameterInfo = array[1]; | |
370 var optionalParameterCount = optionalParameterInfo >> 1; | |
371 var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1; | |
372 var isIntercepted = requiredParameterCount + optionalParameterCount != funcs
[0].length; | |
373 var functionTypeIndex = array[2]; | |
374 if (typeof functionTypeIndex == "number") | |
375 array[2] = functionTypeIndex + typesOffset; | |
376 var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount
+ 3; | |
377 if (getterStubName) { | |
378 f = tearOff(funcs, array, isStatic, name, isIntercepted); | |
379 prototype[name].$getter = f; | |
380 f.$getterStub = true; | |
381 if (isStatic) { | |
382 init.globalFunctions[name] = f; | |
383 functions.push(getterStubName); | |
384 } | |
385 prototype[getterStubName] = f; | |
386 funcs.push(f); | |
387 f.$stubName = getterStubName; | |
388 f.$callName = null; | |
389 } | |
390 } | |
391 function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) { | |
392 return isIntercepted ? new Function("funcs", "reflectionInfo", "name", "H",
"c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c ==
= null) c = H.closureFromTearOff(" + "this, funcs, reflectionInfo, false, [x], n
ame);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, reflectionInfo,
name, H, null) : new Function("funcs", "reflectionInfo", "name", "H", "c", "retu
rn function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c =
H.closureFromTearOff(" + "this, funcs, reflectionInfo, false, [], name);" + "re
turn new c(this, funcs[0], null, name);" + "}")(funcs, reflectionInfo, name, H,
null); | |
393 } | |
394 function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) { | |
395 var cache; | |
396 return isStatic ? function() { | |
397 if (cache === void 0) | |
398 cache = H.closureFromTearOff(this, funcs, reflectionInfo, true, [], name
).prototype; | |
399 return cache; | |
400 } : tearOffGetter(funcs, reflectionInfo, name, isIntercepted); | |
401 } | |
402 var functionCounter = 0; | |
403 if (!init.libraries) | |
404 init.libraries = []; | |
405 if (!init.mangledNames) | |
406 init.mangledNames = map(); | |
407 if (!init.mangledGlobalNames) | |
408 init.mangledGlobalNames = map(); | |
409 if (!init.statics) | |
410 init.statics = map(); | |
411 if (!init.typeInformation) | |
412 init.typeInformation = map(); | |
413 if (!init.globalFunctions) | |
414 init.globalFunctions = map(); | |
415 var libraries = init.libraries; | |
416 var mangledNames = init.mangledNames; | |
417 var mangledGlobalNames = init.mangledGlobalNames; | |
418 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
419 var length = programData.length; | |
420 var processedClasses = map(); | |
421 processedClasses.collected = map(); | |
422 processedClasses.pending = map(); | |
423 processedClasses.constructorsList = []; | |
424 processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$
reflectable=1;return fn};\n" + "var $desc;\n"; | |
425 for (var i = 0; i < length; i++) { | |
426 var data = programData[i]; | |
427 var name = data[0]; | |
428 var uri = data[1]; | |
429 var metadata = data[2]; | |
430 var globalObject = data[3]; | |
431 var descriptor = data[4]; | |
432 var isRoot = !!data[5]; | |
433 var fields = descriptor && descriptor["^"]; | |
434 if (fields instanceof Array) | |
435 fields = fields[0]; | |
436 var classes = []; | |
437 var functions = []; | |
438 processStatics(descriptor, processedClasses); | |
439 libraries.push([name, uri, classes, functions, metadata, fields, isRoot, glo
balObject]); | |
440 } | |
441 finishClasses(processedClasses); | |
442 } | |
443 var dart =[["_foreign_helper", "dart:_foreign_helper",, H, { | |
444 "^": "", | |
445 JS_CONST: { | |
446 "^": "Object;code" | |
447 } | |
448 }], ["_interceptors", "dart:_interceptors",, J, { | |
449 "^": "", | |
450 getInterceptor: function(object) { | |
451 return void 0; | |
452 }, | |
453 Interceptor: { | |
454 "^": "Object;", | |
455 $eq: function(receiver, other) { | |
456 return receiver === other; | |
457 }, | |
458 get$hashCode: function(receiver) { | |
459 return H.Primitives_objectHashCode(receiver); | |
460 }, | |
461 toString$0: function(receiver) { | |
462 return H.Primitives_objectToString(receiver); | |
463 } | |
464 }, | |
465 JSBool: { | |
466 "^": "Interceptor;", | |
467 toString$0: function(receiver) { | |
468 return String(receiver); | |
469 }, | |
470 get$hashCode: function(receiver) { | |
471 return receiver ? 519018 : 218159; | |
472 }, | |
473 $isbool: 1 | |
474 }, | |
475 JSNull: { | |
476 "^": "Interceptor;", | |
477 $eq: function(receiver, other) { | |
478 return null == other; | |
479 }, | |
480 toString$0: function(receiver) { | |
481 return "null"; | |
482 }, | |
483 get$hashCode: function(receiver) { | |
484 return 0; | |
485 } | |
486 }, | |
487 JavaScriptObject: { | |
488 "^": "Interceptor;", | |
489 get$hashCode: function(_) { | |
490 return 0; | |
491 }, | |
492 $isJSObject: 1 | |
493 }, | |
494 PlainJavaScriptObject: { | |
495 "^": "JavaScriptObject;" | |
496 }, | |
497 UnknownJavaScriptObject: { | |
498 "^": "JavaScriptObject;", | |
499 toString$0: function(receiver) { | |
500 return String(receiver); | |
501 } | |
502 }, | |
503 JSArray: { | |
504 "^": "Interceptor;", | |
505 checkMutable$1: function(receiver, reason) { | |
506 if (!!receiver.immutable$list) | |
507 throw H.wrapException(new P.UnsupportedError(reason)); | |
508 }, | |
509 checkGrowable$1: function(receiver, reason) { | |
510 if (!!receiver.fixed$length) | |
511 throw H.wrapException(new P.UnsupportedError(reason)); | |
512 }, | |
513 forEach$1: function(receiver, f) { | |
514 var end, i; | |
515 end = receiver.length; | |
516 for (i = 0; i < end; ++i) { | |
517 f.call$1(receiver[i]); | |
518 if (receiver.length !== end) | |
519 throw H.wrapException(new P.ConcurrentModificationError(receiver)); | |
520 } | |
521 }, | |
522 map$1: function(receiver, f) { | |
523 return H.setRuntimeTypeInfo(new H.MappedListIterable(receiver, f), [null,
null]); | |
524 }, | |
525 elementAt$1: function(receiver, index) { | |
526 if (index < 0 || index >= receiver.length) | |
527 return H.ioore(receiver, index); | |
528 return receiver[index]; | |
529 }, | |
530 get$first: function(receiver) { | |
531 if (receiver.length > 0) | |
532 return receiver[0]; | |
533 throw H.wrapException(H.IterableElementError_noElement()); | |
534 }, | |
535 setRange$4: function(receiver, start, end, iterable, skipCount) { | |
536 var $length, i, t1; | |
537 this.checkMutable$1(receiver, "set range"); | |
538 P.RangeError_checkValidRange(start, end, receiver.length, null, null, null
); | |
539 $length = end - start; | |
540 if ($length === 0) | |
541 return; | |
542 if (skipCount + $length > iterable.length) | |
543 throw H.wrapException(new P.StateError("Too few elements")); | |
544 if (skipCount < start) | |
545 for (i = $length - 1; i >= 0; --i) { | |
546 t1 = skipCount + i; | |
547 if (t1 >= iterable.length) | |
548 return H.ioore(iterable, t1); | |
549 receiver[start + i] = iterable[t1]; | |
550 } | |
551 else | |
552 for (i = 0; i < $length; ++i) { | |
553 t1 = skipCount + i; | |
554 if (t1 >= iterable.length) | |
555 return H.ioore(iterable, t1); | |
556 receiver[start + i] = iterable[t1]; | |
557 } | |
558 }, | |
559 toString$0: function(receiver) { | |
560 return P.IterableBase_iterableToFullString(receiver, "[", "]"); | |
561 }, | |
562 get$iterator: function(receiver) { | |
563 return new J.ArrayIterator(receiver, receiver.length, 0, null); | |
564 }, | |
565 get$hashCode: function(receiver) { | |
566 return H.Primitives_objectHashCode(receiver); | |
567 }, | |
568 get$length: function(receiver) { | |
569 return receiver.length; | |
570 }, | |
571 set$length: function(receiver, newLength) { | |
572 this.checkGrowable$1(receiver, "set length"); | |
573 if (newLength < 0) | |
574 throw H.wrapException(P.RangeError$value(newLength, null, null)); | |
575 receiver.length = newLength; | |
576 }, | |
577 $index: function(receiver, index) { | |
578 if (typeof index !== "number" || Math.floor(index) !== index) | |
579 throw H.wrapException(P.ArgumentError$(index)); | |
580 if (index >= receiver.length || index < 0) | |
581 throw H.wrapException(P.RangeError$value(index, null, null)); | |
582 return receiver[index]; | |
583 }, | |
584 $indexSet: function(receiver, index, value) { | |
585 this.checkMutable$1(receiver, "indexed set"); | |
586 if (index >= receiver.length || false) | |
587 throw H.wrapException(P.RangeError$value(index, null, null)); | |
588 receiver[index] = value; | |
589 }, | |
590 $isJSIndexable: 1, | |
591 $isList: 1, | |
592 $isEfficientLengthIterable: 1 | |
593 }, | |
594 JSUnmodifiableArray: { | |
595 "^": "JSArray;" | |
596 }, | |
597 ArrayIterator: { | |
598 "^": "Object;_iterable,_length,_index,__interceptors$_current", | |
599 get$current: function() { | |
600 return this.__interceptors$_current; | |
601 }, | |
602 moveNext$0: function() { | |
603 var t1, $length, t2; | |
604 t1 = this._iterable; | |
605 $length = t1.length; | |
606 if (this._length !== $length) | |
607 throw H.wrapException(new P.ConcurrentModificationError(t1)); | |
608 t2 = this._index; | |
609 if (t2 >= $length) { | |
610 this.__interceptors$_current = null; | |
611 return false; | |
612 } | |
613 this.__interceptors$_current = t1[t2]; | |
614 this._index = t2 + 1; | |
615 return true; | |
616 } | |
617 }, | |
618 JSNumber: { | |
619 "^": "Interceptor;", | |
620 remainder$1: function(receiver, b) { | |
621 return receiver % b; | |
622 }, | |
623 toInt$0: function(receiver) { | |
624 var t1; | |
625 if (receiver >= -2147483648 && receiver <= 2147483647) | |
626 return receiver | 0; | |
627 if (isFinite(receiver)) { | |
628 t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); | |
629 return t1 + 0; | |
630 } | |
631 throw H.wrapException(new P.UnsupportedError("" + receiver)); | |
632 }, | |
633 toString$0: function(receiver) { | |
634 if (receiver === 0 && 1 / receiver < 0) | |
635 return "-0.0"; | |
636 else | |
637 return "" + receiver; | |
638 }, | |
639 get$hashCode: function(receiver) { | |
640 return receiver & 0x1FFFFFFF; | |
641 }, | |
642 $add: function(receiver, other) { | |
643 if (typeof other !== "number") | |
644 throw H.wrapException(P.ArgumentError$(other)); | |
645 return receiver + other; | |
646 }, | |
647 _tdivFast$1: function(receiver, other) { | |
648 return (receiver | 0) === receiver ? receiver / other | 0 : this.toInt$0(r
eceiver / other); | |
649 }, | |
650 _shrOtherPositive$1: function(receiver, other) { | |
651 var t1; | |
652 if (receiver > 0) | |
653 t1 = other > 31 ? 0 : receiver >>> other; | |
654 else { | |
655 t1 = other > 31 ? 31 : other; | |
656 t1 = receiver >> t1 >>> 0; | |
657 } | |
658 return t1; | |
659 }, | |
660 $lt: function(receiver, other) { | |
661 if (typeof other !== "number") | |
662 throw H.wrapException(P.ArgumentError$(other)); | |
663 return receiver < other; | |
664 }, | |
665 $isnum: 1 | |
666 }, | |
667 JSInt: { | |
668 "^": "JSNumber;", | |
669 $isnum: 1, | |
670 $is$int: 1 | |
671 }, | |
672 JSDouble: { | |
673 "^": "JSNumber;", | |
674 $isnum: 1 | |
675 }, | |
676 JSString: { | |
677 "^": "Interceptor;", | |
678 codeUnitAt$1: function(receiver, index) { | |
679 if (index >= receiver.length) | |
680 throw H.wrapException(P.RangeError$value(index, null, null)); | |
681 return receiver.charCodeAt(index); | |
682 }, | |
683 $add: function(receiver, other) { | |
684 if (typeof other !== "string") | |
685 throw H.wrapException(P.ArgumentError$(other)); | |
686 return receiver + other; | |
687 }, | |
688 substring$2: function(receiver, startIndex, endIndex) { | |
689 H.checkInt(startIndex); | |
690 if (endIndex == null) | |
691 endIndex = receiver.length; | |
692 H.checkInt(endIndex); | |
693 if (startIndex < 0) | |
694 throw H.wrapException(P.RangeError$value(startIndex, null, null)); | |
695 if (typeof endIndex !== "number") | |
696 return H.iae(endIndex); | |
697 if (startIndex > endIndex) | |
698 throw H.wrapException(P.RangeError$value(startIndex, null, null)); | |
699 if (endIndex > receiver.length) | |
700 throw H.wrapException(P.RangeError$value(endIndex, null, null)); | |
701 return receiver.substring(startIndex, endIndex); | |
702 }, | |
703 substring$1: function($receiver, startIndex) { | |
704 return this.substring$2($receiver, startIndex, null); | |
705 }, | |
706 get$isEmpty: function(receiver) { | |
707 return receiver.length === 0; | |
708 }, | |
709 toString$0: function(receiver) { | |
710 return receiver; | |
711 }, | |
712 get$hashCode: function(receiver) { | |
713 var t1, hash, i; | |
714 for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { | |
715 hash = 536870911 & hash + receiver.charCodeAt(i); | |
716 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); | |
717 hash ^= hash >> 6; | |
718 } | |
719 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); | |
720 hash ^= hash >> 11; | |
721 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); | |
722 }, | |
723 get$length: function(receiver) { | |
724 return receiver.length; | |
725 }, | |
726 $index: function(receiver, index) { | |
727 if (typeof index !== "number" || Math.floor(index) !== index) | |
728 throw H.wrapException(P.ArgumentError$(index)); | |
729 if (index >= receiver.length || index < 0) | |
730 throw H.wrapException(P.RangeError$value(index, null, null)); | |
731 return receiver[index]; | |
732 }, | |
733 $isJSIndexable: 1, | |
734 $isString: 1 | |
735 } | |
736 }], ["_isolate_helper", "dart:_isolate_helper",, H, { | |
737 "^": "", | |
738 _callInIsolate: function(isolate, $function) { | |
739 var result = isolate.eval$1($function); | |
740 if (!init.globalState.currentContext._isExecutingEvent) | |
741 init.globalState.topEventLoop.run$0(); | |
742 return result; | |
743 }, | |
744 leaveJsAsync: function() { | |
745 --init.globalState.topEventLoop._activeJsAsyncCount; | |
746 }, | |
747 startRootIsolate: function(entry, args) { | |
748 var t1, t2, t3, t4, t5, rootContext; | |
749 t1 = {}; | |
750 t1._captured_args_0 = args; | |
751 args = args; | |
752 t1._captured_args_0 = args; | |
753 if (args == null) { | |
754 args = []; | |
755 t1._captured_args_0 = args; | |
756 t2 = args; | |
757 } else | |
758 t2 = args; | |
759 if (!J.getInterceptor(t2).$isList) | |
760 throw H.wrapException(P.ArgumentError$("Arguments to main must be a List:
" + H.S(t2))); | |
761 t2 = new H._Manager(0, 0, 1, null, null, null, null, null, null, null, null,
null, entry); | |
762 t2._nativeDetectEnvironment$0(); | |
763 t2.topEventLoop = new H._EventLoop(P.ListQueue$(null, H._IsolateEvent), 0); | |
764 t2.isolates = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H._Iso
lateContext); | |
765 t2.managers = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, null); | |
766 if (t2.isWorker === true) { | |
767 t2.mainManager = new H._MainManagerStub(); | |
768 t2._nativeInitWorkerMessageHandler$0(); | |
769 } | |
770 init.globalState = t2; | |
771 if (init.globalState.isWorker === true) | |
772 return; | |
773 t2 = init.globalState.nextIsolateId++; | |
774 t3 = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H.RawReceivePor
tImpl); | |
775 t4 = P.LinkedHashSet_LinkedHashSet(null, null, null, P.$int); | |
776 t5 = new H.RawReceivePortImpl(0, null, false); | |
777 rootContext = new H._IsolateContext(t2, t3, t4, init.createNewIsolate(), t5,
new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false,
false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, fa
lse, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); | |
778 t4.add$1(0, 0); | |
779 rootContext._addRegistration$2(0, t5); | |
780 init.globalState.rootContext = rootContext; | |
781 init.globalState.currentContext = rootContext; | |
782 t2 = H.getDynamicRuntimeType(); | |
783 t3 = H.buildFunctionType(t2, [t2])._isTest$1(entry); | |
784 if (t3) | |
785 rootContext.eval$1(new H.startRootIsolate_closure(t1, entry)); | |
786 else { | |
787 t2 = H.buildFunctionType(t2, [t2, t2])._isTest$1(entry); | |
788 if (t2) | |
789 rootContext.eval$1(new H.startRootIsolate_closure0(t1, entry)); | |
790 else | |
791 rootContext.eval$1(entry); | |
792 } | |
793 init.globalState.topEventLoop.run$0(); | |
794 }, | |
795 IsolateNatives_computeThisScript: function() { | |
796 var currentScript = init.currentScript; | |
797 if (currentScript != null) | |
798 return String(currentScript.src); | |
799 if (init.globalState.isWorker === true) | |
800 return H.IsolateNatives_computeThisScriptFromTrace(); | |
801 return; | |
802 }, | |
803 IsolateNatives_computeThisScriptFromTrace: function() { | |
804 var stack, matches; | |
805 stack = new Error().stack; | |
806 if (stack == null) { | |
807 stack = function() { | |
808 try { | |
809 throw new Error(); | |
810 } catch (e) { | |
811 return e.stack; | |
812 } | |
813 }(); | |
814 if (stack == null) | |
815 throw H.wrapException(new P.UnsupportedError("No stack trace")); | |
816 } | |
817 matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"
)); | |
818 if (matches != null) | |
819 return matches[1]; | |
820 matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m")); | |
821 if (matches != null) | |
822 return matches[1]; | |
823 throw H.wrapException(new P.UnsupportedError("Cannot extract URI from \"" +
H.S(stack) + "\"")); | |
824 }, | |
825 IsolateNatives__processWorkerMessage: function(sender, e) { | |
826 var msg, t1, functionName, entryPoint, args, message, isSpawnUri, startPause
d, replyTo, t2, t3, t4, context; | |
827 msg = new H._Deserializer(true, []).deserialize$1(e.data); | |
828 t1 = J.getInterceptor$as(msg); | |
829 switch (t1.$index(msg, "command")) { | |
830 case "start": | |
831 init.globalState.currentManagerId = t1.$index(msg, "id"); | |
832 functionName = t1.$index(msg, "functionName"); | |
833 entryPoint = functionName == null ? init.globalState.entry : H.IsolateNa
tives__getJSFunctionFromName(functionName); | |
834 args = t1.$index(msg, "args"); | |
835 message = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "ms
g")); | |
836 isSpawnUri = t1.$index(msg, "isSpawnUri"); | |
837 startPaused = t1.$index(msg, "startPaused"); | |
838 replyTo = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "re
plyTo")); | |
839 t1 = init.globalState.nextIsolateId++; | |
840 t2 = P.LinkedHashMap_LinkedHashMap(null, null, null, P.$int, H.RawReceiv
ePortImpl); | |
841 t3 = P.LinkedHashSet_LinkedHashSet(null, null, null, P.$int); | |
842 t4 = new H.RawReceivePortImpl(0, null, false); | |
843 context = new H._IsolateContext(t1, t2, t3, init.createNewIsolate(), t4,
new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false,
false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, fa
lse, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); | |
844 t3.add$1(0, 0); | |
845 context._addRegistration$2(0, t4); | |
846 init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context,
new H.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, i
sSpawnUri, startPaused, replyTo), "worker-start")); | |
847 init.globalState.currentContext = context; | |
848 init.globalState.topEventLoop.run$0(); | |
849 break; | |
850 case "spawn-worker": | |
851 break; | |
852 case "message": | |
853 if (t1.$index(msg, "port") != null) | |
854 t1.$index(msg, "port").send$1(t1.$index(msg, "msg")); | |
855 init.globalState.topEventLoop.run$0(); | |
856 break; | |
857 case "close": | |
858 init.globalState.managers.remove$1(0, $.get$IsolateNatives_workerIds().$
index(0, sender)); | |
859 sender.terminate(); | |
860 init.globalState.topEventLoop.run$0(); | |
861 break; | |
862 case "log": | |
863 H.IsolateNatives__log(t1.$index(msg, "msg")); | |
864 break; | |
865 case "print": | |
866 if (init.globalState.isWorker === true) { | |
867 t1 = init.globalState.mainManager; | |
868 t2 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", msg]); | |
869 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); | |
870 t1.toString; | |
871 self.postMessage(t2); | |
872 } else | |
873 P.print(t1.$index(msg, "msg")); | |
874 break; | |
875 case "error": | |
876 throw H.wrapException(t1.$index(msg, "msg")); | |
877 } | |
878 }, | |
879 IsolateNatives__log: function(msg) { | |
880 var trace, t1, t2, exception; | |
881 if (init.globalState.isWorker === true) { | |
882 t1 = init.globalState.mainManager; | |
883 t2 = P.LinkedHashMap__makeLiteral(["command", "log", "msg", msg]); | |
884 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(null,
P.$int)).serialize$1(t2); | |
885 t1.toString; | |
886 self.postMessage(t2); | |
887 } else | |
888 try { | |
889 self.console.log(msg); | |
890 } catch (exception) { | |
891 H.unwrapException(exception); | |
892 trace = H.getTraceFromException(exception); | |
893 throw H.wrapException(P.Exception_Exception(trace)); | |
894 } | |
895 }, | |
896 IsolateNatives__getJSFunctionFromName: function(functionName) { | |
897 return init.globalFunctions[functionName](); | |
898 }, | |
899 IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, st
artPaused, replyTo) { | |
900 var context, t1, t2, t3; | |
901 context = init.globalState.currentContext; | |
902 t1 = context.id; | |
903 $.Primitives_mirrorFunctionCacheName = $.Primitives_mirrorFunctionCacheName
+ ("_" + t1); | |
904 $.Primitives_mirrorInvokeCacheName = $.Primitives_mirrorInvokeCacheName + ("
_" + t1); | |
905 t1 = context.controlPort; | |
906 t2 = init.globalState.currentContext.id; | |
907 t3 = context.pauseCapability; | |
908 replyTo.send$1(["spawned", new H._NativeJsSendPort(t1, t2), t3, context.term
inateCapability]); | |
909 t2 = new H.IsolateNatives__startIsolate_runStartFunction(topLevel, args, mes
sage, isSpawnUri, context); | |
910 if (startPaused === true) { | |
911 context.addPause$2(t3, t3); | |
912 init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, t
2, "start isolate")); | |
913 } else | |
914 t2.call$0(); | |
915 }, | |
916 _clone: function(message) { | |
917 return new H._Deserializer(true, []).deserialize$1(new H._Serializer(false,
P.LinkedHashMap_LinkedHashMap$identity(null, P.$int)).serialize$1(message)); | |
918 }, | |
919 startRootIsolate_closure: { | |
920 "^": "Closure:0;__isolate_helper$_box_0,_captured_entry_1", | |
921 call$0: function() { | |
922 this._captured_entry_1.call$1(this.__isolate_helper$_box_0._captured_args_
0); | |
923 } | |
924 }, | |
925 startRootIsolate_closure0: { | |
926 "^": "Closure:0;__isolate_helper$_box_0,_captured_entry_2", | |
927 call$0: function() { | |
928 this._captured_entry_2.call$2(this.__isolate_helper$_box_0._captured_args_
0, null); | |
929 } | |
930 }, | |
931 _Manager: { | |
932 "^": "Object;nextIsolateId,currentManagerId,nextManagerId,currentContext,roo
tContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,mainMana
ger,managers,entry", | |
933 _nativeDetectEnvironment$0: function() { | |
934 var t1, t2, t3; | |
935 t1 = self.window == null; | |
936 t2 = self.Worker; | |
937 t3 = t1 && !!self.postMessage; | |
938 this.isWorker = t3; | |
939 if (!t3) | |
940 t2 = t2 != null && $.get$IsolateNatives_thisScript() != null; | |
941 else | |
942 t2 = true; | |
943 this.supportsWorkers = t2; | |
944 this.fromCommandLine = t1 && !t3; | |
945 }, | |
946 _nativeInitWorkerMessageHandler$0: function() { | |
947 self.onmessage = function(f, a) { | |
948 return function(e) { | |
949 f(a, e); | |
950 }; | |
951 }(H.IsolateNatives__processWorkerMessage, this.mainManager); | |
952 self.dartPrint = self.dartPrint || function(serialize) { | |
953 return function(object) { | |
954 if (self.console && self.console.log) | |
955 self.console.log(object); | |
956 else | |
957 self.postMessage(serialize(object)); | |
958 }; | |
959 }(H._Manager__serializePrintMessage); | |
960 }, | |
961 static: {_Manager__serializePrintMessage: function(object) { | |
962 var t1 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", object
]); | |
963 return new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t1); | |
964 }} | |
965 }, | |
966 _IsolateContext: { | |
967 "^": "Object;id,ports,weakPorts,isolateStatics<,controlPort<,pauseCapability
,terminateCapability,initialized,isPaused,delayedEvents,pauseTokens,doneHandlers
,_scheduledControlEvents,_isExecutingEvent,errorsAreFatal,errorPorts", | |
968 addPause$2: function(authentification, resume) { | |
969 if (!this.pauseCapability.$eq(0, authentification)) | |
970 return; | |
971 if (this.pauseTokens.add$1(0, resume) && !this.isPaused) | |
972 this.isPaused = true; | |
973 this._updateGlobalState$0(); | |
974 }, | |
975 removePause$1: function(resume) { | |
976 var t1, t2, $event, t3, t4, t5; | |
977 if (!this.isPaused) | |
978 return; | |
979 t1 = this.pauseTokens; | |
980 t1.remove$1(0, resume); | |
981 if (t1._collection$_length === 0) { | |
982 for (t1 = this.delayedEvents; t2 = t1.length, t2 !== 0;) { | |
983 if (0 >= t2) | |
984 return H.ioore(t1, 0); | |
985 $event = t1.pop(); | |
986 t2 = init.globalState.topEventLoop.events; | |
987 t3 = t2._head; | |
988 t4 = t2._table; | |
989 t5 = t4.length; | |
990 t3 = (t3 - 1 & t5 - 1) >>> 0; | |
991 t2._head = t3; | |
992 if (t3 < 0 || t3 >= t5) | |
993 return H.ioore(t4, t3); | |
994 t4[t3] = $event; | |
995 if (t3 === t2._tail) | |
996 t2._grow$0(); | |
997 ++t2._modificationCount; | |
998 } | |
999 this.isPaused = false; | |
1000 } | |
1001 this._updateGlobalState$0(); | |
1002 }, | |
1003 addDoneListener$2: function(responsePort, response) { | |
1004 var t1, i, t2; | |
1005 if (this.doneHandlers == null) | |
1006 this.doneHandlers = []; | |
1007 for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i
< t2.length; i += 2) | |
1008 if (t1.$eq(responsePort, t2[i])) { | |
1009 t1 = this.doneHandlers; | |
1010 t2 = i + 1; | |
1011 if (t2 >= t1.length) | |
1012 return H.ioore(t1, t2); | |
1013 t1[t2] = response; | |
1014 return; | |
1015 } | |
1016 t2.push(responsePort); | |
1017 this.doneHandlers.push(response); | |
1018 }, | |
1019 removeDoneListener$1: function(responsePort) { | |
1020 var t1, i, t2; | |
1021 if (this.doneHandlers == null) | |
1022 return; | |
1023 for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i
< t2.length; i += 2) | |
1024 if (t1.$eq(responsePort, t2[i])) { | |
1025 t1 = this.doneHandlers; | |
1026 t2 = i + 2; | |
1027 t1.toString; | |
1028 if (typeof t1 !== "object" || t1 === null || !!t1.fixed$length) | |
1029 H.throwExpression(new P.UnsupportedError("removeRange")); | |
1030 P.RangeError_checkValidRange(i, t2, t1.length, null, null, null); | |
1031 t1.splice(i, t2 - i); | |
1032 return; | |
1033 } | |
1034 }, | |
1035 setErrorsFatal$2: function(authentification, errorsAreFatal) { | |
1036 if (!this.terminateCapability.$eq(0, authentification)) | |
1037 return; | |
1038 this.errorsAreFatal = errorsAreFatal; | |
1039 }, | |
1040 handlePing$3: function(responsePort, pingType, response) { | |
1041 var t1 = J.getInterceptor(pingType); | |
1042 if (!t1.$eq(pingType, 0)) | |
1043 t1 = t1.$eq(pingType, 1) && !this._isExecutingEvent; | |
1044 else | |
1045 t1 = true; | |
1046 if (t1) { | |
1047 responsePort.send$1(response); | |
1048 return; | |
1049 } | |
1050 t1 = this._scheduledControlEvents; | |
1051 if (t1 == null) { | |
1052 t1 = P.ListQueue$(null, null); | |
1053 this._scheduledControlEvents = t1; | |
1054 } | |
1055 t1._add$1(new H._IsolateContext_handlePing_respond(responsePort, response)
); | |
1056 }, | |
1057 handleKill$2: function(authentification, priority) { | |
1058 var t1; | |
1059 if (!this.terminateCapability.$eq(0, authentification)) | |
1060 return; | |
1061 t1 = J.getInterceptor(priority); | |
1062 if (!t1.$eq(priority, 0)) | |
1063 t1 = t1.$eq(priority, 1) && !this._isExecutingEvent; | |
1064 else | |
1065 t1 = true; | |
1066 if (t1) { | |
1067 this.kill$0(); | |
1068 return; | |
1069 } | |
1070 t1 = this._scheduledControlEvents; | |
1071 if (t1 == null) { | |
1072 t1 = P.ListQueue$(null, null); | |
1073 this._scheduledControlEvents = t1; | |
1074 } | |
1075 t1._add$1(this.get$kill()); | |
1076 }, | |
1077 handleUncaughtError$2: function(error, stackTrace) { | |
1078 var t1, message, t2; | |
1079 t1 = this.errorPorts; | |
1080 if (t1._collection$_length === 0) { | |
1081 if (this.errorsAreFatal === true && this === init.globalState.rootContex
t) | |
1082 return; | |
1083 if (self.console && self.console.error) | |
1084 self.console.error(error, stackTrace); | |
1085 else { | |
1086 P.print(error); | |
1087 if (stackTrace != null) | |
1088 P.print(stackTrace); | |
1089 } | |
1090 return; | |
1091 } | |
1092 message = Array(2); | |
1093 message.fixed$length = Array; | |
1094 message[0] = J.toString$0(error); | |
1095 message[1] = stackTrace == null ? null : J.toString$0(stackTrace); | |
1096 for (t2 = new P.LinkedHashSetIterator(t1, t1._collection$_modifications, n
ull, null), t2._cell = t1._collection$_first; t2.moveNext$0();) | |
1097 t2._collection$_current.send$1(message); | |
1098 }, | |
1099 eval$1: function(code) { | |
1100 var old, result, oldIsExecutingEvent, e, s, exception, t1; | |
1101 old = init.globalState.currentContext; | |
1102 init.globalState.currentContext = this; | |
1103 $ = this.isolateStatics; | |
1104 result = null; | |
1105 oldIsExecutingEvent = this._isExecutingEvent; | |
1106 this._isExecutingEvent = true; | |
1107 try { | |
1108 result = code.call$0(); | |
1109 } catch (exception) { | |
1110 t1 = H.unwrapException(exception); | |
1111 e = t1; | |
1112 s = H.getTraceFromException(exception); | |
1113 this.handleUncaughtError$2(e, s); | |
1114 if (this.errorsAreFatal === true) { | |
1115 this.kill$0(); | |
1116 if (this === init.globalState.rootContext) | |
1117 throw exception; | |
1118 } | |
1119 } finally { | |
1120 this._isExecutingEvent = oldIsExecutingEvent; | |
1121 init.globalState.currentContext = old; | |
1122 if (old != null) | |
1123 $ = old.get$isolateStatics(); | |
1124 if (this._scheduledControlEvents != null) | |
1125 for (; t1 = this._scheduledControlEvents, !t1.get$isEmpty(t1);) | |
1126 this._scheduledControlEvents.removeFirst$0().call$0(); | |
1127 } | |
1128 return result; | |
1129 }, | |
1130 lookup$1: function(portId) { | |
1131 return this.ports.$index(0, portId); | |
1132 }, | |
1133 _addRegistration$2: function(portId, port) { | |
1134 var t1 = this.ports; | |
1135 if (t1.containsKey$1(portId)) | |
1136 throw H.wrapException(P.Exception_Exception("Registry: ports must be reg
istered only once.")); | |
1137 t1.$indexSet(0, portId, port); | |
1138 }, | |
1139 _updateGlobalState$0: function() { | |
1140 if (this.ports.__js_helper$_length - this.weakPorts._collection$_length >
0 || this.isPaused || !this.initialized) | |
1141 init.globalState.isolates.$indexSet(0, this.id, this); | |
1142 else | |
1143 this.kill$0(); | |
1144 }, | |
1145 kill$0: [function() { | |
1146 var t1, t2, i, responsePort, t3; | |
1147 t1 = this._scheduledControlEvents; | |
1148 if (t1 != null) | |
1149 t1.clear$0(0); | |
1150 for (t1 = this.ports, t2 = t1.get$values(), t2 = H.setRuntimeTypeInfo(new
H.MappedIterator(null, J.get$iterator$a(t2.__internal$_iterable), t2._f), [H.get
TypeArgumentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]); t2.moveNext$0();) | |
1151 t2.__internal$_current._close$0(); | |
1152 if (t1.__js_helper$_length > 0) { | |
1153 t1._last = null; | |
1154 t1._first = null; | |
1155 t1._rest = null; | |
1156 t1._nums = null; | |
1157 t1._strings = null; | |
1158 t1.__js_helper$_length = 0; | |
1159 t1._modifications = t1._modifications + 1 & 67108863; | |
1160 } | |
1161 this.weakPorts.clear$0(0); | |
1162 init.globalState.isolates.remove$1(0, this.id); | |
1163 this.errorPorts.clear$0(0); | |
1164 if (this.doneHandlers != null) { | |
1165 for (i = 0; t1 = this.doneHandlers, t2 = t1.length, i < t2; i += 2) { | |
1166 responsePort = t1[i]; | |
1167 t3 = i + 1; | |
1168 if (t3 >= t2) | |
1169 return H.ioore(t1, t3); | |
1170 responsePort.send$1(t1[t3]); | |
1171 } | |
1172 this.doneHandlers = null; | |
1173 } | |
1174 }, "call$0", "get$kill", 0, 0, 1] | |
1175 }, | |
1176 _IsolateContext_handlePing_respond: { | |
1177 "^": "Closure:1;_captured_responsePort_0,_captured_response_1", | |
1178 call$0: function() { | |
1179 this._captured_responsePort_0.send$1(this._captured_response_1); | |
1180 } | |
1181 }, | |
1182 _EventLoop: { | |
1183 "^": "Object;events,_activeJsAsyncCount", | |
1184 dequeue$0: function() { | |
1185 var t1 = this.events; | |
1186 if (t1._head === t1._tail) | |
1187 return; | |
1188 return t1.removeFirst$0(); | |
1189 }, | |
1190 runIteration$0: function() { | |
1191 var $event, t1, t2; | |
1192 $event = this.dequeue$0(); | |
1193 if ($event == null) { | |
1194 if (init.globalState.rootContext != null && init.globalState.isolates.co
ntainsKey$1(init.globalState.rootContext.id) && init.globalState.fromCommandLine
=== true && init.globalState.rootContext.ports.__js_helper$_length === 0) | |
1195 H.throwExpression(P.Exception_Exception("Program exited with open Rece
ivePorts.")); | |
1196 t1 = init.globalState; | |
1197 if (t1.isWorker === true && t1.isolates.__js_helper$_length === 0 && t1.
topEventLoop._activeJsAsyncCount === 0) { | |
1198 t1 = t1.mainManager; | |
1199 t2 = P.LinkedHashMap__makeLiteral(["command", "close"]); | |
1200 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); | |
1201 t1.toString; | |
1202 self.postMessage(t2); | |
1203 } | |
1204 return false; | |
1205 } | |
1206 $event.process$0(); | |
1207 return true; | |
1208 }, | |
1209 _runHelper$0: function() { | |
1210 if (self.window != null) | |
1211 new H._EventLoop__runHelper_next(this).call$0(); | |
1212 else | |
1213 for (; this.runIteration$0();) | |
1214 ; | |
1215 }, | |
1216 run$0: function() { | |
1217 var e, trace, exception, t1, t2; | |
1218 if (init.globalState.isWorker !== true) | |
1219 this._runHelper$0(); | |
1220 else | |
1221 try { | |
1222 this._runHelper$0(); | |
1223 } catch (exception) { | |
1224 t1 = H.unwrapException(exception); | |
1225 e = t1; | |
1226 trace = H.getTraceFromException(exception); | |
1227 t1 = init.globalState.mainManager; | |
1228 t2 = P.LinkedHashMap__makeLiteral(["command", "error", "msg", H.S(e) +
"\n" + H.S(trace)]); | |
1229 t2 = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$identity(nu
ll, P.$int)).serialize$1(t2); | |
1230 t1.toString; | |
1231 self.postMessage(t2); | |
1232 } | |
1233 } | |
1234 }, | |
1235 _EventLoop__runHelper_next: { | |
1236 "^": "Closure:1;_captured_this_0", | |
1237 call$0: function() { | |
1238 if (!this._captured_this_0.runIteration$0()) | |
1239 return; | |
1240 P.Timer_Timer(C.Duration_0, this); | |
1241 } | |
1242 }, | |
1243 _IsolateEvent: { | |
1244 "^": "Object;isolate,fn,message", | |
1245 process$0: function() { | |
1246 var t1 = this.isolate; | |
1247 if (t1.isPaused) { | |
1248 t1.delayedEvents.push(this); | |
1249 return; | |
1250 } | |
1251 t1.eval$1(this.fn); | |
1252 } | |
1253 }, | |
1254 _MainManagerStub: { | |
1255 "^": "Object;" | |
1256 }, | |
1257 IsolateNatives__processWorkerMessage_closure: { | |
1258 "^": "Closure:0;_captured_entryPoint_0,_captured_args_1,_captured_message_2,
_captured_isSpawnUri_3,_captured_startPaused_4,_captured_replyTo_5", | |
1259 call$0: function() { | |
1260 H.IsolateNatives__startIsolate(this._captured_entryPoint_0, this._captured
_args_1, this._captured_message_2, this._captured_isSpawnUri_3, this._captured_s
tartPaused_4, this._captured_replyTo_5); | |
1261 } | |
1262 }, | |
1263 IsolateNatives__startIsolate_runStartFunction: { | |
1264 "^": "Closure:1;_captured_topLevel_0,_captured_args_1,_captured_message_2,_c
aptured_isSpawnUri_3,_captured_context_4", | |
1265 call$0: function() { | |
1266 var t1, t2, t3; | |
1267 this._captured_context_4.initialized = true; | |
1268 if (this._captured_isSpawnUri_3 !== true) | |
1269 this._captured_topLevel_0.call$1(this._captured_message_2); | |
1270 else { | |
1271 t1 = this._captured_topLevel_0; | |
1272 t2 = H.getDynamicRuntimeType(); | |
1273 t3 = H.buildFunctionType(t2, [t2, t2])._isTest$1(t1); | |
1274 if (t3) | |
1275 t1.call$2(this._captured_args_1, this._captured_message_2); | |
1276 else { | |
1277 t2 = H.buildFunctionType(t2, [t2])._isTest$1(t1); | |
1278 if (t2) | |
1279 t1.call$1(this._captured_args_1); | |
1280 else | |
1281 t1.call$0(); | |
1282 } | |
1283 } | |
1284 } | |
1285 }, | |
1286 _BaseSendPort: { | |
1287 "^": "Object;" | |
1288 }, | |
1289 _NativeJsSendPort: { | |
1290 "^": "_BaseSendPort;_receivePort,_isolateId", | |
1291 send$1: function(message) { | |
1292 var isolate, t1, msg, t2; | |
1293 isolate = init.globalState.isolates.$index(0, this._isolateId); | |
1294 if (isolate == null) | |
1295 return; | |
1296 t1 = this._receivePort; | |
1297 if (t1.get$_isClosed()) | |
1298 return; | |
1299 msg = H._clone(message); | |
1300 if (isolate.get$controlPort() === t1) { | |
1301 t1 = J.getInterceptor$as(msg); | |
1302 switch (t1.$index(msg, 0)) { | |
1303 case "pause": | |
1304 isolate.addPause$2(t1.$index(msg, 1), t1.$index(msg, 2)); | |
1305 break; | |
1306 case "resume": | |
1307 isolate.removePause$1(t1.$index(msg, 1)); | |
1308 break; | |
1309 case "add-ondone": | |
1310 isolate.addDoneListener$2(t1.$index(msg, 1), t1.$index(msg, 2)); | |
1311 break; | |
1312 case "remove-ondone": | |
1313 isolate.removeDoneListener$1(t1.$index(msg, 1)); | |
1314 break; | |
1315 case "set-errors-fatal": | |
1316 isolate.setErrorsFatal$2(t1.$index(msg, 1), t1.$index(msg, 2)); | |
1317 break; | |
1318 case "ping": | |
1319 isolate.handlePing$3(t1.$index(msg, 1), t1.$index(msg, 2), t1.$index
(msg, 3)); | |
1320 break; | |
1321 case "kill": | |
1322 isolate.handleKill$2(t1.$index(msg, 1), t1.$index(msg, 2)); | |
1323 break; | |
1324 case "getErrors": | |
1325 t1 = t1.$index(msg, 1); | |
1326 isolate.errorPorts.add$1(0, t1); | |
1327 break; | |
1328 case "stopErrors": | |
1329 t1 = t1.$index(msg, 1); | |
1330 isolate.errorPorts.remove$1(0, t1); | |
1331 break; | |
1332 } | |
1333 return; | |
1334 } | |
1335 t1 = init.globalState.topEventLoop; | |
1336 t2 = "receive " + H.S(message); | |
1337 t1.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send
_closure(this, msg), t2)); | |
1338 }, | |
1339 $eq: function(_, other) { | |
1340 if (other == null) | |
1341 return false; | |
1342 return other instanceof H._NativeJsSendPort && J.$eq(this._receivePort, ot
her._receivePort); | |
1343 }, | |
1344 get$hashCode: function(_) { | |
1345 return this._receivePort.get$_id(); | |
1346 } | |
1347 }, | |
1348 _NativeJsSendPort_send_closure: { | |
1349 "^": "Closure:0;_captured_this_0,_captured_msg_1", | |
1350 call$0: function() { | |
1351 var t1 = this._captured_this_0._receivePort; | |
1352 if (!t1.get$_isClosed()) | |
1353 t1.__isolate_helper$_add$1(this._captured_msg_1); | |
1354 } | |
1355 }, | |
1356 _WorkerSendPort: { | |
1357 "^": "_BaseSendPort;_workerId,_receivePortId,_isolateId", | |
1358 send$1: function(message) { | |
1359 var t1, workerMessage, manager; | |
1360 t1 = P.LinkedHashMap__makeLiteral(["command", "message", "port", this, "ms
g", message]); | |
1361 workerMessage = new H._Serializer(true, P.LinkedHashMap_LinkedHashMap$iden
tity(null, P.$int)).serialize$1(t1); | |
1362 if (init.globalState.isWorker === true) { | |
1363 init.globalState.mainManager.toString; | |
1364 self.postMessage(workerMessage); | |
1365 } else { | |
1366 manager = init.globalState.managers.$index(0, this._workerId); | |
1367 if (manager != null) | |
1368 manager.postMessage(workerMessage); | |
1369 } | |
1370 }, | |
1371 $eq: function(_, other) { | |
1372 if (other == null) | |
1373 return false; | |
1374 return other instanceof H._WorkerSendPort && J.$eq(this._workerId, other._
workerId) && J.$eq(this._isolateId, other._isolateId) && J.$eq(this._receivePort
Id, other._receivePortId); | |
1375 }, | |
1376 get$hashCode: function(_) { | |
1377 var t1, t2, t3; | |
1378 t1 = this._workerId; | |
1379 if (typeof t1 !== "number") | |
1380 return t1.$shl(); | |
1381 t2 = this._isolateId; | |
1382 if (typeof t2 !== "number") | |
1383 return t2.$shl(); | |
1384 t3 = this._receivePortId; | |
1385 if (typeof t3 !== "number") | |
1386 return H.iae(t3); | |
1387 return (t1 << 16 ^ t2 << 8 ^ t3) >>> 0; | |
1388 } | |
1389 }, | |
1390 RawReceivePortImpl: { | |
1391 "^": "Object;_id<,_handler,_isClosed<", | |
1392 _close$0: function() { | |
1393 this._isClosed = true; | |
1394 this._handler = null; | |
1395 }, | |
1396 __isolate_helper$_add$1: function(dataEvent) { | |
1397 if (this._isClosed) | |
1398 return; | |
1399 this._handler$1(dataEvent); | |
1400 }, | |
1401 _handler$1: function(arg0) { | |
1402 return this._handler.call$1(arg0); | |
1403 }, | |
1404 $isRawReceivePort: 1 | |
1405 }, | |
1406 TimerImpl: { | |
1407 "^": "Object;_once,_inEventLoop,_handle", | |
1408 TimerImpl$2: function(milliseconds, callback) { | |
1409 var t1, t2; | |
1410 if (milliseconds === 0) | |
1411 t1 = self.setTimeout == null || init.globalState.isWorker === true; | |
1412 else | |
1413 t1 = false; | |
1414 if (t1) { | |
1415 this._handle = 1; | |
1416 t1 = init.globalState.topEventLoop; | |
1417 t2 = init.globalState.currentContext; | |
1418 t1.events._add$1(new H._IsolateEvent(t2, new H.TimerImpl_internalCallbac
k(this, callback), "timer")); | |
1419 this._inEventLoop = true; | |
1420 } else if (self.setTimeout != null) { | |
1421 ++init.globalState.topEventLoop._activeJsAsyncCount; | |
1422 this._handle = self.setTimeout(H.convertDartClosureToJS(new H.TimerImpl_
internalCallback0(this, callback), 0), milliseconds); | |
1423 } else | |
1424 throw H.wrapException(new P.UnsupportedError("Timer greater than 0.")); | |
1425 }, | |
1426 static: {TimerImpl$: function(milliseconds, callback) { | |
1427 var t1 = new H.TimerImpl(true, false, null); | |
1428 t1.TimerImpl$2(milliseconds, callback); | |
1429 return t1; | |
1430 }} | |
1431 }, | |
1432 TimerImpl_internalCallback: { | |
1433 "^": "Closure:1;_captured_this_0,_captured_callback_1", | |
1434 call$0: function() { | |
1435 this._captured_this_0._handle = null; | |
1436 this._captured_callback_1.call$0(); | |
1437 } | |
1438 }, | |
1439 TimerImpl_internalCallback0: { | |
1440 "^": "Closure:1;_captured_this_2,_captured_callback_3", | |
1441 call$0: function() { | |
1442 this._captured_this_2._handle = null; | |
1443 H.leaveJsAsync(); | |
1444 this._captured_callback_3.call$0(); | |
1445 } | |
1446 }, | |
1447 CapabilityImpl: { | |
1448 "^": "Object;_id<", | |
1449 get$hashCode: function(_) { | |
1450 var hash = this._id; | |
1451 hash = C.JSInt_methods._shrOtherPositive$1(hash, 0) ^ C.JSInt_methods._tdi
vFast$1(hash, 4294967296); | |
1452 hash = (~hash >>> 0) + (hash << 15 >>> 0) & 4294967295; | |
1453 hash = ((hash ^ hash >>> 12) >>> 0) * 5 & 4294967295; | |
1454 hash = ((hash ^ hash >>> 4) >>> 0) * 2057 & 4294967295; | |
1455 return (hash ^ hash >>> 16) >>> 0; | |
1456 }, | |
1457 $eq: function(_, other) { | |
1458 if (other == null) | |
1459 return false; | |
1460 if (other === this) | |
1461 return true; | |
1462 if (other instanceof H.CapabilityImpl) | |
1463 return this._id === other._id; | |
1464 return false; | |
1465 } | |
1466 }, | |
1467 _Serializer: { | |
1468 "^": "Object;_serializeSendPorts,serializedObjectIds", | |
1469 serialize$1: [function(x) { | |
1470 var t1, serializationId, serializeTearOff, t2, $name; | |
1471 if (x == null || typeof x === "string" || typeof x === "number" || typeof
x === "boolean") | |
1472 return x; | |
1473 t1 = this.serializedObjectIds; | |
1474 serializationId = t1.$index(0, x); | |
1475 if (serializationId != null) | |
1476 return ["ref", serializationId]; | |
1477 t1.$indexSet(0, x, t1.__js_helper$_length); | |
1478 t1 = J.getInterceptor(x); | |
1479 if (!!t1.$isJSIndexable) | |
1480 return this.serializeJSIndexable$1(x); | |
1481 if (!!t1.$isInternalMap) { | |
1482 serializeTearOff = this.get$serialize(); | |
1483 t1 = x.get$keys(); | |
1484 t1 = H.MappedIterable_MappedIterable(t1, serializeTearOff, H.getRuntimeT
ypeArgument(t1, "Iterable", 0), null); | |
1485 t1 = P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "Iterable",
0)); | |
1486 t2 = x.get$values(); | |
1487 t2 = H.MappedIterable_MappedIterable(t2, serializeTearOff, H.getRuntimeT
ypeArgument(t2, "Iterable", 0), null); | |
1488 return ["map", t1, P.List_List$from(t2, true, H.getRuntimeTypeArgument(t
2, "Iterable", 0))]; | |
1489 } | |
1490 if (!!t1.$isJSObject) | |
1491 return this.serializeJSObject$1(x); | |
1492 if (!!t1.$isInterceptor) | |
1493 this.unsupported$1(x); | |
1494 if (!!t1.$isRawReceivePort) | |
1495 this.unsupported$2(x, "RawReceivePorts can't be transmitted:"); | |
1496 if (!!t1.$is_NativeJsSendPort) | |
1497 return this.serializeJsSendPort$1(x); | |
1498 if (!!t1.$is_WorkerSendPort) | |
1499 return this.serializeWorkerSendPort$1(x); | |
1500 if (!!t1.$isClosure) { | |
1501 $name = x.$name; | |
1502 if ($name == null) | |
1503 this.unsupported$2(x, "Closures can't be transmitted:"); | |
1504 return ["function", $name]; | |
1505 } | |
1506 return ["dart", init.classIdExtractor(x), this.serializeArrayInPlace$1(ini
t.classFieldsExtractor(x))]; | |
1507 }, "call$1", "get$serialize", 2, 0, 2], | |
1508 unsupported$2: function(x, message) { | |
1509 throw H.wrapException(new P.UnsupportedError(H.S(message == null ? "Can't
transmit:" : message) + " " + H.S(x))); | |
1510 }, | |
1511 unsupported$1: function(x) { | |
1512 return this.unsupported$2(x, null); | |
1513 }, | |
1514 serializeJSIndexable$1: function(indexable) { | |
1515 var serialized = this.serializeArray$1(indexable); | |
1516 if (!!indexable.fixed$length) | |
1517 return ["fixed", serialized]; | |
1518 if (!indexable.fixed$length) | |
1519 return ["extendable", serialized]; | |
1520 if (!indexable.immutable$list) | |
1521 return ["mutable", serialized]; | |
1522 if (indexable.constructor === Array) | |
1523 return ["const", serialized]; | |
1524 this.unsupported$2(indexable, "Can't serialize indexable: "); | |
1525 }, | |
1526 serializeArray$1: function(x) { | |
1527 var serialized, i, t1; | |
1528 serialized = []; | |
1529 C.JSArray_methods.set$length(serialized, x.length); | |
1530 for (i = 0; i < x.length; ++i) { | |
1531 t1 = this.serialize$1(x[i]); | |
1532 if (i >= serialized.length) | |
1533 return H.ioore(serialized, i); | |
1534 serialized[i] = t1; | |
1535 } | |
1536 return serialized; | |
1537 }, | |
1538 serializeArrayInPlace$1: function(x) { | |
1539 var i; | |
1540 for (i = 0; i < x.length; ++i) | |
1541 C.JSArray_methods.$indexSet(x, i, this.serialize$1(x[i])); | |
1542 return x; | |
1543 }, | |
1544 serializeJSObject$1: function(x) { | |
1545 var keys, values, i, t1; | |
1546 if (!!x.constructor && x.constructor !== Object) | |
1547 this.unsupported$2(x, "Only plain JS Objects are supported:"); | |
1548 keys = Object.keys(x); | |
1549 values = []; | |
1550 C.JSArray_methods.set$length(values, keys.length); | |
1551 for (i = 0; i < keys.length; ++i) { | |
1552 t1 = this.serialize$1(x[keys[i]]); | |
1553 if (i >= values.length) | |
1554 return H.ioore(values, i); | |
1555 values[i] = t1; | |
1556 } | |
1557 return ["js-object", keys, values]; | |
1558 }, | |
1559 serializeWorkerSendPort$1: function(x) { | |
1560 if (this._serializeSendPorts) | |
1561 return ["sendport", x._workerId, x._isolateId, x._receivePortId]; | |
1562 return ["raw sendport", x]; | |
1563 }, | |
1564 serializeJsSendPort$1: function(x) { | |
1565 if (this._serializeSendPorts) | |
1566 return ["sendport", init.globalState.currentManagerId, x._isolateId, x._
receivePort.get$_id()]; | |
1567 return ["raw sendport", x]; | |
1568 } | |
1569 }, | |
1570 _Deserializer: { | |
1571 "^": "Object;_adjustSendPorts,deserializedObjects", | |
1572 deserialize$1: [function(x) { | |
1573 var serializationId, t1, result, classId, fields, emptyInstance; | |
1574 if (x == null || typeof x === "string" || typeof x === "number" || typeof
x === "boolean") | |
1575 return x; | |
1576 if (typeof x !== "object" || x === null || x.constructor !== Array) | |
1577 throw H.wrapException(P.ArgumentError$("Bad serialized message: " + H.S(
x))); | |
1578 switch (C.JSArray_methods.get$first(x)) { | |
1579 case "ref": | |
1580 if (1 >= x.length) | |
1581 return H.ioore(x, 1); | |
1582 serializationId = x[1]; | |
1583 t1 = this.deserializedObjects; | |
1584 if (serializationId >>> 0 !== serializationId || serializationId >= t1
.length) | |
1585 return H.ioore(t1, serializationId); | |
1586 return t1[serializationId]; | |
1587 case "buffer": | |
1588 if (1 >= x.length) | |
1589 return H.ioore(x, 1); | |
1590 result = x[1]; | |
1591 this.deserializedObjects.push(result); | |
1592 return result; | |
1593 case "typed": | |
1594 if (1 >= x.length) | |
1595 return H.ioore(x, 1); | |
1596 result = x[1]; | |
1597 this.deserializedObjects.push(result); | |
1598 return result; | |
1599 case "fixed": | |
1600 if (1 >= x.length) | |
1601 return H.ioore(x, 1); | |
1602 result = x[1]; | |
1603 this.deserializedObjects.push(result); | |
1604 t1 = this.deserializeArrayInPlace$1(result); | |
1605 t1.$builtinTypeInfo = [null]; | |
1606 t1.fixed$length = Array; | |
1607 return t1; | |
1608 case "extendable": | |
1609 if (1 >= x.length) | |
1610 return H.ioore(x, 1); | |
1611 result = x[1]; | |
1612 this.deserializedObjects.push(result); | |
1613 t1 = this.deserializeArrayInPlace$1(result); | |
1614 t1.$builtinTypeInfo = [null]; | |
1615 return t1; | |
1616 case "mutable": | |
1617 if (1 >= x.length) | |
1618 return H.ioore(x, 1); | |
1619 result = x[1]; | |
1620 this.deserializedObjects.push(result); | |
1621 return this.deserializeArrayInPlace$1(result); | |
1622 case "const": | |
1623 if (1 >= x.length) | |
1624 return H.ioore(x, 1); | |
1625 result = x[1]; | |
1626 this.deserializedObjects.push(result); | |
1627 t1 = this.deserializeArrayInPlace$1(result); | |
1628 t1.$builtinTypeInfo = [null]; | |
1629 t1.fixed$length = Array; | |
1630 return t1; | |
1631 case "map": | |
1632 return this.deserializeMap$1(x); | |
1633 case "sendport": | |
1634 return this.deserializeSendPort$1(x); | |
1635 case "raw sendport": | |
1636 if (1 >= x.length) | |
1637 return H.ioore(x, 1); | |
1638 result = x[1]; | |
1639 this.deserializedObjects.push(result); | |
1640 return result; | |
1641 case "js-object": | |
1642 return this.deserializeJSObject$1(x); | |
1643 case "function": | |
1644 if (1 >= x.length) | |
1645 return H.ioore(x, 1); | |
1646 result = init.globalFunctions[x[1]](); | |
1647 this.deserializedObjects.push(result); | |
1648 return result; | |
1649 case "dart": | |
1650 t1 = x.length; | |
1651 if (1 >= t1) | |
1652 return H.ioore(x, 1); | |
1653 classId = x[1]; | |
1654 if (2 >= t1) | |
1655 return H.ioore(x, 2); | |
1656 fields = x[2]; | |
1657 emptyInstance = init.instanceFromClassId(classId); | |
1658 this.deserializedObjects.push(emptyInstance); | |
1659 this.deserializeArrayInPlace$1(fields); | |
1660 return init.initializeEmptyInstance(classId, emptyInstance, fields); | |
1661 default: | |
1662 throw H.wrapException("couldn't deserialize: " + H.S(x)); | |
1663 } | |
1664 }, "call$1", "get$deserialize", 2, 0, 2], | |
1665 deserializeArrayInPlace$1: function(x) { | |
1666 var t1, i, t2; | |
1667 t1 = J.getInterceptor$as(x); | |
1668 i = 0; | |
1669 while (true) { | |
1670 t2 = t1.get$length(x); | |
1671 if (typeof t2 !== "number") | |
1672 return H.iae(t2); | |
1673 if (!(i < t2)) | |
1674 break; | |
1675 t1.$indexSet(x, i, this.deserialize$1(t1.$index(x, i))); | |
1676 ++i; | |
1677 } | |
1678 return x; | |
1679 }, | |
1680 deserializeMap$1: function(x) { | |
1681 var t1, keys, values, result, t2, i; | |
1682 t1 = x.length; | |
1683 if (1 >= t1) | |
1684 return H.ioore(x, 1); | |
1685 keys = x[1]; | |
1686 if (2 >= t1) | |
1687 return H.ioore(x, 2); | |
1688 values = x[2]; | |
1689 result = P.LinkedHashMap__makeEmpty(); | |
1690 this.deserializedObjects.push(result); | |
1691 keys = J.map$1$a(keys, this.get$deserialize()).toList$0(0); | |
1692 for (t1 = J.getInterceptor$as(keys), t2 = J.getInterceptor$as(values), i =
0; i < t1.get$length(keys); ++i) { | |
1693 if (i >= keys.length) | |
1694 return H.ioore(keys, i); | |
1695 result.$indexSet(0, keys[i], this.deserialize$1(t2.$index(values, i))); | |
1696 } | |
1697 return result; | |
1698 }, | |
1699 deserializeSendPort$1: function(x) { | |
1700 var t1, managerId, isolateId, receivePortId, isolate, receivePort, result; | |
1701 t1 = x.length; | |
1702 if (1 >= t1) | |
1703 return H.ioore(x, 1); | |
1704 managerId = x[1]; | |
1705 if (2 >= t1) | |
1706 return H.ioore(x, 2); | |
1707 isolateId = x[2]; | |
1708 if (3 >= t1) | |
1709 return H.ioore(x, 3); | |
1710 receivePortId = x[3]; | |
1711 if (J.$eq(managerId, init.globalState.currentManagerId)) { | |
1712 isolate = init.globalState.isolates.$index(0, isolateId); | |
1713 if (isolate == null) | |
1714 return; | |
1715 receivePort = isolate.lookup$1(receivePortId); | |
1716 if (receivePort == null) | |
1717 return; | |
1718 result = new H._NativeJsSendPort(receivePort, isolateId); | |
1719 } else | |
1720 result = new H._WorkerSendPort(managerId, receivePortId, isolateId); | |
1721 this.deserializedObjects.push(result); | |
1722 return result; | |
1723 }, | |
1724 deserializeJSObject$1: function(x) { | |
1725 var t1, keys, values, o, t2, i, t3; | |
1726 t1 = x.length; | |
1727 if (1 >= t1) | |
1728 return H.ioore(x, 1); | |
1729 keys = x[1]; | |
1730 if (2 >= t1) | |
1731 return H.ioore(x, 2); | |
1732 values = x[2]; | |
1733 o = {}; | |
1734 this.deserializedObjects.push(o); | |
1735 t1 = J.getInterceptor$as(keys); | |
1736 t2 = J.getInterceptor$as(values); | |
1737 i = 0; | |
1738 while (true) { | |
1739 t3 = t1.get$length(keys); | |
1740 if (typeof t3 !== "number") | |
1741 return H.iae(t3); | |
1742 if (!(i < t3)) | |
1743 break; | |
1744 o[t1.$index(keys, i)] = this.deserialize$1(t2.$index(values, i)); | |
1745 ++i; | |
1746 } | |
1747 return o; | |
1748 } | |
1749 } | |
1750 }], ["_js_helper", "dart:_js_helper",, H, { | |
1751 "^": "", | |
1752 getType: function(index) { | |
1753 return init.types[index]; | |
1754 }, | |
1755 S: function(value) { | |
1756 var res; | |
1757 if (typeof value === "string") | |
1758 return value; | |
1759 if (typeof value === "number") { | |
1760 if (value !== 0) | |
1761 return "" + value; | |
1762 } else if (true === value) | |
1763 return "true"; | |
1764 else if (false === value) | |
1765 return "false"; | |
1766 else if (value == null) | |
1767 return "null"; | |
1768 res = J.toString$0(value); | |
1769 if (typeof res !== "string") | |
1770 throw H.wrapException(H._argumentError(value)); | |
1771 return res; | |
1772 }, | |
1773 Primitives_objectHashCode: function(object) { | |
1774 var hash = object.$identityHash; | |
1775 if (hash == null) { | |
1776 hash = Math.random() * 0x3fffffff | 0; | |
1777 object.$identityHash = hash; | |
1778 } | |
1779 return hash; | |
1780 }, | |
1781 Primitives_objectTypeName: function(object) { | |
1782 var $name, decompiled; | |
1783 $name = C.JS_CONST_8ZY(J.getInterceptor(object)); | |
1784 if ($name === "Object") { | |
1785 decompiled = String(object.constructor).match(/^\s*function\s*([\w$]*)\s*\
(/)[1]; | |
1786 if (typeof decompiled === "string") | |
1787 $name = /^\w+$/.test(decompiled) ? decompiled : $name; | |
1788 } | |
1789 if ($name.length > 1 && C.JSString_methods.codeUnitAt$1($name, 0) === 36) | |
1790 $name = C.JSString_methods.substring$1($name, 1); | |
1791 return ($name + H.joinArguments(H.getRuntimeTypeInfo(object), 0, null)).repl
ace(/[^<,> ]+/g, function(m) { | |
1792 return init.mangledGlobalNames[m] || m; | |
1793 }); | |
1794 }, | |
1795 Primitives_objectToString: function(object) { | |
1796 return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; | |
1797 }, | |
1798 Primitives_getProperty: function(object, key) { | |
1799 if (object == null || typeof object === "boolean" || typeof object === "numb
er" || typeof object === "string") | |
1800 throw H.wrapException(H._argumentError(object)); | |
1801 return object[key]; | |
1802 }, | |
1803 Primitives_setProperty: function(object, key, value) { | |
1804 if (object == null || typeof object === "boolean" || typeof object === "numb
er" || typeof object === "string") | |
1805 throw H.wrapException(H._argumentError(object)); | |
1806 object[key] = value; | |
1807 }, | |
1808 iae: function(argument) { | |
1809 throw H.wrapException(H._argumentError(argument)); | |
1810 }, | |
1811 ioore: function(receiver, index) { | |
1812 if (receiver == null) | |
1813 J.get$length$as(receiver); | |
1814 if (typeof index !== "number" || Math.floor(index) !== index) | |
1815 H.iae(index); | |
1816 throw H.wrapException(P.RangeError$value(index, null, null)); | |
1817 }, | |
1818 _argumentError: function(object) { | |
1819 return new P.ArgumentError(true, object, null, null); | |
1820 }, | |
1821 checkInt: function(value) { | |
1822 if (typeof value !== "number" || Math.floor(value) !== value) | |
1823 throw H.wrapException(H._argumentError(value)); | |
1824 return value; | |
1825 }, | |
1826 wrapException: function(ex) { | |
1827 var wrapper; | |
1828 if (ex == null) | |
1829 ex = new P.NullThrownError(); | |
1830 wrapper = new Error(); | |
1831 wrapper.dartException = ex; | |
1832 if ("defineProperty" in Object) { | |
1833 Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); | |
1834 wrapper.name = ""; | |
1835 } else | |
1836 wrapper.toString = H.toStringWrapper; | |
1837 return wrapper; | |
1838 }, | |
1839 toStringWrapper: function() { | |
1840 return J.toString$0(this.dartException); | |
1841 }, | |
1842 throwExpression: function(ex) { | |
1843 throw H.wrapException(ex); | |
1844 }, | |
1845 unwrapException: function(ex) { | |
1846 var t1, message, number, ieErrorCode, t2, t3, t4, nullLiteralCall, t5, t6, t
7, t8, t9, match; | |
1847 t1 = new H.unwrapException_saveStackTrace(ex); | |
1848 if (ex == null) | |
1849 return; | |
1850 if (ex instanceof H.ExceptionAndStackTrace) | |
1851 return t1.call$1(ex.dartException); | |
1852 if (typeof ex !== "object") | |
1853 return ex; | |
1854 if ("dartException" in ex) | |
1855 return t1.call$1(ex.dartException); | |
1856 else if (!("message" in ex)) | |
1857 return ex; | |
1858 message = ex.message; | |
1859 if ("number" in ex && typeof ex.number == "number") { | |
1860 number = ex.number; | |
1861 ieErrorCode = number & 65535; | |
1862 if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) | |
1863 switch (ieErrorCode) { | |
1864 case 438: | |
1865 return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " +
ieErrorCode + ")", null)); | |
1866 case 445: | |
1867 case 5007: | |
1868 t2 = H.S(message) + " (Error " + ieErrorCode + ")"; | |
1869 return t1.call$1(new H.NullError(t2, null)); | |
1870 } | |
1871 } | |
1872 if (ex instanceof TypeError) { | |
1873 t2 = $.get$TypeErrorDecoder_noSuchMethodPattern(); | |
1874 t3 = $.get$TypeErrorDecoder_notClosurePattern(); | |
1875 t4 = $.get$TypeErrorDecoder_nullCallPattern(); | |
1876 nullLiteralCall = $.get$TypeErrorDecoder_nullLiteralCallPattern(); | |
1877 t5 = $.get$TypeErrorDecoder_undefinedCallPattern(); | |
1878 t6 = $.get$TypeErrorDecoder_undefinedLiteralCallPattern(); | |
1879 t7 = $.get$TypeErrorDecoder_nullPropertyPattern(); | |
1880 $.get$TypeErrorDecoder_nullLiteralPropertyPattern(); | |
1881 t8 = $.get$TypeErrorDecoder_undefinedPropertyPattern(); | |
1882 t9 = $.get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); | |
1883 match = t2.matchTypeError$1(message); | |
1884 if (match != null) | |
1885 return t1.call$1(H.JsNoSuchMethodError$(message, match)); | |
1886 else { | |
1887 match = t3.matchTypeError$1(message); | |
1888 if (match != null) { | |
1889 match.method = "call"; | |
1890 return t1.call$1(H.JsNoSuchMethodError$(message, match)); | |
1891 } else { | |
1892 match = t4.matchTypeError$1(message); | |
1893 if (match == null) { | |
1894 match = nullLiteralCall.matchTypeError$1(message); | |
1895 if (match == null) { | |
1896 match = t5.matchTypeError$1(message); | |
1897 if (match == null) { | |
1898 match = t6.matchTypeError$1(message); | |
1899 if (match == null) { | |
1900 match = t7.matchTypeError$1(message); | |
1901 if (match == null) { | |
1902 match = nullLiteralCall.matchTypeError$1(message); | |
1903 if (match == null) { | |
1904 match = t8.matchTypeError$1(message); | |
1905 if (match == null) { | |
1906 match = t9.matchTypeError$1(message); | |
1907 t2 = match != null; | |
1908 } else | |
1909 t2 = true; | |
1910 } else | |
1911 t2 = true; | |
1912 } else | |
1913 t2 = true; | |
1914 } else | |
1915 t2 = true; | |
1916 } else | |
1917 t2 = true; | |
1918 } else | |
1919 t2 = true; | |
1920 } else | |
1921 t2 = true; | |
1922 if (t2) | |
1923 return t1.call$1(new H.NullError(message, match == null ? null : mat
ch.method)); | |
1924 } | |
1925 } | |
1926 return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? me
ssage : "")); | |
1927 } | |
1928 if (ex instanceof RangeError) { | |
1929 if (typeof message === "string" && message.indexOf("call stack") !== -1) | |
1930 return new P.StackOverflowError(); | |
1931 return t1.call$1(new P.ArgumentError(false, null, null, null)); | |
1932 } | |
1933 if (typeof InternalError == "function" && ex instanceof InternalError) | |
1934 if (typeof message === "string" && message === "too much recursion") | |
1935 return new P.StackOverflowError(); | |
1936 return ex; | |
1937 }, | |
1938 getTraceFromException: function(exception) { | |
1939 if (exception instanceof H.ExceptionAndStackTrace) | |
1940 return exception.stackTrace; | |
1941 return new H._StackTrace(exception, null); | |
1942 }, | |
1943 objectHashCode: function(object) { | |
1944 if (object == null || typeof object != 'object') | |
1945 return J.get$hashCode$(object); | |
1946 else | |
1947 return H.Primitives_objectHashCode(object); | |
1948 }, | |
1949 fillLiteralMap: function(keyValuePairs, result) { | |
1950 var $length, index, index0, index1; | |
1951 $length = keyValuePairs.length; | |
1952 for (index = 0; index < $length; index = index1) { | |
1953 index0 = index + 1; | |
1954 index1 = index0 + 1; | |
1955 result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); | |
1956 } | |
1957 return result; | |
1958 }, | |
1959 invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3,
arg4) { | |
1960 var t1 = J.getInterceptor(numberOfArguments); | |
1961 if (t1.$eq(numberOfArguments, 0)) | |
1962 return H._callInIsolate(isolate, new H.invokeClosure_closure(closure)); | |
1963 else if (t1.$eq(numberOfArguments, 1)) | |
1964 return H._callInIsolate(isolate, new H.invokeClosure_closure0(closure, arg
1)); | |
1965 else if (t1.$eq(numberOfArguments, 2)) | |
1966 return H._callInIsolate(isolate, new H.invokeClosure_closure1(closure, arg
1, arg2)); | |
1967 else if (t1.$eq(numberOfArguments, 3)) | |
1968 return H._callInIsolate(isolate, new H.invokeClosure_closure2(closure, arg
1, arg2, arg3)); | |
1969 else if (t1.$eq(numberOfArguments, 4)) | |
1970 return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg
1, arg2, arg3, arg4)); | |
1971 else | |
1972 throw H.wrapException(P.Exception_Exception("Unsupported number of argumen
ts for wrapped closure")); | |
1973 }, | |
1974 convertDartClosureToJS: function(closure, arity) { | |
1975 var $function = closure.$identity; | |
1976 if (!!$function) | |
1977 return $function; | |
1978 $function = function(closure, arity, context, invoke) { | |
1979 return function(a1, a2, a3, a4) { | |
1980 return invoke(closure, context, arity, a1, a2, a3, a4); | |
1981 }; | |
1982 }(closure, arity, init.globalState.currentContext, H.invokeClosure); | |
1983 closure.$identity = $function; | |
1984 return $function; | |
1985 }, | |
1986 Closure_fromTearOff: function(receiver, functions, reflectionInfo, isStatic, j
sArguments, propertyName) { | |
1987 var $function, callName, functionType, $prototype, $constructor, t1, isInter
cepted, trampoline, signatureFunction, getReceiver, i, stub, stubCallName, t2; | |
1988 $function = functions[0]; | |
1989 callName = $function.$callName; | |
1990 if (!!J.getInterceptor(reflectionInfo).$isList) { | |
1991 $function.$reflectionInfo = reflectionInfo; | |
1992 functionType = H.ReflectionInfo_ReflectionInfo($function).functionType; | |
1993 } else | |
1994 functionType = reflectionInfo; | |
1995 $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prot
otype) : Object.create(new H.BoundClosure(null, null, null, null).constructor.pr
ototype); | |
1996 $prototype.$initialize = $prototype.constructor; | |
1997 if (isStatic) | |
1998 $constructor = function() { | |
1999 this.$initialize(); | |
2000 }; | |
2001 else { | |
2002 t1 = $.Closure_functionCounter; | |
2003 $.Closure_functionCounter = J.$add$ns(t1, 1); | |
2004 t1 = new Function("a,b,c,d", "this.$initialize(a,b,c,d);" + t1); | |
2005 $constructor = t1; | |
2006 } | |
2007 $prototype.constructor = $constructor; | |
2008 $constructor.prototype = $prototype; | |
2009 t1 = !isStatic; | |
2010 if (t1) { | |
2011 isIntercepted = jsArguments.length == 1 && true; | |
2012 trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); | |
2013 trampoline.$reflectionInfo = reflectionInfo; | |
2014 } else { | |
2015 $prototype.$name = propertyName; | |
2016 trampoline = $function; | |
2017 isIntercepted = false; | |
2018 } | |
2019 if (typeof functionType == "number") | |
2020 signatureFunction = function(t) { | |
2021 return function() { | |
2022 return H.getType(t); | |
2023 }; | |
2024 }(functionType); | |
2025 else if (t1 && typeof functionType == "function") { | |
2026 getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_s
elfOf; | |
2027 signatureFunction = function(f, r) { | |
2028 return function() { | |
2029 return f.apply({$receiver: r(this)}, arguments); | |
2030 }; | |
2031 }(functionType, getReceiver); | |
2032 } else | |
2033 throw H.wrapException("Error in reflectionInfo."); | |
2034 $prototype.$signature = signatureFunction; | |
2035 $prototype[callName] = trampoline; | |
2036 for (t1 = functions.length, i = 1; i < t1; ++i) { | |
2037 stub = functions[i]; | |
2038 stubCallName = stub.$callName; | |
2039 if (stubCallName != null) { | |
2040 t2 = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isInterce
pted); | |
2041 $prototype[stubCallName] = t2; | |
2042 } | |
2043 } | |
2044 $prototype["call*"] = trampoline; | |
2045 $prototype.$requiredArgCount = $function.$requiredArgCount; | |
2046 $prototype.$defaultValues = $function.$defaultValues; | |
2047 return $constructor; | |
2048 }, | |
2049 Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { | |
2050 var getSelf = H.BoundClosure_selfOf; | |
2051 switch (isSuperCall ? -1 : arity) { | |
2052 case 0: | |
2053 return function(n, S) { | |
2054 return function() { | |
2055 return S(this)[n](); | |
2056 }; | |
2057 }(stubName, getSelf); | |
2058 case 1: | |
2059 return function(n, S) { | |
2060 return function(a) { | |
2061 return S(this)[n](a); | |
2062 }; | |
2063 }(stubName, getSelf); | |
2064 case 2: | |
2065 return function(n, S) { | |
2066 return function(a, b) { | |
2067 return S(this)[n](a, b); | |
2068 }; | |
2069 }(stubName, getSelf); | |
2070 case 3: | |
2071 return function(n, S) { | |
2072 return function(a, b, c) { | |
2073 return S(this)[n](a, b, c); | |
2074 }; | |
2075 }(stubName, getSelf); | |
2076 case 4: | |
2077 return function(n, S) { | |
2078 return function(a, b, c, d) { | |
2079 return S(this)[n](a, b, c, d); | |
2080 }; | |
2081 }(stubName, getSelf); | |
2082 case 5: | |
2083 return function(n, S) { | |
2084 return function(a, b, c, d, e) { | |
2085 return S(this)[n](a, b, c, d, e); | |
2086 }; | |
2087 }(stubName, getSelf); | |
2088 default: | |
2089 return function(f, s) { | |
2090 return function() { | |
2091 return f.apply(s(this), arguments); | |
2092 }; | |
2093 }($function, getSelf); | |
2094 } | |
2095 }, | |
2096 Closure_forwardCallTo: function(receiver, $function, isIntercepted) { | |
2097 var stubName, arity, lookedUpFunction, t1, t2, $arguments; | |
2098 if (isIntercepted) | |
2099 return H.Closure_forwardInterceptedCallTo(receiver, $function); | |
2100 stubName = $function.$stubName; | |
2101 arity = $function.length; | |
2102 lookedUpFunction = receiver[stubName]; | |
2103 t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFu
nction; | |
2104 t2 = !t1 || arity >= 27; | |
2105 if (t2) | |
2106 return H.Closure_cspForwardCall(arity, !t1, stubName, $function); | |
2107 if (arity === 0) { | |
2108 t1 = $.BoundClosure_selfFieldNameCache; | |
2109 if (t1 == null) { | |
2110 t1 = H.BoundClosure_computeFieldNamed("self"); | |
2111 $.BoundClosure_selfFieldNameCache = t1; | |
2112 } | |
2113 t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(
);"; | |
2114 t2 = $.Closure_functionCounter; | |
2115 $.Closure_functionCounter = J.$add$ns(t2, 1); | |
2116 return new Function(t1 + H.S(t2) + "}")(); | |
2117 } | |
2118 $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",
"); | |
2119 t1 = "return function(" + $arguments + "){return this."; | |
2120 t2 = $.BoundClosure_selfFieldNameCache; | |
2121 if (t2 == null) { | |
2122 t2 = H.BoundClosure_computeFieldNamed("self"); | |
2123 $.BoundClosure_selfFieldNameCache = t2; | |
2124 } | |
2125 t2 = t1 + H.S(t2) + "." + H.S(stubName) + "(" + $arguments + ");"; | |
2126 t1 = $.Closure_functionCounter; | |
2127 $.Closure_functionCounter = J.$add$ns(t1, 1); | |
2128 return new Function(t2 + H.S(t1) + "}")(); | |
2129 }, | |
2130 Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $functi
on) { | |
2131 var getSelf, getReceiver; | |
2132 getSelf = H.BoundClosure_selfOf; | |
2133 getReceiver = H.BoundClosure_receiverOf; | |
2134 switch (isSuperCall ? -1 : arity) { | |
2135 case 0: | |
2136 throw H.wrapException(new H.RuntimeError("Intercepted function with no a
rguments.")); | |
2137 case 1: | |
2138 return function(n, s, r) { | |
2139 return function() { | |
2140 return s(this)[n](r(this)); | |
2141 }; | |
2142 }($name, getSelf, getReceiver); | |
2143 case 2: | |
2144 return function(n, s, r) { | |
2145 return function(a) { | |
2146 return s(this)[n](r(this), a); | |
2147 }; | |
2148 }($name, getSelf, getReceiver); | |
2149 case 3: | |
2150 return function(n, s, r) { | |
2151 return function(a, b) { | |
2152 return s(this)[n](r(this), a, b); | |
2153 }; | |
2154 }($name, getSelf, getReceiver); | |
2155 case 4: | |
2156 return function(n, s, r) { | |
2157 return function(a, b, c) { | |
2158 return s(this)[n](r(this), a, b, c); | |
2159 }; | |
2160 }($name, getSelf, getReceiver); | |
2161 case 5: | |
2162 return function(n, s, r) { | |
2163 return function(a, b, c, d) { | |
2164 return s(this)[n](r(this), a, b, c, d); | |
2165 }; | |
2166 }($name, getSelf, getReceiver); | |
2167 case 6: | |
2168 return function(n, s, r) { | |
2169 return function(a, b, c, d, e) { | |
2170 return s(this)[n](r(this), a, b, c, d, e); | |
2171 }; | |
2172 }($name, getSelf, getReceiver); | |
2173 default: | |
2174 return function(f, s, r, a) { | |
2175 return function() { | |
2176 a = [r(this)]; | |
2177 Array.prototype.push.apply(a, arguments); | |
2178 return f.apply(s(this), a); | |
2179 }; | |
2180 }($function, getSelf, getReceiver); | |
2181 } | |
2182 }, | |
2183 Closure_forwardInterceptedCallTo: function(receiver, $function) { | |
2184 var selfField, t1, stubName, arity, lookedUpFunction, t2, t3, $arguments; | |
2185 selfField = H.BoundClosure_selfFieldName(); | |
2186 t1 = $.BoundClosure_receiverFieldNameCache; | |
2187 if (t1 == null) { | |
2188 t1 = H.BoundClosure_computeFieldNamed("receiver"); | |
2189 $.BoundClosure_receiverFieldNameCache = t1; | |
2190 } | |
2191 stubName = $function.$stubName; | |
2192 arity = $function.length; | |
2193 lookedUpFunction = receiver[stubName]; | |
2194 t2 = $function == null ? lookedUpFunction == null : $function === lookedUpFu
nction; | |
2195 t3 = !t2 || arity >= 28; | |
2196 if (t3) | |
2197 return H.Closure_cspForwardInterceptedCall(arity, !t2, stubName, $function
); | |
2198 if (arity === 1) { | |
2199 t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubNam
e) + "(this." + H.S(t1) + ");"; | |
2200 t2 = $.Closure_functionCounter; | |
2201 $.Closure_functionCounter = J.$add$ns(t2, 1); | |
2202 return new Function(t1 + H.S(t2) + "}")(); | |
2203 } | |
2204 $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).joi
n(","); | |
2205 t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "
." + H.S(stubName) + "(this." + H.S(t1) + ", " + $arguments + ");"; | |
2206 t2 = $.Closure_functionCounter; | |
2207 $.Closure_functionCounter = J.$add$ns(t2, 1); | |
2208 return new Function(t1 + H.S(t2) + "}")(); | |
2209 }, | |
2210 closureFromTearOff: function(receiver, functions, reflectionInfo, isStatic, js
Arguments, $name) { | |
2211 var t1; | |
2212 functions.fixed$length = Array; | |
2213 if (!!J.getInterceptor(reflectionInfo).$isList) { | |
2214 reflectionInfo.fixed$length = Array; | |
2215 t1 = reflectionInfo; | |
2216 } else | |
2217 t1 = reflectionInfo; | |
2218 return H.Closure_fromTearOff(receiver, functions, t1, !!isStatic, jsArgument
s, $name); | |
2219 }, | |
2220 throwCyclicInit: function(staticName) { | |
2221 throw H.wrapException(new P.CyclicInitializationError("Cyclic initialization
for static " + H.S(staticName))); | |
2222 }, | |
2223 buildFunctionType: function(returnType, parameterTypes, optionalParameterTypes
) { | |
2224 return new H.RuntimeFunctionType(returnType, parameterTypes, optionalParamet
erTypes, null); | |
2225 }, | |
2226 getDynamicRuntimeType: function() { | |
2227 return C.C_DynamicRuntimeType; | |
2228 }, | |
2229 random64: function() { | |
2230 return (Math.random() * 0x100000000 >>> 0) + (Math.random() * 0x100000000 >>
> 0) * 4294967296; | |
2231 }, | |
2232 asyncHelper: function(object, bodyFunctionOrErrorCode, completer) { | |
2233 var future; | |
2234 if (bodyFunctionOrErrorCode === 0) { | |
2235 completer.complete$1(object); | |
2236 return; | |
2237 } else if (bodyFunctionOrErrorCode === 1) { | |
2238 completer.completeError$2(H.unwrapException(object), H.getTraceFromExcepti
on(object)); | |
2239 return; | |
2240 } | |
2241 if (!!J.getInterceptor(object).$isFuture) | |
2242 future = object; | |
2243 else { | |
2244 future = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [nu
ll]); | |
2245 future._asyncComplete$1(object); | |
2246 } | |
2247 future.then$2$onError(H._wrapJsFunctionForAsync(bodyFunctionOrErrorCode, 0),
new H.asyncHelper_closure(bodyFunctionOrErrorCode)); | |
2248 return completer.get$future(); | |
2249 }, | |
2250 _wrapJsFunctionForAsync: function($function, errorCode) { | |
2251 return new H._wrapJsFunctionForAsync_closure(errorCode, function(errorCode,
result) { | |
2252 while (true) | |
2253 try { | |
2254 $function(errorCode, result); | |
2255 break; | |
2256 } catch (error) { | |
2257 result = error; | |
2258 errorCode = 1; | |
2259 } | |
2260 }); | |
2261 }, | |
2262 setRuntimeTypeInfo: function(target, typeInfo) { | |
2263 if (target != null) | |
2264 target.$builtinTypeInfo = typeInfo; | |
2265 return target; | |
2266 }, | |
2267 getRuntimeTypeInfo: function(target) { | |
2268 if (target == null) | |
2269 return; | |
2270 return target.$builtinTypeInfo; | |
2271 }, | |
2272 getRuntimeTypeArguments: function(target, substitutionName) { | |
2273 return H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeI
nfo(target)); | |
2274 }, | |
2275 getRuntimeTypeArgument: function(target, substitutionName, index) { | |
2276 var $arguments = H.getRuntimeTypeArguments(target, substitutionName); | |
2277 return $arguments == null ? null : $arguments[index]; | |
2278 }, | |
2279 getTypeArgumentByIndex: function(target, index) { | |
2280 var rti = H.getRuntimeTypeInfo(target); | |
2281 return rti == null ? null : rti[index]; | |
2282 }, | |
2283 runtimeTypeToString: function(type, onTypeVariable) { | |
2284 if (type == null) | |
2285 return "dynamic"; | |
2286 else if (typeof type === "object" && type !== null && type.constructor === A
rray) | |
2287 return type[0].builtin$cls + H.joinArguments(type, 1, onTypeVariable); | |
2288 else if (typeof type == "function") | |
2289 return type.builtin$cls; | |
2290 else if (typeof type === "number" && Math.floor(type) === type) | |
2291 return C.JSInt_methods.toString$0(type); | |
2292 else | |
2293 return; | |
2294 }, | |
2295 joinArguments: function(types, startIndex, onTypeVariable) { | |
2296 var buffer, index, firstArgument, allDynamic, t1, argument; | |
2297 if (types == null) | |
2298 return ""; | |
2299 buffer = new P.StringBuffer(""); | |
2300 for (index = startIndex, firstArgument = true, allDynamic = true, t1 = ""; i
ndex < types.length; ++index) { | |
2301 if (firstArgument) | |
2302 firstArgument = false; | |
2303 else | |
2304 buffer._contents = t1 + ", "; | |
2305 argument = types[index]; | |
2306 if (argument != null) | |
2307 allDynamic = false; | |
2308 t1 = buffer._contents += H.S(H.runtimeTypeToString(argument, onTypeVariabl
e)); | |
2309 } | |
2310 return allDynamic ? "" : "<" + H.S(buffer) + ">"; | |
2311 }, | |
2312 substitute: function(substitution, $arguments) { | |
2313 if (typeof substitution == "function") { | |
2314 substitution = H.invokeOn(substitution, null, $arguments); | |
2315 if (substitution == null || typeof substitution === "object" && substituti
on !== null && substitution.constructor === Array) | |
2316 $arguments = substitution; | |
2317 else if (typeof substitution == "function") | |
2318 $arguments = H.invokeOn(substitution, null, $arguments); | |
2319 } | |
2320 return $arguments; | |
2321 }, | |
2322 areSubtypes: function(s, t) { | |
2323 var len, i; | |
2324 if (s == null || t == null) | |
2325 return true; | |
2326 len = s.length; | |
2327 for (i = 0; i < len; ++i) | |
2328 if (!H.isSubtype(s[i], t[i])) | |
2329 return false; | |
2330 return true; | |
2331 }, | |
2332 computeSignature: function(signature, context, contextName) { | |
2333 return H.invokeOn(signature, context, H.getRuntimeTypeArguments(context, con
textName)); | |
2334 }, | |
2335 isSubtype: function(s, t) { | |
2336 var t1, typeOfS, t2, typeOfT, substitution; | |
2337 if (s === t) | |
2338 return true; | |
2339 if (s == null || t == null) | |
2340 return true; | |
2341 if ('func' in t) | |
2342 return H.isFunctionSubtype(s, t); | |
2343 if ('func' in s) | |
2344 return t.builtin$cls === "Function"; | |
2345 t1 = typeof s === "object" && s !== null && s.constructor === Array; | |
2346 typeOfS = t1 ? s[0] : s; | |
2347 t2 = typeof t === "object" && t !== null && t.constructor === Array; | |
2348 typeOfT = t2 ? t[0] : t; | |
2349 if (typeOfT !== typeOfS) { | |
2350 if (!('$is' + H.runtimeTypeToString(typeOfT, null) in typeOfS.prototype)) | |
2351 return false; | |
2352 substitution = typeOfS.prototype["$as" + H.S(H.runtimeTypeToString(typeOfT
, null))]; | |
2353 } else | |
2354 substitution = null; | |
2355 if (!t1 && substitution == null || !t2) | |
2356 return true; | |
2357 t1 = t1 ? s.slice(1) : null; | |
2358 t2 = t2 ? t.slice(1) : null; | |
2359 return H.areSubtypes(H.substitute(substitution, t1), t2); | |
2360 }, | |
2361 areAssignable: function(s, t, allowShorter) { | |
2362 var t1, sLength, tLength, i, t2; | |
2363 t1 = t == null; | |
2364 if (t1 && s == null) | |
2365 return true; | |
2366 if (t1) | |
2367 return allowShorter; | |
2368 if (s == null) | |
2369 return false; | |
2370 sLength = s.length; | |
2371 tLength = t.length; | |
2372 if (allowShorter) { | |
2373 if (sLength < tLength) | |
2374 return false; | |
2375 } else if (sLength !== tLength) | |
2376 return false; | |
2377 for (i = 0; i < tLength; ++i) { | |
2378 t1 = s[i]; | |
2379 t2 = t[i]; | |
2380 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) | |
2381 return false; | |
2382 } | |
2383 return true; | |
2384 }, | |
2385 areAssignableMaps: function(s, t) { | |
2386 var t1, names, i, $name, tType, sType; | |
2387 if (t == null) | |
2388 return true; | |
2389 if (s == null) | |
2390 return false; | |
2391 t1 = Object.getOwnPropertyNames(t); | |
2392 t1.fixed$length = Array; | |
2393 names = t1; | |
2394 for (t1 = names.length, i = 0; i < t1; ++i) { | |
2395 $name = names[i]; | |
2396 if (!Object.hasOwnProperty.call(s, $name)) | |
2397 return false; | |
2398 tType = t[$name]; | |
2399 sType = s[$name]; | |
2400 if (!(H.isSubtype(tType, sType) || H.isSubtype(sType, tType))) | |
2401 return false; | |
2402 } | |
2403 return true; | |
2404 }, | |
2405 isFunctionSubtype: function(s, t) { | |
2406 var sReturnType, tReturnType, sParameterTypes, tParameterTypes, sOptionalPar
ameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalP
arametersLen, tOptionalParametersLen, pos, t1, t2, tPos, sPos; | |
2407 if (!('func' in s)) | |
2408 return false; | |
2409 if ("void" in s) { | |
2410 if (!("void" in t) && "ret" in t) | |
2411 return false; | |
2412 } else if (!("void" in t)) { | |
2413 sReturnType = s.ret; | |
2414 tReturnType = t.ret; | |
2415 if (!(H.isSubtype(sReturnType, tReturnType) || H.isSubtype(tReturnType, sR
eturnType))) | |
2416 return false; | |
2417 } | |
2418 sParameterTypes = s.args; | |
2419 tParameterTypes = t.args; | |
2420 sOptionalParameterTypes = s.opt; | |
2421 tOptionalParameterTypes = t.opt; | |
2422 sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0; | |
2423 tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0; | |
2424 sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParamete
rTypes.length : 0; | |
2425 tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParamete
rTypes.length : 0; | |
2426 if (sParametersLen > tParametersLen) | |
2427 return false; | |
2428 if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalPara
metersLen) | |
2429 return false; | |
2430 if (sParametersLen === tParametersLen) { | |
2431 if (!H.areAssignable(sParameterTypes, tParameterTypes, false)) | |
2432 return false; | |
2433 if (!H.areAssignable(sOptionalParameterTypes, tOptionalParameterTypes, tru
e)) | |
2434 return false; | |
2435 } else { | |
2436 for (pos = 0; pos < sParametersLen; ++pos) { | |
2437 t1 = sParameterTypes[pos]; | |
2438 t2 = tParameterTypes[pos]; | |
2439 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) | |
2440 return false; | |
2441 } | |
2442 for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) { | |
2443 t1 = sOptionalParameterTypes[sPos]; | |
2444 t2 = tParameterTypes[tPos]; | |
2445 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) | |
2446 return false; | |
2447 } | |
2448 for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) { | |
2449 t1 = sOptionalParameterTypes[sPos]; | |
2450 t2 = tOptionalParameterTypes[tPos]; | |
2451 if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) | |
2452 return false; | |
2453 } | |
2454 } | |
2455 return H.areAssignableMaps(s.named, t.named); | |
2456 }, | |
2457 invokeOn: function($function, receiver, $arguments) { | |
2458 return $function.apply(receiver, $arguments); | |
2459 }, | |
2460 ReflectionInfo: { | |
2461 "^": "Object;jsFunction,data,isAccessor,requiredParameterCount,optionalParam
eterCount,areOptionalParametersNamed,functionType,cachedSortedIndices", | |
2462 static: {ReflectionInfo_ReflectionInfo: function(jsFunction) { | |
2463 var data, requiredParametersInfo, optionalParametersInfo; | |
2464 data = jsFunction.$reflectionInfo; | |
2465 if (data == null) | |
2466 return; | |
2467 data.fixed$length = Array; | |
2468 data = data; | |
2469 requiredParametersInfo = data[0]; | |
2470 optionalParametersInfo = data[1]; | |
2471 return new H.ReflectionInfo(jsFunction, data, (requiredParametersInfo &
1) === 1, requiredParametersInfo >> 1, optionalParametersInfo >> 1, (optionalPar
ametersInfo & 1) === 1, data[2], null); | |
2472 }} | |
2473 }, | |
2474 TypeErrorDecoder: { | |
2475 "^": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver", | |
2476 matchTypeError$1: function(message) { | |
2477 var match, result, t1; | |
2478 match = new RegExp(this._pattern).exec(message); | |
2479 if (match == null) | |
2480 return; | |
2481 result = Object.create(null); | |
2482 t1 = this._arguments; | |
2483 if (t1 !== -1) | |
2484 result.arguments = match[t1 + 1]; | |
2485 t1 = this._argumentsExpr; | |
2486 if (t1 !== -1) | |
2487 result.argumentsExpr = match[t1 + 1]; | |
2488 t1 = this._expr; | |
2489 if (t1 !== -1) | |
2490 result.expr = match[t1 + 1]; | |
2491 t1 = this._method; | |
2492 if (t1 !== -1) | |
2493 result.method = match[t1 + 1]; | |
2494 t1 = this._receiver; | |
2495 if (t1 !== -1) | |
2496 result.receiver = match[t1 + 1]; | |
2497 return result; | |
2498 }, | |
2499 static: {TypeErrorDecoder_extractPattern: function(message) { | |
2500 var match, $arguments, argumentsExpr, expr, method, receiver; | |
2501 message = message.replace(String({}), '$receiver$').replace(new RegExp("
[[\\]{}()*+?.\\\\^$|]", 'g'), '\\$&'); | |
2502 match = message.match(/\\\$[a-zA-Z]+\\\$/g); | |
2503 if (match == null) | |
2504 match = []; | |
2505 $arguments = match.indexOf("\\$arguments\\$"); | |
2506 argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); | |
2507 expr = match.indexOf("\\$expr\\$"); | |
2508 method = match.indexOf("\\$method\\$"); | |
2509 receiver = match.indexOf("\\$receiver\\$"); | |
2510 return new H.TypeErrorDecoder(message.replace('\\$arguments\\$', '((?:x|
[^x])*)').replace('\\$argumentsExpr\\$', '((?:x|[^x])*)').replace('\\$expr\\$',
'((?:x|[^x])*)').replace('\\$method\\$', '((?:x|[^x])*)').replace('\\$receiver\\
$', '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); | |
2511 }, TypeErrorDecoder_provokeCallErrorOn: function(expression) { | |
2512 return function($expr$) { | |
2513 var $argumentsExpr$ = '$arguments$'; | |
2514 try { | |
2515 $expr$.$method$($argumentsExpr$); | |
2516 } catch (e) { | |
2517 return e.message; | |
2518 } | |
2519 }(expression); | |
2520 }, TypeErrorDecoder_provokePropertyErrorOn: function(expression) { | |
2521 return function($expr$) { | |
2522 try { | |
2523 $expr$.$method$; | |
2524 } catch (e) { | |
2525 return e.message; | |
2526 } | |
2527 }(expression); | |
2528 }} | |
2529 }, | |
2530 NullError: { | |
2531 "^": "Error;_message,_method", | |
2532 toString$0: function(_) { | |
2533 var t1 = this._method; | |
2534 if (t1 == null) | |
2535 return "NullError: " + H.S(this._message); | |
2536 return "NullError: method not found: '" + H.S(t1) + "' on null"; | |
2537 } | |
2538 }, | |
2539 JsNoSuchMethodError: { | |
2540 "^": "Error;_message,_method,_receiver", | |
2541 toString$0: function(_) { | |
2542 var t1, t2; | |
2543 t1 = this._method; | |
2544 if (t1 == null) | |
2545 return "NoSuchMethodError: " + H.S(this._message); | |
2546 t2 = this._receiver; | |
2547 if (t2 == null) | |
2548 return "NoSuchMethodError: method not found: '" + H.S(t1) + "' (" + H.S(
this._message) + ")"; | |
2549 return "NoSuchMethodError: method not found: '" + H.S(t1) + "' on '" + H.S
(t2) + "' (" + H.S(this._message) + ")"; | |
2550 }, | |
2551 static: {JsNoSuchMethodError$: function(_message, match) { | |
2552 var t1, t2; | |
2553 t1 = match == null; | |
2554 t2 = t1 ? null : match.method; | |
2555 return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receive
r); | |
2556 }} | |
2557 }, | |
2558 UnknownJsTypeError: { | |
2559 "^": "Error;_message", | |
2560 toString$0: function(_) { | |
2561 var t1 = this._message; | |
2562 return C.JSString_methods.get$isEmpty(t1) ? "Error" : "Error: " + t1; | |
2563 } | |
2564 }, | |
2565 unwrapException_saveStackTrace: { | |
2566 "^": "Closure:2;_captured_ex_0", | |
2567 call$1: function(error) { | |
2568 if (!!J.getInterceptor(error).$isError) | |
2569 if (error.$thrownJsError == null) | |
2570 error.$thrownJsError = this._captured_ex_0; | |
2571 return error; | |
2572 } | |
2573 }, | |
2574 _StackTrace: { | |
2575 "^": "Object;_exception,_trace", | |
2576 toString$0: function(_) { | |
2577 var t1, trace; | |
2578 t1 = this._trace; | |
2579 if (t1 != null) | |
2580 return t1; | |
2581 t1 = this._exception; | |
2582 trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; | |
2583 t1 = trace == null ? "" : trace; | |
2584 this._trace = t1; | |
2585 return t1; | |
2586 } | |
2587 }, | |
2588 invokeClosure_closure: { | |
2589 "^": "Closure:0;_captured_closure_0", | |
2590 call$0: function() { | |
2591 return this._captured_closure_0.call$0(); | |
2592 } | |
2593 }, | |
2594 invokeClosure_closure0: { | |
2595 "^": "Closure:0;_captured_closure_1,_captured_arg1_2", | |
2596 call$0: function() { | |
2597 return this._captured_closure_1.call$1(this._captured_arg1_2); | |
2598 } | |
2599 }, | |
2600 invokeClosure_closure1: { | |
2601 "^": "Closure:0;_captured_closure_3,_captured_arg1_4,_captured_arg2_5", | |
2602 call$0: function() { | |
2603 return this._captured_closure_3.call$2(this._captured_arg1_4, this._captur
ed_arg2_5); | |
2604 } | |
2605 }, | |
2606 invokeClosure_closure2: { | |
2607 "^": "Closure:0;_captured_closure_6,_captured_arg1_7,_captured_arg2_8,_captu
red_arg3_9", | |
2608 call$0: function() { | |
2609 return this._captured_closure_6.call$3(this._captured_arg1_7, this._captur
ed_arg2_8, this._captured_arg3_9); | |
2610 } | |
2611 }, | |
2612 invokeClosure_closure3: { | |
2613 "^": "Closure:0;_captured_closure_10,_captured_arg1_11,_captured_arg2_12,_ca
ptured_arg3_13,_captured_arg4_14", | |
2614 call$0: function() { | |
2615 return this._captured_closure_10.call$4(this._captured_arg1_11, this._capt
ured_arg2_12, this._captured_arg3_13, this._captured_arg4_14); | |
2616 } | |
2617 }, | |
2618 Closure: { | |
2619 "^": "Object;", | |
2620 toString$0: function(_) { | |
2621 return "Closure '" + H.Primitives_objectTypeName(this) + "'"; | |
2622 }, | |
2623 get$$call: function() { | |
2624 return this; | |
2625 }, | |
2626 get$$call: function() { | |
2627 return this; | |
2628 } | |
2629 }, | |
2630 TearOffClosure: { | |
2631 "^": "Closure;" | |
2632 }, | |
2633 StaticClosure: { | |
2634 "^": "TearOffClosure;", | |
2635 toString$0: function(_) { | |
2636 var $name = this.$name; | |
2637 if ($name == null) | |
2638 return "Closure of unknown static method"; | |
2639 return "Closure '" + $name + "'"; | |
2640 } | |
2641 }, | |
2642 BoundClosure: { | |
2643 "^": "TearOffClosure;_self,_target,_receiver,_name", | |
2644 $eq: function(_, other) { | |
2645 if (other == null) | |
2646 return false; | |
2647 if (this === other) | |
2648 return true; | |
2649 if (!(other instanceof H.BoundClosure)) | |
2650 return false; | |
2651 return this._self === other._self && this._target === other._target && thi
s._receiver === other._receiver; | |
2652 }, | |
2653 get$hashCode: function(_) { | |
2654 var t1, receiverHashCode; | |
2655 t1 = this._receiver; | |
2656 if (t1 == null) | |
2657 receiverHashCode = H.Primitives_objectHashCode(this._self); | |
2658 else | |
2659 receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Prim
itives_objectHashCode(t1); | |
2660 return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>>
0; | |
2661 }, | |
2662 toString$0: function(_) { | |
2663 var receiver = this._receiver; | |
2664 if (receiver == null) | |
2665 receiver = this._self; | |
2666 return "Closure '" + H.S(this._name) + "' of " + H.Primitives_objectToStri
ng(receiver); | |
2667 }, | |
2668 static: {BoundClosure_selfOf: function(closure) { | |
2669 return closure._self; | |
2670 }, BoundClosure_receiverOf: function(closure) { | |
2671 return closure._receiver; | |
2672 }, BoundClosure_selfFieldName: function() { | |
2673 var t1 = $.BoundClosure_selfFieldNameCache; | |
2674 if (t1 == null) { | |
2675 t1 = H.BoundClosure_computeFieldNamed("self"); | |
2676 $.BoundClosure_selfFieldNameCache = t1; | |
2677 } | |
2678 return t1; | |
2679 }, BoundClosure_computeFieldNamed: function(fieldName) { | |
2680 var template, t1, names, i, $name; | |
2681 template = new H.BoundClosure("self", "target", "receiver", "name"); | |
2682 t1 = Object.getOwnPropertyNames(template); | |
2683 t1.fixed$length = Array; | |
2684 names = t1; | |
2685 for (t1 = names.length, i = 0; i < t1; ++i) { | |
2686 $name = names[i]; | |
2687 if (template[$name] === fieldName) | |
2688 return $name; | |
2689 } | |
2690 }} | |
2691 }, | |
2692 RuntimeError: { | |
2693 "^": "Error;message", | |
2694 toString$0: function(_) { | |
2695 return "RuntimeError: " + this.message; | |
2696 } | |
2697 }, | |
2698 RuntimeType: { | |
2699 "^": "Object;" | |
2700 }, | |
2701 RuntimeFunctionType: { | |
2702 "^": "RuntimeType;returnType,parameterTypes,optionalParameterTypes,namedPara
meters", | |
2703 _isTest$1: function(expression) { | |
2704 var functionTypeObject = this._extractFunctionTypeObjectFrom$1(expression)
; | |
2705 return functionTypeObject == null ? false : H.isFunctionSubtype(functionTy
peObject, this.toRti$0()); | |
2706 }, | |
2707 _extractFunctionTypeObjectFrom$1: function(o) { | |
2708 var interceptor = J.getInterceptor(o); | |
2709 return "$signature" in interceptor ? interceptor.$signature() : null; | |
2710 }, | |
2711 toRti$0: function() { | |
2712 var result, t1, t2, namedRti, keys, i, $name; | |
2713 result = {func: "dynafunc"}; | |
2714 t1 = this.returnType; | |
2715 t2 = J.getInterceptor(t1); | |
2716 if (!!t2.$isVoidRuntimeType) | |
2717 result.void = true; | |
2718 else if (!t2.$isDynamicRuntimeType) | |
2719 result.ret = t1.toRti$0(); | |
2720 t1 = this.parameterTypes; | |
2721 if (t1 != null && t1.length !== 0) | |
2722 result.args = H.RuntimeFunctionType_listToRti(t1); | |
2723 t1 = this.optionalParameterTypes; | |
2724 if (t1 != null && t1.length !== 0) | |
2725 result.opt = H.RuntimeFunctionType_listToRti(t1); | |
2726 t1 = this.namedParameters; | |
2727 if (t1 != null) { | |
2728 namedRti = Object.create(null); | |
2729 keys = H.extractKeys(t1); | |
2730 for (t2 = keys.length, i = 0; i < t2; ++i) { | |
2731 $name = keys[i]; | |
2732 namedRti[$name] = t1[$name].toRti$0(); | |
2733 } | |
2734 result.named = namedRti; | |
2735 } | |
2736 return result; | |
2737 }, | |
2738 toString$0: function(_) { | |
2739 var t1, t2, result, needsComma, i, type, keys, $name; | |
2740 t1 = this.parameterTypes; | |
2741 if (t1 != null) | |
2742 for (t2 = t1.length, result = "(", needsComma = false, i = 0; i < t2; ++
i, needsComma = true) { | |
2743 type = t1[i]; | |
2744 if (needsComma) | |
2745 result += ", "; | |
2746 result += H.S(type); | |
2747 } | |
2748 else { | |
2749 result = "("; | |
2750 needsComma = false; | |
2751 } | |
2752 t1 = this.optionalParameterTypes; | |
2753 if (t1 != null && t1.length !== 0) { | |
2754 result = (needsComma ? result + ", " : result) + "["; | |
2755 for (t2 = t1.length, needsComma = false, i = 0; i < t2; ++i, needsComma
= true) { | |
2756 type = t1[i]; | |
2757 if (needsComma) | |
2758 result += ", "; | |
2759 result += H.S(type); | |
2760 } | |
2761 result += "]"; | |
2762 } else { | |
2763 t1 = this.namedParameters; | |
2764 if (t1 != null) { | |
2765 result = (needsComma ? result + ", " : result) + "{"; | |
2766 keys = H.extractKeys(t1); | |
2767 for (t2 = keys.length, needsComma = false, i = 0; i < t2; ++i, needsCo
mma = true) { | |
2768 $name = keys[i]; | |
2769 if (needsComma) | |
2770 result += ", "; | |
2771 result += H.S(t1[$name].toRti$0()) + " " + $name; | |
2772 } | |
2773 result += "}"; | |
2774 } | |
2775 } | |
2776 return result + (") -> " + H.S(this.returnType)); | |
2777 }, | |
2778 static: {RuntimeFunctionType_listToRti: function(list) { | |
2779 var result, t1, i; | |
2780 list = list; | |
2781 result = []; | |
2782 for (t1 = list.length, i = 0; i < t1; ++i) | |
2783 result.push(list[i].toRti$0()); | |
2784 return result; | |
2785 }} | |
2786 }, | |
2787 DynamicRuntimeType: { | |
2788 "^": "RuntimeType;", | |
2789 toString$0: function(_) { | |
2790 return "dynamic"; | |
2791 }, | |
2792 toRti$0: function() { | |
2793 return; | |
2794 } | |
2795 }, | |
2796 ExceptionAndStackTrace: { | |
2797 "^": "Object;dartException,stackTrace<" | |
2798 }, | |
2799 asyncHelper_closure: { | |
2800 "^": "Closure:3;_captured_bodyFunctionOrErrorCode_0", | |
2801 call$2: function(error, stackTrace) { | |
2802 H._wrapJsFunctionForAsync(this._captured_bodyFunctionOrErrorCode_0, 1).cal
l$1(new H.ExceptionAndStackTrace(error, stackTrace)); | |
2803 } | |
2804 }, | |
2805 _wrapJsFunctionForAsync_closure: { | |
2806 "^": "Closure:2;_captured_errorCode_0,_captured_protected_1", | |
2807 call$1: function(result) { | |
2808 this._captured_protected_1(this._captured_errorCode_0, result); | |
2809 } | |
2810 }, | |
2811 JsLinkedHashMap: { | |
2812 "^": "Object;__js_helper$_length,_strings,_nums,_rest,_first,_last,_modifica
tions", | |
2813 get$length: function(_) { | |
2814 return this.__js_helper$_length; | |
2815 }, | |
2816 get$keys: function() { | |
2817 return H.setRuntimeTypeInfo(new H.LinkedHashMapKeyIterable(this), [H.getTy
peArgumentByIndex(this, 0)]); | |
2818 }, | |
2819 get$values: function() { | |
2820 return H.MappedIterable_MappedIterable(H.setRuntimeTypeInfo(new H.LinkedHa
shMapKeyIterable(this), [H.getTypeArgumentByIndex(this, 0)]), new H.JsLinkedHash
Map_values_closure(this), H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentBy
Index(this, 1)); | |
2821 }, | |
2822 containsKey$1: function(key) { | |
2823 var nums; | |
2824 if ((key & 0x3ffffff) === key) { | |
2825 nums = this._nums; | |
2826 if (nums == null) | |
2827 return false; | |
2828 return this._containsTableEntry$2(nums, key); | |
2829 } else | |
2830 return this.internalContainsKey$1(key); | |
2831 }, | |
2832 internalContainsKey$1: function(key) { | |
2833 var rest = this._rest; | |
2834 if (rest == null) | |
2835 return false; | |
2836 return this.internalFindBucketIndex$2(this._getTableEntry$2(rest, this.int
ernalComputeHashCode$1(key)), key) >= 0; | |
2837 }, | |
2838 $index: function(_, key) { | |
2839 var strings, cell, nums; | |
2840 if (typeof key === "string") { | |
2841 strings = this._strings; | |
2842 if (strings == null) | |
2843 return; | |
2844 cell = this._getTableEntry$2(strings, key); | |
2845 return cell == null ? null : cell.get$hashMapCellValue(); | |
2846 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
2847 nums = this._nums; | |
2848 if (nums == null) | |
2849 return; | |
2850 cell = this._getTableEntry$2(nums, key); | |
2851 return cell == null ? null : cell.get$hashMapCellValue(); | |
2852 } else | |
2853 return this.internalGet$1(key); | |
2854 }, | |
2855 internalGet$1: function(key) { | |
2856 var rest, bucket, index; | |
2857 rest = this._rest; | |
2858 if (rest == null) | |
2859 return; | |
2860 bucket = this._getTableEntry$2(rest, this.internalComputeHashCode$1(key)); | |
2861 index = this.internalFindBucketIndex$2(bucket, key); | |
2862 if (index < 0) | |
2863 return; | |
2864 return bucket[index].get$hashMapCellValue(); | |
2865 }, | |
2866 $indexSet: function(_, key, value) { | |
2867 var strings, nums; | |
2868 if (typeof key === "string") { | |
2869 strings = this._strings; | |
2870 if (strings == null) { | |
2871 strings = this._newHashTable$0(); | |
2872 this._strings = strings; | |
2873 } | |
2874 this.__js_helper$_addHashTableEntry$3(strings, key, value); | |
2875 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
2876 nums = this._nums; | |
2877 if (nums == null) { | |
2878 nums = this._newHashTable$0(); | |
2879 this._nums = nums; | |
2880 } | |
2881 this.__js_helper$_addHashTableEntry$3(nums, key, value); | |
2882 } else | |
2883 this.internalSet$2(key, value); | |
2884 }, | |
2885 internalSet$2: function(key, value) { | |
2886 var rest, hash, bucket, index; | |
2887 rest = this._rest; | |
2888 if (rest == null) { | |
2889 rest = this._newHashTable$0(); | |
2890 this._rest = rest; | |
2891 } | |
2892 hash = this.internalComputeHashCode$1(key); | |
2893 bucket = this._getTableEntry$2(rest, hash); | |
2894 if (bucket == null) | |
2895 this._setTableEntry$3(rest, hash, [this.__js_helper$_newLinkedCell$2(key
, value)]); | |
2896 else { | |
2897 index = this.internalFindBucketIndex$2(bucket, key); | |
2898 if (index >= 0) | |
2899 bucket[index].set$hashMapCellValue(value); | |
2900 else | |
2901 bucket.push(this.__js_helper$_newLinkedCell$2(key, value)); | |
2902 } | |
2903 }, | |
2904 remove$1: function(_, key) { | |
2905 if (typeof key === "string") | |
2906 return this._removeHashTableEntry$2(this._strings, key); | |
2907 else if (typeof key === "number" && (key & 0x3ffffff) === key) | |
2908 return this._removeHashTableEntry$2(this._nums, key); | |
2909 else | |
2910 return this.internalRemove$1(key); | |
2911 }, | |
2912 internalRemove$1: function(key) { | |
2913 var rest, bucket, index, cell; | |
2914 rest = this._rest; | |
2915 if (rest == null) | |
2916 return; | |
2917 bucket = this._getTableEntry$2(rest, this.internalComputeHashCode$1(key)); | |
2918 index = this.internalFindBucketIndex$2(bucket, key); | |
2919 if (index < 0) | |
2920 return; | |
2921 cell = bucket.splice(index, 1)[0]; | |
2922 this._unlinkCell$1(cell); | |
2923 return cell.get$hashMapCellValue(); | |
2924 }, | |
2925 forEach$1: function(_, action) { | |
2926 var cell, modifications; | |
2927 cell = this._first; | |
2928 modifications = this._modifications; | |
2929 for (; cell != null;) { | |
2930 action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); | |
2931 if (modifications !== this._modifications) | |
2932 throw H.wrapException(new P.ConcurrentModificationError(this)); | |
2933 cell = cell.__js_helper$_next; | |
2934 } | |
2935 }, | |
2936 __js_helper$_addHashTableEntry$3: function(table, key, value) { | |
2937 var cell = this._getTableEntry$2(table, key); | |
2938 if (cell == null) | |
2939 this._setTableEntry$3(table, key, this.__js_helper$_newLinkedCell$2(key,
value)); | |
2940 else | |
2941 cell.set$hashMapCellValue(value); | |
2942 }, | |
2943 _removeHashTableEntry$2: function(table, key) { | |
2944 var cell; | |
2945 if (table == null) | |
2946 return; | |
2947 cell = this._getTableEntry$2(table, key); | |
2948 if (cell == null) | |
2949 return; | |
2950 this._unlinkCell$1(cell); | |
2951 this._deleteTableEntry$2(table, key); | |
2952 return cell.get$hashMapCellValue(); | |
2953 }, | |
2954 __js_helper$_newLinkedCell$2: function(key, value) { | |
2955 var cell, last; | |
2956 cell = new H.LinkedHashMapCell(key, value, null, null); | |
2957 if (this._first == null) { | |
2958 this._last = cell; | |
2959 this._first = cell; | |
2960 } else { | |
2961 last = this._last; | |
2962 cell.__js_helper$_previous = last; | |
2963 last.__js_helper$_next = cell; | |
2964 this._last = cell; | |
2965 } | |
2966 ++this.__js_helper$_length; | |
2967 this._modifications = this._modifications + 1 & 67108863; | |
2968 return cell; | |
2969 }, | |
2970 _unlinkCell$1: function(cell) { | |
2971 var previous, next; | |
2972 previous = cell.get$__js_helper$_previous(); | |
2973 next = cell.__js_helper$_next; | |
2974 if (previous == null) | |
2975 this._first = next; | |
2976 else | |
2977 previous.__js_helper$_next = next; | |
2978 if (next == null) | |
2979 this._last = previous; | |
2980 else | |
2981 next.__js_helper$_previous = previous; | |
2982 --this.__js_helper$_length; | |
2983 this._modifications = this._modifications + 1 & 67108863; | |
2984 }, | |
2985 internalComputeHashCode$1: function(key) { | |
2986 return J.get$hashCode$(key) & 0x3ffffff; | |
2987 }, | |
2988 internalFindBucketIndex$2: function(bucket, key) { | |
2989 var $length, i; | |
2990 if (bucket == null) | |
2991 return -1; | |
2992 $length = bucket.length; | |
2993 for (i = 0; i < $length; ++i) | |
2994 if (J.$eq(bucket[i].get$hashMapCellKey(), key)) | |
2995 return i; | |
2996 return -1; | |
2997 }, | |
2998 toString$0: function(_) { | |
2999 return P.Maps_mapToString(this); | |
3000 }, | |
3001 _getTableEntry$2: function(table, key) { | |
3002 return table[key]; | |
3003 }, | |
3004 _setTableEntry$3: function(table, key, value) { | |
3005 table[key] = value; | |
3006 }, | |
3007 _deleteTableEntry$2: function(table, key) { | |
3008 delete table[key]; | |
3009 }, | |
3010 _containsTableEntry$2: function(table, key) { | |
3011 return this._getTableEntry$2(table, key) != null; | |
3012 }, | |
3013 _newHashTable$0: function() { | |
3014 var table = Object.create(null); | |
3015 this._setTableEntry$3(table, "<non-identifier-key>", table); | |
3016 this._deleteTableEntry$2(table, "<non-identifier-key>"); | |
3017 return table; | |
3018 }, | |
3019 $isInternalMap: 1 | |
3020 }, | |
3021 JsLinkedHashMap_values_closure: { | |
3022 "^": "Closure:2;__js_helper$_captured_this_0", | |
3023 call$1: function(each) { | |
3024 return this.__js_helper$_captured_this_0.$index(0, each); | |
3025 } | |
3026 }, | |
3027 LinkedHashMapCell: { | |
3028 "^": "Object;hashMapCellKey<,hashMapCellValue@,__js_helper$_next,__js_helper
$_previous<" | |
3029 }, | |
3030 LinkedHashMapKeyIterable: { | |
3031 "^": "Iterable;_map", | |
3032 get$length: function(_) { | |
3033 return this._map.__js_helper$_length; | |
3034 }, | |
3035 get$iterator: function(_) { | |
3036 var t1, t2; | |
3037 t1 = this._map; | |
3038 t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, null, null); | |
3039 t2.__js_helper$_cell = t1._first; | |
3040 return t2; | |
3041 }, | |
3042 forEach$1: function(_, f) { | |
3043 var t1, cell, modifications; | |
3044 t1 = this._map; | |
3045 cell = t1._first; | |
3046 modifications = t1._modifications; | |
3047 for (; cell != null;) { | |
3048 f.call$1(cell.hashMapCellKey); | |
3049 if (modifications !== t1._modifications) | |
3050 throw H.wrapException(new P.ConcurrentModificationError(t1)); | |
3051 cell = cell.__js_helper$_next; | |
3052 } | |
3053 }, | |
3054 $isEfficientLengthIterable: 1 | |
3055 }, | |
3056 LinkedHashMapKeyIterator: { | |
3057 "^": "Object;_map,_modifications,__js_helper$_cell,__js_helper$_current", | |
3058 get$current: function() { | |
3059 return this.__js_helper$_current; | |
3060 }, | |
3061 moveNext$0: function() { | |
3062 var t1 = this._map; | |
3063 if (this._modifications !== t1._modifications) | |
3064 throw H.wrapException(new P.ConcurrentModificationError(t1)); | |
3065 else { | |
3066 t1 = this.__js_helper$_cell; | |
3067 if (t1 == null) { | |
3068 this.__js_helper$_current = null; | |
3069 return false; | |
3070 } else { | |
3071 this.__js_helper$_current = t1.hashMapCellKey; | |
3072 this.__js_helper$_cell = t1.__js_helper$_next; | |
3073 return true; | |
3074 } | |
3075 } | |
3076 } | |
3077 } | |
3078 }], ["dart._internal", "dart:_internal",, H, { | |
3079 "^": "", | |
3080 IterableElementError_noElement: function() { | |
3081 return new P.StateError("No element"); | |
3082 }, | |
3083 Symbol_getName: function(symbol) { | |
3084 return symbol.get$__internal$_name(); | |
3085 }, | |
3086 ListIterable: { | |
3087 "^": "Iterable;", | |
3088 get$iterator: function(_) { | |
3089 return new H.ListIterator(this, this.get$length(this), 0, null); | |
3090 }, | |
3091 forEach$1: function(_, action) { | |
3092 var $length, i; | |
3093 $length = this.get$length(this); | |
3094 for (i = 0; i < $length; ++i) { | |
3095 action.call$1(this.elementAt$1(0, i)); | |
3096 if ($length !== this.get$length(this)) | |
3097 throw H.wrapException(new P.ConcurrentModificationError(this)); | |
3098 } | |
3099 }, | |
3100 map$1: function(_, f) { | |
3101 return H.setRuntimeTypeInfo(new H.MappedListIterable(this, f), [null, null
]); | |
3102 }, | |
3103 toList$1$growable: function(_, growable) { | |
3104 var result, i, t1; | |
3105 if (growable) { | |
3106 result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "ListI
terable", 0)]); | |
3107 C.JSArray_methods.set$length(result, this.get$length(this)); | |
3108 } else | |
3109 result = H.setRuntimeTypeInfo(Array(this.get$length(this)), [H.getRuntim
eTypeArgument(this, "ListIterable", 0)]); | |
3110 for (i = 0; i < this.get$length(this); ++i) { | |
3111 t1 = this.elementAt$1(0, i); | |
3112 if (i >= result.length) | |
3113 return H.ioore(result, i); | |
3114 result[i] = t1; | |
3115 } | |
3116 return result; | |
3117 }, | |
3118 toList$0: function($receiver) { | |
3119 return this.toList$1$growable($receiver, true); | |
3120 }, | |
3121 $isEfficientLengthIterable: 1 | |
3122 }, | |
3123 ListIterator: { | |
3124 "^": "Object;__internal$_iterable,__internal$_length,__internal$_index,__int
ernal$_current", | |
3125 get$current: function() { | |
3126 return this.__internal$_current; | |
3127 }, | |
3128 moveNext$0: function() { | |
3129 var t1, $length, t2; | |
3130 t1 = this.__internal$_iterable; | |
3131 $length = t1.get$length(t1); | |
3132 if (this.__internal$_length !== $length) | |
3133 throw H.wrapException(new P.ConcurrentModificationError(t1)); | |
3134 t2 = this.__internal$_index; | |
3135 if (t2 >= $length) { | |
3136 this.__internal$_current = null; | |
3137 return false; | |
3138 } | |
3139 this.__internal$_current = t1.elementAt$1(0, t2); | |
3140 ++this.__internal$_index; | |
3141 return true; | |
3142 } | |
3143 }, | |
3144 MappedIterable: { | |
3145 "^": "Iterable;__internal$_iterable,_f", | |
3146 get$iterator: function(_) { | |
3147 var t1 = new H.MappedIterator(null, J.get$iterator$a(this.__internal$_iter
able), this._f); | |
3148 t1.$builtinTypeInfo = this.$builtinTypeInfo; | |
3149 return t1; | |
3150 }, | |
3151 get$length: function(_) { | |
3152 return J.get$length$as(this.__internal$_iterable); | |
3153 }, | |
3154 $asIterable: function($S, $T) { | |
3155 return [$T]; | |
3156 }, | |
3157 static: {MappedIterable_MappedIterable: function(iterable, $function, $S, $T
) { | |
3158 if (!!J.getInterceptor(iterable).$isEfficientLengthIterable) | |
3159 return H.setRuntimeTypeInfo(new H.EfficientLengthMappedIterable(iterab
le, $function), [$S, $T]); | |
3160 return H.setRuntimeTypeInfo(new H.MappedIterable(iterable, $function), [
$S, $T]); | |
3161 }} | |
3162 }, | |
3163 EfficientLengthMappedIterable: { | |
3164 "^": "MappedIterable;__internal$_iterable,_f", | |
3165 $isEfficientLengthIterable: 1, | |
3166 $asEfficientLengthIterable: function($S, $T) { | |
3167 return [$T]; | |
3168 } | |
3169 }, | |
3170 MappedIterator: { | |
3171 "^": "Iterator;__internal$_current,_iterator,_f", | |
3172 moveNext$0: function() { | |
3173 var t1 = this._iterator; | |
3174 if (t1.moveNext$0()) { | |
3175 this.__internal$_current = this._f$1(t1.get$current()); | |
3176 return true; | |
3177 } | |
3178 this.__internal$_current = null; | |
3179 return false; | |
3180 }, | |
3181 get$current: function() { | |
3182 return this.__internal$_current; | |
3183 }, | |
3184 _f$1: function(arg0) { | |
3185 return this._f.call$1(arg0); | |
3186 } | |
3187 }, | |
3188 MappedListIterable: { | |
3189 "^": "ListIterable;_source,_f", | |
3190 get$length: function(_) { | |
3191 return J.get$length$as(this._source); | |
3192 }, | |
3193 elementAt$1: function(_, index) { | |
3194 return this._f$1(J.elementAt$1$a(this._source, index)); | |
3195 }, | |
3196 _f$1: function(arg0) { | |
3197 return this._f.call$1(arg0); | |
3198 }, | |
3199 $asListIterable: function($S, $T) { | |
3200 return [$T]; | |
3201 }, | |
3202 $asIterable: function($S, $T) { | |
3203 return [$T]; | |
3204 }, | |
3205 $asEfficientLengthIterable: function($S, $T) { | |
3206 return [$T]; | |
3207 } | |
3208 } | |
3209 }], ["dart._js_names", "dart:_js_names",, H, { | |
3210 "^": "", | |
3211 extractKeys: function(victim) { | |
3212 var t1 = H.setRuntimeTypeInfo(victim ? Object.keys(victim) : [], [null]); | |
3213 t1.fixed$length = Array; | |
3214 return t1; | |
3215 } | |
3216 }], ["dart.async", "dart:async",, P, { | |
3217 "^": "", | |
3218 _AsyncRun__initializeScheduleImmediate: function() { | |
3219 var t1, div, span; | |
3220 t1 = {}; | |
3221 if (self.scheduleImmediate != null) | |
3222 return P._AsyncRun__scheduleImmediateJsOverride$closure(); | |
3223 if (self.MutationObserver != null && self.document != null) { | |
3224 div = self.document.createElement("div"); | |
3225 span = self.document.createElement("span"); | |
3226 t1._captured_storedCallback_0 = null; | |
3227 new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initia
lizeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); | |
3228 return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span)
; | |
3229 } else if (self.setImmediate != null) | |
3230 return P._AsyncRun__scheduleImmediateWithSetImmediate$closure(); | |
3231 return P._AsyncRun__scheduleImmediateWithTimer$closure(); | |
3232 }, | |
3233 _AsyncRun__scheduleImmediateJsOverride: [function(callback) { | |
3234 ++init.globalState.topEventLoop._activeJsAsyncCount; | |
3235 self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImm
ediateJsOverride_internalCallback(callback), 0)); | |
3236 }, "call$1", "_AsyncRun__scheduleImmediateJsOverride$closure", 2, 0, 11], | |
3237 _AsyncRun__scheduleImmediateWithSetImmediate: [function(callback) { | |
3238 ++init.globalState.topEventLoop._activeJsAsyncCount; | |
3239 self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediat
eWithSetImmediate_internalCallback(callback), 0)); | |
3240 }, "call$1", "_AsyncRun__scheduleImmediateWithSetImmediate$closure", 2, 0, 11]
, | |
3241 _AsyncRun__scheduleImmediateWithTimer: [function(callback) { | |
3242 P.Timer__createTimer(C.Duration_0, callback); | |
3243 }, "call$1", "_AsyncRun__scheduleImmediateWithTimer$closure", 2, 0, 11], | |
3244 _registerErrorHandler: function(errorHandler, zone) { | |
3245 var t1 = H.getDynamicRuntimeType(); | |
3246 t1 = H.buildFunctionType(t1, [t1, t1])._isTest$1(errorHandler); | |
3247 if (t1) { | |
3248 zone.toString; | |
3249 return errorHandler; | |
3250 } else { | |
3251 zone.toString; | |
3252 return errorHandler; | |
3253 } | |
3254 }, | |
3255 Completer_Completer: function($T) { | |
3256 return H.setRuntimeTypeInfo(new P._AsyncCompleter(H.setRuntimeTypeInfo(new P
._Future(0, $.Zone__current, null), [$T])), [$T]); | |
3257 }, | |
3258 _microtaskLoop: function() { | |
3259 var t1, t2; | |
3260 for (; t1 = $._nextCallback, t1 != null;) { | |
3261 $._lastPriorityCallback = null; | |
3262 t2 = t1.next; | |
3263 $._nextCallback = t2; | |
3264 if (t2 == null) | |
3265 $._lastCallback = null; | |
3266 $.Zone__current = t1.zone; | |
3267 t1.callback$0(); | |
3268 } | |
3269 }, | |
3270 _microtaskLoopEntry: [function() { | |
3271 $._isInCallbackLoop = true; | |
3272 try { | |
3273 P._microtaskLoop(); | |
3274 } finally { | |
3275 $.Zone__current = C.C__RootZone; | |
3276 $._lastPriorityCallback = null; | |
3277 $._isInCallbackLoop = false; | |
3278 if ($._nextCallback != null) | |
3279 $.get$_AsyncRun_scheduleImmediateClosure().call$1(P._microtaskLoopEntry$
closure()); | |
3280 } | |
3281 }, "call$0", "_microtaskLoopEntry$closure", 0, 0, 1], | |
3282 _scheduleAsyncCallback: function(newEntry) { | |
3283 if ($._nextCallback == null) { | |
3284 $._lastCallback = newEntry; | |
3285 $._nextCallback = newEntry; | |
3286 if (!$._isInCallbackLoop) | |
3287 $.get$_AsyncRun_scheduleImmediateClosure().call$1(P._microtaskLoopEntry$
closure()); | |
3288 } else { | |
3289 $._lastCallback.next = newEntry; | |
3290 $._lastCallback = newEntry; | |
3291 } | |
3292 }, | |
3293 scheduleMicrotask: function(callback) { | |
3294 var currentZone, t1; | |
3295 currentZone = $.Zone__current; | |
3296 if (C.C__RootZone === currentZone) { | |
3297 P._rootScheduleMicrotask(null, null, C.C__RootZone, callback); | |
3298 return; | |
3299 } | |
3300 currentZone.toString; | |
3301 if (C.C__RootZone.get$errorZone() === currentZone) { | |
3302 P._rootScheduleMicrotask(null, null, currentZone, callback); | |
3303 return; | |
3304 } | |
3305 t1 = $.Zone__current; | |
3306 P._rootScheduleMicrotask(null, null, t1, t1.bindCallback$2$runGuarded(callba
ck, true)); | |
3307 }, | |
3308 StreamIterator_StreamIterator: function(stream, $T) { | |
3309 var t1, t2, t3; | |
3310 t1 = H.setRuntimeTypeInfo(new P._StreamIteratorImpl(null, null, null, 0), [$
T]); | |
3311 t2 = t1.get$_onData(); | |
3312 t3 = t1.get$_onError(); | |
3313 t1._subscription = stream.listen$4$cancelOnError$onDone$onError(t2, true, t1
.get$_onDone(), t3); | |
3314 return t1; | |
3315 }, | |
3316 Timer_Timer: function(duration, callback) { | |
3317 var t1 = $.Zone__current; | |
3318 if (t1 === C.C__RootZone) { | |
3319 t1.toString; | |
3320 return P.Timer__createTimer(duration, callback); | |
3321 } | |
3322 return P.Timer__createTimer(duration, t1.bindCallback$2$runGuarded(callback,
true)); | |
3323 }, | |
3324 Timer__createTimer: function(duration, callback) { | |
3325 var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); | |
3326 return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); | |
3327 }, | |
3328 Zone__enter: function(zone) { | |
3329 var previous = $.Zone__current; | |
3330 $.Zone__current = zone; | |
3331 return previous; | |
3332 }, | |
3333 _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { | |
3334 var entry, t1, t2; | |
3335 entry = new P._AsyncCallbackEntry(new P._rootHandleUncaughtError_closure(err
or, stackTrace), C.C__RootZone, null); | |
3336 t1 = $._nextCallback; | |
3337 if (t1 == null) { | |
3338 P._scheduleAsyncCallback(entry); | |
3339 $._lastPriorityCallback = $._lastCallback; | |
3340 } else { | |
3341 t2 = $._lastPriorityCallback; | |
3342 if (t2 == null) { | |
3343 entry.next = t1; | |
3344 $._lastPriorityCallback = entry; | |
3345 $._nextCallback = entry; | |
3346 } else { | |
3347 entry.next = t2.next; | |
3348 t2.next = entry; | |
3349 $._lastPriorityCallback = entry; | |
3350 if (entry.next == null) | |
3351 $._lastCallback = entry; | |
3352 } | |
3353 } | |
3354 }, | |
3355 _rootRun: function($self, $parent, zone, f) { | |
3356 var old, t1; | |
3357 if ($.Zone__current === zone) | |
3358 return f.call$0(); | |
3359 old = P.Zone__enter(zone); | |
3360 try { | |
3361 t1 = f.call$0(); | |
3362 return t1; | |
3363 } finally { | |
3364 $.Zone__current = old; | |
3365 } | |
3366 }, | |
3367 _rootRunUnary: function($self, $parent, zone, f, arg) { | |
3368 var old, t1; | |
3369 if ($.Zone__current === zone) | |
3370 return f.call$1(arg); | |
3371 old = P.Zone__enter(zone); | |
3372 try { | |
3373 t1 = f.call$1(arg); | |
3374 return t1; | |
3375 } finally { | |
3376 $.Zone__current = old; | |
3377 } | |
3378 }, | |
3379 _rootRunBinary: function($self, $parent, zone, f, arg1, arg2) { | |
3380 var old, t1; | |
3381 if ($.Zone__current === zone) | |
3382 return f.call$2(arg1, arg2); | |
3383 old = P.Zone__enter(zone); | |
3384 try { | |
3385 t1 = f.call$2(arg1, arg2); | |
3386 return t1; | |
3387 } finally { | |
3388 $.Zone__current = old; | |
3389 } | |
3390 }, | |
3391 _rootScheduleMicrotask: function($self, $parent, zone, f) { | |
3392 var t1 = C.C__RootZone !== zone; | |
3393 if (t1) { | |
3394 f = zone.bindCallback$2$runGuarded(f, !(!t1 || C.C__RootZone.get$errorZone
() === zone)); | |
3395 zone = C.C__RootZone; | |
3396 } | |
3397 P._scheduleAsyncCallback(new P._AsyncCallbackEntry(f, zone, null)); | |
3398 }, | |
3399 _AsyncRun__initializeScheduleImmediate_internalCallback: { | |
3400 "^": "Closure:2;_box_0", | |
3401 call$1: function(_) { | |
3402 var t1, f; | |
3403 H.leaveJsAsync(); | |
3404 t1 = this._box_0; | |
3405 f = t1._captured_storedCallback_0; | |
3406 t1._captured_storedCallback_0 = null; | |
3407 f.call$0(); | |
3408 } | |
3409 }, | |
3410 _AsyncRun__initializeScheduleImmediate_closure: { | |
3411 "^": "Closure:4;_box_0,_captured_div_1,_captured_span_2", | |
3412 call$1: function(callback) { | |
3413 var t1, t2; | |
3414 ++init.globalState.topEventLoop._activeJsAsyncCount; | |
3415 this._box_0._captured_storedCallback_0 = callback; | |
3416 t1 = this._captured_div_1; | |
3417 t2 = this._captured_span_2; | |
3418 t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); | |
3419 } | |
3420 }, | |
3421 _AsyncRun__scheduleImmediateJsOverride_internalCallback: { | |
3422 "^": "Closure:0;_captured_callback_0", | |
3423 call$0: function() { | |
3424 H.leaveJsAsync(); | |
3425 this._captured_callback_0.call$0(); | |
3426 } | |
3427 }, | |
3428 _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: { | |
3429 "^": "Closure:0;_captured_callback_0", | |
3430 call$0: function() { | |
3431 H.leaveJsAsync(); | |
3432 this._captured_callback_0.call$0(); | |
3433 } | |
3434 }, | |
3435 _UncaughtAsyncError: { | |
3436 "^": "AsyncError;error,stackTrace", | |
3437 toString$0: function(_) { | |
3438 var result, t1; | |
3439 result = "Uncaught Error: " + H.S(this.error); | |
3440 t1 = this.stackTrace; | |
3441 return t1 != null ? result + ("\nStack Trace:\n" + H.S(t1)) : result; | |
3442 }, | |
3443 static: {_UncaughtAsyncError__getBestStackTrace: function(error, stackTrace)
{ | |
3444 if (stackTrace != null) | |
3445 return stackTrace; | |
3446 if (!!J.getInterceptor(error).$isError) | |
3447 return error.get$stackTrace(); | |
3448 return; | |
3449 }} | |
3450 }, | |
3451 Future: { | |
3452 "^": "Object;" | |
3453 }, | |
3454 _Completer: { | |
3455 "^": "Object;future<", | |
3456 completeError$2: function(error, stackTrace) { | |
3457 error = error != null ? error : new P.NullThrownError(); | |
3458 if (this.future._state !== 0) | |
3459 throw H.wrapException(new P.StateError("Future already completed")); | |
3460 $.Zone__current.toString; | |
3461 this._completeError$2(error, stackTrace); | |
3462 } | |
3463 }, | |
3464 _AsyncCompleter: { | |
3465 "^": "_Completer;future", | |
3466 complete$1: function(value) { | |
3467 var t1 = this.future; | |
3468 if (t1._state !== 0) | |
3469 throw H.wrapException(new P.StateError("Future already completed")); | |
3470 t1._asyncComplete$1(value); | |
3471 }, | |
3472 _completeError$2: function(error, stackTrace) { | |
3473 this.future._asyncCompleteError$2(error, stackTrace); | |
3474 } | |
3475 }, | |
3476 _FutureListener: { | |
3477 "^": "Object;_nextListener<,result<,state,callback,errorCallback", | |
3478 get$_zone: function() { | |
3479 return this.result._zone; | |
3480 }, | |
3481 get$handlesValue: function() { | |
3482 return (this.state & 1) !== 0; | |
3483 }, | |
3484 get$hasErrorTest: function() { | |
3485 return this.state === 6; | |
3486 }, | |
3487 get$handlesComplete: function() { | |
3488 return this.state === 8; | |
3489 }, | |
3490 get$_onValue: function() { | |
3491 return this.callback; | |
3492 }, | |
3493 get$_whenCompleteAction: function() { | |
3494 return this.callback; | |
3495 } | |
3496 }, | |
3497 _Future: { | |
3498 "^": "Object;_state?,_zone<,_resultOrListeners", | |
3499 get$_hasError: function() { | |
3500 return this._state === 8; | |
3501 }, | |
3502 set$_isChained: function(value) { | |
3503 if (value) | |
3504 this._state = 2; | |
3505 else | |
3506 this._state = 0; | |
3507 }, | |
3508 then$2$onError: function(f, onError) { | |
3509 var result, t1; | |
3510 result = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current, null), [nu
ll]); | |
3511 t1 = result._zone; | |
3512 if (t1 !== C.C__RootZone) { | |
3513 t1.toString; | |
3514 if (onError != null) | |
3515 onError = P._registerErrorHandler(onError, t1); | |
3516 } | |
3517 this._addListener$1(new P._FutureListener(null, result, onError == null ?
1 : 3, f, onError)); | |
3518 return result; | |
3519 }, | |
3520 _markPendingCompletion$0: function() { | |
3521 if (this._state !== 0) | |
3522 throw H.wrapException(new P.StateError("Future already completed")); | |
3523 this._state = 1; | |
3524 }, | |
3525 get$_value: function() { | |
3526 return this._resultOrListeners; | |
3527 }, | |
3528 get$_error: function() { | |
3529 return this._resultOrListeners; | |
3530 }, | |
3531 _setValue$1: function(value) { | |
3532 this._state = 4; | |
3533 this._resultOrListeners = value; | |
3534 }, | |
3535 _setErrorObject$1: function(error) { | |
3536 this._state = 8; | |
3537 this._resultOrListeners = error; | |
3538 }, | |
3539 _setError$2: function(error, stackTrace) { | |
3540 this._setErrorObject$1(new P.AsyncError(error, stackTrace)); | |
3541 }, | |
3542 _addListener$1: function(listener) { | |
3543 var t1; | |
3544 if (this._state >= 4) { | |
3545 t1 = this._zone; | |
3546 t1.toString; | |
3547 P._rootScheduleMicrotask(null, null, t1, new P._Future__addListener_clos
ure(this, listener)); | |
3548 } else { | |
3549 listener._nextListener = this._resultOrListeners; | |
3550 this._resultOrListeners = listener; | |
3551 } | |
3552 }, | |
3553 _removeListeners$0: function() { | |
3554 var current, prev, next; | |
3555 current = this._resultOrListeners; | |
3556 this._resultOrListeners = null; | |
3557 for (prev = null; current != null; prev = current, current = next) { | |
3558 next = current.get$_nextListener(); | |
3559 current._nextListener = prev; | |
3560 } | |
3561 return prev; | |
3562 }, | |
3563 _complete$1: function(value) { | |
3564 var t1, listeners; | |
3565 t1 = J.getInterceptor(value); | |
3566 if (!!t1.$isFuture) | |
3567 if (!!t1.$is_Future) | |
3568 P._Future__chainCoreFuture(value, this); | |
3569 else | |
3570 P._Future__chainForeignFuture(value, this); | |
3571 else { | |
3572 listeners = this._removeListeners$0(); | |
3573 this._setValue$1(value); | |
3574 P._Future__propagateToListeners(this, listeners); | |
3575 } | |
3576 }, | |
3577 _completeWithValue$1: function(value) { | |
3578 var listeners = this._removeListeners$0(); | |
3579 this._setValue$1(value); | |
3580 P._Future__propagateToListeners(this, listeners); | |
3581 }, | |
3582 _completeError$2: function(error, stackTrace) { | |
3583 var listeners = this._removeListeners$0(); | |
3584 this._setErrorObject$1(new P.AsyncError(error, stackTrace)); | |
3585 P._Future__propagateToListeners(this, listeners); | |
3586 }, | |
3587 _asyncComplete$1: function(value) { | |
3588 var t1; | |
3589 if (value == null) | |
3590 ; | |
3591 else { | |
3592 t1 = J.getInterceptor(value); | |
3593 if (!!t1.$isFuture) { | |
3594 if (!!t1.$is_Future) { | |
3595 t1 = value._state; | |
3596 if (t1 >= 4 && t1 === 8) { | |
3597 this._markPendingCompletion$0(); | |
3598 t1 = this._zone; | |
3599 t1.toString; | |
3600 P._rootScheduleMicrotask(null, null, t1, new P._Future__asyncCompl
ete_closure(this, value)); | |
3601 } else | |
3602 P._Future__chainCoreFuture(value, this); | |
3603 } else | |
3604 P._Future__chainForeignFuture(value, this); | |
3605 return; | |
3606 } | |
3607 } | |
3608 this._markPendingCompletion$0(); | |
3609 t1 = this._zone; | |
3610 t1.toString; | |
3611 P._rootScheduleMicrotask(null, null, t1, new P._Future__asyncComplete_clos
ure0(this, value)); | |
3612 }, | |
3613 _asyncCompleteError$2: function(error, stackTrace) { | |
3614 var t1; | |
3615 this._markPendingCompletion$0(); | |
3616 t1 = this._zone; | |
3617 t1.toString; | |
3618 P._rootScheduleMicrotask(null, null, t1, new P._Future__asyncCompleteError
_closure(this, error, stackTrace)); | |
3619 }, | |
3620 $isFuture: 1, | |
3621 static: {_Future__chainForeignFuture: function(source, target) { | |
3622 var e, s, exception, t1; | |
3623 target.set$_state(2); | |
3624 try { | |
3625 source.then$2$onError(new P._Future__chainForeignFuture_closure(target
), new P._Future__chainForeignFuture_closure0(target)); | |
3626 } catch (exception) { | |
3627 t1 = H.unwrapException(exception); | |
3628 e = t1; | |
3629 s = H.getTraceFromException(exception); | |
3630 P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target,
e, s)); | |
3631 } | |
3632 }, _Future__chainCoreFuture: function(source, target) { | |
3633 var listener; | |
3634 target._state = 2; | |
3635 listener = new P._FutureListener(null, target, 0, null, null); | |
3636 if (source._state >= 4) | |
3637 P._Future__propagateToListeners(source, listener); | |
3638 else | |
3639 source._addListener$1(listener); | |
3640 }, _Future__propagateToListeners: function(source, listeners) { | |
3641 var t1, t2, t3, hasError, asyncError, t4, listeners0, sourceValue, zone,
oldZone, chainSource, result; | |
3642 t1 = {}; | |
3643 t1._captured_source_4 = source; | |
3644 for (t2 = source; true;) { | |
3645 t3 = {}; | |
3646 hasError = t2.get$_hasError(); | |
3647 if (listeners == null) { | |
3648 if (hasError) { | |
3649 asyncError = t1._captured_source_4.get$_error(); | |
3650 t2 = t1._captured_source_4.get$_zone(); | |
3651 t3 = asyncError.get$error(); | |
3652 t4 = asyncError.get$stackTrace(); | |
3653 t2.toString; | |
3654 P._rootHandleUncaughtError(null, null, t2, t3, t4); | |
3655 } | |
3656 return; | |
3657 } | |
3658 for (; listeners.get$_nextListener() != null; listeners = listeners0)
{ | |
3659 listeners0 = listeners._nextListener; | |
3660 listeners._nextListener = null; | |
3661 P._Future__propagateToListeners(t1._captured_source_4, listeners); | |
3662 } | |
3663 t3._captured_listenerHasValue_1 = true; | |
3664 sourceValue = hasError ? null : t1._captured_source_4.get$_value(); | |
3665 t3._captured_listenerValueOrError_2 = sourceValue; | |
3666 t3._captured_isPropagationAborted_3 = false; | |
3667 t2 = !hasError; | |
3668 if (!t2 || listeners.get$handlesValue() || listeners.state === 8) { | |
3669 zone = listeners.get$_zone(); | |
3670 if (hasError) { | |
3671 t4 = t1._captured_source_4.get$_zone(); | |
3672 t4.toString; | |
3673 if (t4 == null ? zone != null : t4 !== zone) { | |
3674 t4 = t4.get$errorZone(); | |
3675 zone.toString; | |
3676 t4 = t4 === zone; | |
3677 } else | |
3678 t4 = true; | |
3679 t4 = !t4; | |
3680 } else | |
3681 t4 = false; | |
3682 if (t4) { | |
3683 asyncError = t1._captured_source_4.get$_error(); | |
3684 t2 = t1._captured_source_4.get$_zone(); | |
3685 t3 = asyncError.get$error(); | |
3686 t4 = asyncError.get$stackTrace(); | |
3687 t2.toString; | |
3688 P._rootHandleUncaughtError(null, null, t2, t3, t4); | |
3689 return; | |
3690 } | |
3691 oldZone = $.Zone__current; | |
3692 if (oldZone == null ? zone != null : oldZone !== zone) | |
3693 $.Zone__current = zone; | |
3694 else | |
3695 oldZone = null; | |
3696 if (t2) { | |
3697 if (listeners.get$handlesValue()) | |
3698 t3._captured_listenerHasValue_1 = new P._Future__propagateToList
eners_handleValueCallback(t3, listeners, sourceValue, zone).call$0(); | |
3699 } else | |
3700 new P._Future__propagateToListeners_handleError(t1, t3, listeners,
zone).call$0(); | |
3701 if (listeners.get$handlesComplete()) | |
3702 new P._Future__propagateToListeners_handleWhenCompleteCallback(t1,
t3, hasError, listeners, zone).call$0(); | |
3703 if (oldZone != null) | |
3704 $.Zone__current = oldZone; | |
3705 if (t3._captured_isPropagationAborted_3) | |
3706 return; | |
3707 if (t3._captured_listenerHasValue_1 === true) { | |
3708 t2 = t3._captured_listenerValueOrError_2; | |
3709 t2 = (sourceValue == null ? t2 != null : sourceValue !== t2) && !!
J.getInterceptor(t2).$isFuture; | |
3710 } else | |
3711 t2 = false; | |
3712 if (t2) { | |
3713 chainSource = t3._captured_listenerValueOrError_2; | |
3714 result = listeners.result; | |
3715 if (chainSource instanceof P._Future) | |
3716 if (chainSource._state >= 4) { | |
3717 result._state = 2; | |
3718 t1._captured_source_4 = chainSource; | |
3719 listeners = new P._FutureListener(null, result, 0, null, null)
; | |
3720 t2 = chainSource; | |
3721 continue; | |
3722 } else | |
3723 P._Future__chainCoreFuture(chainSource, result); | |
3724 else | |
3725 P._Future__chainForeignFuture(chainSource, result); | |
3726 return; | |
3727 } | |
3728 } | |
3729 result = listeners.result; | |
3730 listeners = result._removeListeners$0(); | |
3731 t2 = t3._captured_listenerHasValue_1; | |
3732 t3 = t3._captured_listenerValueOrError_2; | |
3733 if (t2 === true) { | |
3734 result._state = 4; | |
3735 result._resultOrListeners = t3; | |
3736 } else { | |
3737 result._state = 8; | |
3738 result._resultOrListeners = t3; | |
3739 } | |
3740 t1._captured_source_4 = result; | |
3741 t2 = result; | |
3742 } | |
3743 }} | |
3744 }, | |
3745 _Future__addListener_closure: { | |
3746 "^": "Closure:0;_async$_captured_this_0,_captured_listener_1", | |
3747 call$0: function() { | |
3748 P._Future__propagateToListeners(this._async$_captured_this_0, this._captur
ed_listener_1); | |
3749 } | |
3750 }, | |
3751 _Future__chainForeignFuture_closure: { | |
3752 "^": "Closure:2;_captured_target_0", | |
3753 call$1: function(value) { | |
3754 this._captured_target_0._completeWithValue$1(value); | |
3755 } | |
3756 }, | |
3757 _Future__chainForeignFuture_closure0: { | |
3758 "^": "Closure:5;_captured_target_1", | |
3759 call$2: function(error, stackTrace) { | |
3760 this._captured_target_1._completeError$2(error, stackTrace); | |
3761 }, | |
3762 call$1: function(error) { | |
3763 return this.call$2(error, null); | |
3764 } | |
3765 }, | |
3766 _Future__chainForeignFuture_closure1: { | |
3767 "^": "Closure:0;_captured_target_2,_captured_e_3,_captured_s_4", | |
3768 call$0: function() { | |
3769 this._captured_target_2._completeError$2(this._captured_e_3, this._capture
d_s_4); | |
3770 } | |
3771 }, | |
3772 _Future__asyncComplete_closure: { | |
3773 "^": "Closure:0;_async$_captured_this_0,_captured_coreFuture_1", | |
3774 call$0: function() { | |
3775 P._Future__chainCoreFuture(this._captured_coreFuture_1, this._async$_captu
red_this_0); | |
3776 } | |
3777 }, | |
3778 _Future__asyncComplete_closure0: { | |
3779 "^": "Closure:0;_async$_captured_this_2,_captured_value_3", | |
3780 call$0: function() { | |
3781 this._async$_captured_this_2._completeWithValue$1(this._captured_value_3); | |
3782 } | |
3783 }, | |
3784 _Future__asyncCompleteError_closure: { | |
3785 "^": "Closure:0;_async$_captured_this_0,_captured_error_1,_captured_stackTra
ce_2", | |
3786 call$0: function() { | |
3787 this._async$_captured_this_0._completeError$2(this._captured_error_1, this
._captured_stackTrace_2); | |
3788 } | |
3789 }, | |
3790 _Future__propagateToListeners_handleValueCallback: { | |
3791 "^": "Closure:6;_box_1,_captured_listener_3,_captured_sourceValue_4,_capture
d_zone_5", | |
3792 call$0: function() { | |
3793 var e, s, exception, t1; | |
3794 try { | |
3795 this._box_1._captured_listenerValueOrError_2 = this._captured_zone_5.run
Unary$2(this._captured_listener_3.get$_onValue(), this._captured_sourceValue_4); | |
3796 return true; | |
3797 } catch (exception) { | |
3798 t1 = H.unwrapException(exception); | |
3799 e = t1; | |
3800 s = H.getTraceFromException(exception); | |
3801 this._box_1._captured_listenerValueOrError_2 = new P.AsyncError(e, s); | |
3802 return false; | |
3803 } | |
3804 } | |
3805 }, | |
3806 _Future__propagateToListeners_handleError: { | |
3807 "^": "Closure:1;_box_2,_box_1,_captured_listener_6,_captured_zone_7", | |
3808 call$0: function() { | |
3809 var asyncError, matchesTest, test, e, s, errorCallback, e0, s0, t1, except
ion, t2, listenerValueOrError, t3, t4; | |
3810 asyncError = this._box_2._captured_source_4.get$_error(); | |
3811 matchesTest = true; | |
3812 t1 = this._captured_listener_6; | |
3813 if (t1.get$hasErrorTest()) { | |
3814 test = t1.callback; | |
3815 try { | |
3816 matchesTest = this._captured_zone_7.runUnary$2(test, asyncError.get$er
ror()); | |
3817 } catch (exception) { | |
3818 t1 = H.unwrapException(exception); | |
3819 e = t1; | |
3820 s = H.getTraceFromException(exception); | |
3821 t1 = asyncError.get$error(); | |
3822 t2 = e; | |
3823 listenerValueOrError = (t1 == null ? t2 == null : t1 === t2) ? asyncEr
ror : new P.AsyncError(e, s); | |
3824 t1 = this._box_1; | |
3825 t1._captured_listenerValueOrError_2 = listenerValueOrError; | |
3826 t1._captured_listenerHasValue_1 = false; | |
3827 return; | |
3828 } | |
3829 } | |
3830 errorCallback = t1.errorCallback; | |
3831 if (matchesTest === true && errorCallback != null) { | |
3832 try { | |
3833 t1 = errorCallback; | |
3834 t2 = H.getDynamicRuntimeType(); | |
3835 t2 = H.buildFunctionType(t2, [t2, t2])._isTest$1(t1); | |
3836 t3 = this._captured_zone_7; | |
3837 t4 = this._box_1; | |
3838 if (t2) | |
3839 t4._captured_listenerValueOrError_2 = t3.runBinary$3(errorCallback,
asyncError.get$error(), asyncError.get$stackTrace()); | |
3840 else | |
3841 t4._captured_listenerValueOrError_2 = t3.runUnary$2(errorCallback, a
syncError.get$error()); | |
3842 } catch (exception) { | |
3843 t1 = H.unwrapException(exception); | |
3844 e0 = t1; | |
3845 s0 = H.getTraceFromException(exception); | |
3846 t1 = asyncError.get$error(); | |
3847 t2 = e0; | |
3848 listenerValueOrError = (t1 == null ? t2 == null : t1 === t2) ? asyncEr
ror : new P.AsyncError(e0, s0); | |
3849 t1 = this._box_1; | |
3850 t1._captured_listenerValueOrError_2 = listenerValueOrError; | |
3851 t1._captured_listenerHasValue_1 = false; | |
3852 return; | |
3853 } | |
3854 this._box_1._captured_listenerHasValue_1 = true; | |
3855 } else { | |
3856 t1 = this._box_1; | |
3857 t1._captured_listenerValueOrError_2 = asyncError; | |
3858 t1._captured_listenerHasValue_1 = false; | |
3859 } | |
3860 } | |
3861 }, | |
3862 _Future__propagateToListeners_handleWhenCompleteCallback: { | |
3863 "^": "Closure:1;_box_2,_box_1,_captured_hasError_8,_captured_listener_9,_cap
tured_zone_10", | |
3864 call$0: function() { | |
3865 var t1, e, s, completeResult, t2, exception, result; | |
3866 t1 = {}; | |
3867 t1._captured_completeResult_0 = null; | |
3868 try { | |
3869 completeResult = this._captured_zone_10.run$1(this._captured_listener_9.
get$_whenCompleteAction()); | |
3870 t1._captured_completeResult_0 = completeResult; | |
3871 t2 = completeResult; | |
3872 } catch (exception) { | |
3873 t1 = H.unwrapException(exception); | |
3874 e = t1; | |
3875 s = H.getTraceFromException(exception); | |
3876 if (this._captured_hasError_8) { | |
3877 t1 = this._box_2._captured_source_4.get$_error().get$error(); | |
3878 t2 = e; | |
3879 t2 = t1 == null ? t2 == null : t1 === t2; | |
3880 t1 = t2; | |
3881 } else | |
3882 t1 = false; | |
3883 t2 = this._box_1; | |
3884 if (t1) | |
3885 t2._captured_listenerValueOrError_2 = this._box_2._captured_source_4.g
et$_error(); | |
3886 else | |
3887 t2._captured_listenerValueOrError_2 = new P.AsyncError(e, s); | |
3888 t2._captured_listenerHasValue_1 = false; | |
3889 return; | |
3890 } | |
3891 if (!!J.getInterceptor(t2).$isFuture) { | |
3892 result = this._captured_listener_9.get$result(); | |
3893 result.set$_isChained(true); | |
3894 this._box_1._captured_isPropagationAborted_3 = true; | |
3895 t2.then$2$onError(new P._Future__propagateToListeners_handleWhenComplete
Callback_closure(this._box_2, result), new P._Future__propagateToListeners_handl
eWhenCompleteCallback_closure0(t1, result)); | |
3896 } | |
3897 } | |
3898 }, | |
3899 _Future__propagateToListeners_handleWhenCompleteCallback_closure: { | |
3900 "^": "Closure:2;_box_2,_captured_result_11", | |
3901 call$1: function(ignored) { | |
3902 P._Future__propagateToListeners(this._box_2._captured_source_4, new P._Fut
ureListener(null, this._captured_result_11, 0, null, null)); | |
3903 } | |
3904 }, | |
3905 _Future__propagateToListeners_handleWhenCompleteCallback_closure0: { | |
3906 "^": "Closure:5;_box_0,_captured_result_12", | |
3907 call$2: function(error, stackTrace) { | |
3908 var t1, completeResult; | |
3909 t1 = this._box_0; | |
3910 if (!(t1._captured_completeResult_0 instanceof P._Future)) { | |
3911 completeResult = H.setRuntimeTypeInfo(new P._Future(0, $.Zone__current,
null), [null]); | |
3912 t1._captured_completeResult_0 = completeResult; | |
3913 completeResult._setError$2(error, stackTrace); | |
3914 } | |
3915 P._Future__propagateToListeners(t1._captured_completeResult_0, new P._Futu
reListener(null, this._captured_result_12, 0, null, null)); | |
3916 }, | |
3917 call$1: function(error) { | |
3918 return this.call$2(error, null); | |
3919 } | |
3920 }, | |
3921 _AsyncCallbackEntry: { | |
3922 "^": "Object;callback,zone,next", | |
3923 callback$0: function() { | |
3924 return this.callback.call$0(); | |
3925 } | |
3926 }, | |
3927 StreamSubscription: { | |
3928 "^": "Object;" | |
3929 }, | |
3930 _EventSink: { | |
3931 "^": "Object;" | |
3932 }, | |
3933 _DelayedEvent: { | |
3934 "^": "Object;" | |
3935 }, | |
3936 _StreamIteratorImpl: { | |
3937 "^": "Object;_subscription,_current,_futureOrPrefetch,_state?", | |
3938 _clear$0: function() { | |
3939 this._subscription = null; | |
3940 this._futureOrPrefetch = null; | |
3941 this._current = null; | |
3942 this._state = 1; | |
3943 }, | |
3944 _onData$1: [function(data) { | |
3945 var hasNext; | |
3946 if (this._state === 2) { | |
3947 this._current = data; | |
3948 hasNext = this._futureOrPrefetch; | |
3949 this._futureOrPrefetch = null; | |
3950 this._state = 0; | |
3951 hasNext._complete$1(true); | |
3952 return; | |
3953 } | |
3954 this._subscription.pause$0(); | |
3955 this._futureOrPrefetch = data; | |
3956 this._state = 3; | |
3957 }, "call$1", "get$_onData", 2, 0, function() { | |
3958 return H.computeSignature(function(T) { | |
3959 return {func: 1, void: true, args: [T]}; | |
3960 }, this.$receiver, "_StreamIteratorImpl"); | |
3961 }], | |
3962 _onError$2: [function(error, stackTrace) { | |
3963 var hasNext; | |
3964 if (this._state === 2) { | |
3965 hasNext = this._futureOrPrefetch; | |
3966 this._clear$0(); | |
3967 hasNext._completeError$2(error, stackTrace); | |
3968 return; | |
3969 } | |
3970 this._subscription.pause$0(); | |
3971 this._futureOrPrefetch = new P.AsyncError(error, stackTrace); | |
3972 this._state = 4; | |
3973 }, function(error) { | |
3974 return this._onError$2(error, null); | |
3975 }, "_onError$1", "call$2", "call$1", "get$_onError", 2, 2, 7, 0], | |
3976 _onDone$0: [function() { | |
3977 if (this._state === 2) { | |
3978 var hasNext = this._futureOrPrefetch; | |
3979 this._clear$0(); | |
3980 hasNext._complete$1(false); | |
3981 return; | |
3982 } | |
3983 this._subscription.pause$0(); | |
3984 this._futureOrPrefetch = null; | |
3985 this._state = 5; | |
3986 }, "call$0", "get$_onDone", 0, 0, 1] | |
3987 }, | |
3988 AsyncError: { | |
3989 "^": "Object;error<,stackTrace<", | |
3990 toString$0: function(_) { | |
3991 return H.S(this.error); | |
3992 }, | |
3993 $isError: 1 | |
3994 }, | |
3995 _Zone: { | |
3996 "^": "Object;" | |
3997 }, | |
3998 _rootHandleUncaughtError_closure: { | |
3999 "^": "Closure:0;_captured_error_0,_captured_stackTrace_1", | |
4000 call$0: function() { | |
4001 var t1 = this._captured_error_0; | |
4002 throw H.wrapException(new P._UncaughtAsyncError(t1, P._UncaughtAsyncError_
_getBestStackTrace(t1, this._captured_stackTrace_1))); | |
4003 } | |
4004 }, | |
4005 _RootZone: { | |
4006 "^": "_Zone;", | |
4007 get$errorZone: function() { | |
4008 return this; | |
4009 }, | |
4010 runGuarded$1: function(f) { | |
4011 var e, s, t1, exception; | |
4012 try { | |
4013 if (C.C__RootZone === $.Zone__current) { | |
4014 t1 = f.call$0(); | |
4015 return t1; | |
4016 } | |
4017 t1 = P._rootRun(null, null, this, f); | |
4018 return t1; | |
4019 } catch (exception) { | |
4020 t1 = H.unwrapException(exception); | |
4021 e = t1; | |
4022 s = H.getTraceFromException(exception); | |
4023 return P._rootHandleUncaughtError(null, null, this, e, s); | |
4024 } | |
4025 }, | |
4026 bindCallback$2$runGuarded: function(f, runGuarded) { | |
4027 if (runGuarded) | |
4028 return new P._RootZone_bindCallback_closure(this, f); | |
4029 else | |
4030 return new P._RootZone_bindCallback_closure0(this, f); | |
4031 }, | |
4032 $index: function(_, key) { | |
4033 return; | |
4034 }, | |
4035 run$1: function(f) { | |
4036 if ($.Zone__current === C.C__RootZone) | |
4037 return f.call$0(); | |
4038 return P._rootRun(null, null, this, f); | |
4039 }, | |
4040 runUnary$2: function(f, arg) { | |
4041 if ($.Zone__current === C.C__RootZone) | |
4042 return f.call$1(arg); | |
4043 return P._rootRunUnary(null, null, this, f, arg); | |
4044 }, | |
4045 runBinary$3: function(f, arg1, arg2) { | |
4046 if ($.Zone__current === C.C__RootZone) | |
4047 return f.call$2(arg1, arg2); | |
4048 return P._rootRunBinary(null, null, this, f, arg1, arg2); | |
4049 } | |
4050 }, | |
4051 _RootZone_bindCallback_closure: { | |
4052 "^": "Closure:0;_async$_captured_this_0,_captured_f_1", | |
4053 call$0: function() { | |
4054 return this._async$_captured_this_0.runGuarded$1(this._captured_f_1); | |
4055 } | |
4056 }, | |
4057 _RootZone_bindCallback_closure0: { | |
4058 "^": "Closure:0;_async$_captured_this_2,_captured_f_3", | |
4059 call$0: function() { | |
4060 return this._async$_captured_this_2.run$1(this._captured_f_3); | |
4061 } | |
4062 } | |
4063 }], ["dart.collection", "dart:collection",, P, { | |
4064 "^": "", | |
4065 LinkedHashMap__makeEmpty: function() { | |
4066 return H.setRuntimeTypeInfo(new H.JsLinkedHashMap(0, null, null, null, null,
null, 0), [null, null]); | |
4067 }, | |
4068 LinkedHashMap__makeLiteral: function(keyValuePairs) { | |
4069 return H.fillLiteralMap(keyValuePairs, H.setRuntimeTypeInfo(new H.JsLinkedHa
shMap(0, null, null, null, null, null, 0), [null, null])); | |
4070 }, | |
4071 _defaultEquals: [function(a, b) { | |
4072 return J.$eq(a, b); | |
4073 }, "call$2", "_defaultEquals$closure", 4, 0, 12], | |
4074 _defaultHashCode: [function(a) { | |
4075 return J.get$hashCode$(a); | |
4076 }, "call$1", "_defaultHashCode$closure", 2, 0, 13], | |
4077 IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDel
imiter) { | |
4078 var parts, t1; | |
4079 if (P._isToStringVisiting(iterable)) { | |
4080 if (leftDelimiter === "(" && rightDelimiter === ")") | |
4081 return "(...)"; | |
4082 return leftDelimiter + "..." + rightDelimiter; | |
4083 } | |
4084 parts = []; | |
4085 t1 = $.get$_toStringVisiting(); | |
4086 t1.push(iterable); | |
4087 try { | |
4088 P._iterablePartsToStrings(iterable, parts); | |
4089 } finally { | |
4090 if (0 >= t1.length) | |
4091 return H.ioore(t1, 0); | |
4092 t1.pop(); | |
4093 } | |
4094 t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; | |
4095 return t1.charCodeAt(0) == 0 ? t1 : t1; | |
4096 }, | |
4097 IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDeli
miter) { | |
4098 var buffer, t1, t2; | |
4099 if (P._isToStringVisiting(iterable)) | |
4100 return leftDelimiter + "..." + rightDelimiter; | |
4101 buffer = new P.StringBuffer(leftDelimiter); | |
4102 t1 = $.get$_toStringVisiting(); | |
4103 t1.push(iterable); | |
4104 try { | |
4105 t2 = buffer; | |
4106 t2._contents = P.StringBuffer__writeAll(t2.get$_contents(), iterable, ", "
); | |
4107 } finally { | |
4108 if (0 >= t1.length) | |
4109 return H.ioore(t1, 0); | |
4110 t1.pop(); | |
4111 } | |
4112 t1 = buffer; | |
4113 t1._contents = t1.get$_contents() + rightDelimiter; | |
4114 t1 = buffer.get$_contents(); | |
4115 return t1.charCodeAt(0) == 0 ? t1 : t1; | |
4116 }, | |
4117 _isToStringVisiting: function(o) { | |
4118 var i, t1; | |
4119 for (i = 0; t1 = $.get$_toStringVisiting(), i < t1.length; ++i) | |
4120 if (o === t1[i]) | |
4121 return true; | |
4122 return false; | |
4123 }, | |
4124 _iterablePartsToStrings: function(iterable, parts) { | |
4125 var it, $length, count, next, ultimateString, penultimateString, penultimate
, ultimate, ultimate0, elision; | |
4126 it = iterable.get$iterator(iterable); | |
4127 $length = 0; | |
4128 count = 0; | |
4129 while (true) { | |
4130 if (!($length < 80 || count < 3)) | |
4131 break; | |
4132 if (!it.moveNext$0()) | |
4133 return; | |
4134 next = H.S(it.get$current()); | |
4135 parts.push(next); | |
4136 $length += next.length + 2; | |
4137 ++count; | |
4138 } | |
4139 if (!it.moveNext$0()) { | |
4140 if (count <= 5) | |
4141 return; | |
4142 if (0 >= parts.length) | |
4143 return H.ioore(parts, 0); | |
4144 ultimateString = parts.pop(); | |
4145 if (0 >= parts.length) | |
4146 return H.ioore(parts, 0); | |
4147 penultimateString = parts.pop(); | |
4148 } else { | |
4149 penultimate = it.get$current(); | |
4150 ++count; | |
4151 if (!it.moveNext$0()) { | |
4152 if (count <= 4) { | |
4153 parts.push(H.S(penultimate)); | |
4154 return; | |
4155 } | |
4156 ultimateString = H.S(penultimate); | |
4157 if (0 >= parts.length) | |
4158 return H.ioore(parts, 0); | |
4159 penultimateString = parts.pop(); | |
4160 $length += ultimateString.length + 2; | |
4161 } else { | |
4162 ultimate = it.get$current(); | |
4163 ++count; | |
4164 for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { | |
4165 ultimate0 = it.get$current(); | |
4166 ++count; | |
4167 if (count > 100) { | |
4168 while (true) { | |
4169 if (!($length > 75 && count > 3)) | |
4170 break; | |
4171 if (0 >= parts.length) | |
4172 return H.ioore(parts, 0); | |
4173 $length -= parts.pop().length + 2; | |
4174 --count; | |
4175 } | |
4176 parts.push("..."); | |
4177 return; | |
4178 } | |
4179 } | |
4180 penultimateString = H.S(penultimate); | |
4181 ultimateString = H.S(ultimate); | |
4182 $length += ultimateString.length + penultimateString.length + 4; | |
4183 } | |
4184 } | |
4185 if (count > parts.length + 2) { | |
4186 $length += 5; | |
4187 elision = "..."; | |
4188 } else | |
4189 elision = null; | |
4190 while (true) { | |
4191 if (!($length > 80 && parts.length > 3)) | |
4192 break; | |
4193 if (0 >= parts.length) | |
4194 return H.ioore(parts, 0); | |
4195 $length -= parts.pop().length + 2; | |
4196 if (elision == null) { | |
4197 $length += 5; | |
4198 elision = "..."; | |
4199 } | |
4200 } | |
4201 if (elision != null) | |
4202 parts.push(elision); | |
4203 parts.push(penultimateString); | |
4204 parts.push(ultimateString); | |
4205 }, | |
4206 LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) { | |
4207 return H.setRuntimeTypeInfo(new H.JsLinkedHashMap(0, null, null, null, null,
null, 0), [$K, $V]); | |
4208 }, | |
4209 LinkedHashMap_LinkedHashMap$identity: function($K, $V) { | |
4210 return H.setRuntimeTypeInfo(new P._LinkedIdentityHashMap(0, null, null, null
, null, null, 0), [$K, $V]); | |
4211 }, | |
4212 LinkedHashSet_LinkedHashSet: function(equals, hashCode, isValidKey, $E) { | |
4213 return H.setRuntimeTypeInfo(new P._LinkedHashSet(0, null, null, null, null,
null, 0), [$E]); | |
4214 }, | |
4215 Maps_mapToString: function(m) { | |
4216 var t1, result, t2; | |
4217 t1 = {}; | |
4218 if (P._isToStringVisiting(m)) | |
4219 return "{...}"; | |
4220 result = new P.StringBuffer(""); | |
4221 try { | |
4222 $.get$_toStringVisiting().push(m); | |
4223 t2 = result; | |
4224 t2._contents = t2.get$_contents() + "{"; | |
4225 t1._captured_first_0 = true; | |
4226 J.forEach$1$a(m, new P.Maps_mapToString_closure(t1, result)); | |
4227 t1 = result; | |
4228 t1._contents = t1.get$_contents() + "}"; | |
4229 } finally { | |
4230 t1 = $.get$_toStringVisiting(); | |
4231 if (0 >= t1.length) | |
4232 return H.ioore(t1, 0); | |
4233 t1.pop(); | |
4234 } | |
4235 t1 = result.get$_contents(); | |
4236 return t1.charCodeAt(0) == 0 ? t1 : t1; | |
4237 }, | |
4238 _LinkedIdentityHashMap: { | |
4239 "^": "JsLinkedHashMap;__js_helper$_length,_strings,_nums,_rest,_first,_last,
_modifications", | |
4240 internalComputeHashCode$1: function(key) { | |
4241 return H.objectHashCode(key) & 0x3ffffff; | |
4242 }, | |
4243 internalFindBucketIndex$2: function(bucket, key) { | |
4244 var $length, i, t1; | |
4245 if (bucket == null) | |
4246 return -1; | |
4247 $length = bucket.length; | |
4248 for (i = 0; i < $length; ++i) { | |
4249 t1 = bucket[i].get$hashMapCellKey(); | |
4250 if (t1 == null ? key == null : t1 === key) | |
4251 return i; | |
4252 } | |
4253 return -1; | |
4254 } | |
4255 }, | |
4256 _LinkedHashSet: { | |
4257 "^": "_HashSetBase;_collection$_length,_collection$_strings,_collection$_num
s,_collection$_rest,_collection$_first,_collection$_last,_collection$_modificati
ons", | |
4258 get$iterator: function(_) { | |
4259 var t1 = new P.LinkedHashSetIterator(this, this._collection$_modifications
, null, null); | |
4260 t1._cell = this._collection$_first; | |
4261 return t1; | |
4262 }, | |
4263 get$length: function(_) { | |
4264 return this._collection$_length; | |
4265 }, | |
4266 contains$1: function(_, object) { | |
4267 var strings, nums; | |
4268 if (typeof object === "string" && object !== "__proto__") { | |
4269 strings = this._collection$_strings; | |
4270 if (strings == null) | |
4271 return false; | |
4272 return strings[object] != null; | |
4273 } else if (typeof object === "number" && (object & 0x3ffffff) === object)
{ | |
4274 nums = this._collection$_nums; | |
4275 if (nums == null) | |
4276 return false; | |
4277 return nums[object] != null; | |
4278 } else | |
4279 return this._contains$1(object); | |
4280 }, | |
4281 _contains$1: function(object) { | |
4282 var rest = this._collection$_rest; | |
4283 if (rest == null) | |
4284 return false; | |
4285 return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], obje
ct) >= 0; | |
4286 }, | |
4287 lookup$1: function(object) { | |
4288 var t1; | |
4289 if (!(typeof object === "string" && object !== "__proto__")) | |
4290 t1 = typeof object === "number" && (object & 0x3ffffff) === object; | |
4291 else | |
4292 t1 = true; | |
4293 if (t1) | |
4294 return this.contains$1(0, object) ? object : null; | |
4295 else | |
4296 return this._lookup$1(object); | |
4297 }, | |
4298 _lookup$1: function(object) { | |
4299 var rest, bucket, index; | |
4300 rest = this._collection$_rest; | |
4301 if (rest == null) | |
4302 return; | |
4303 bucket = rest[this._computeHashCode$1(object)]; | |
4304 index = this._findBucketIndex$2(bucket, object); | |
4305 if (index < 0) | |
4306 return; | |
4307 return J.$index$as(bucket, index).get$_element(); | |
4308 }, | |
4309 forEach$1: function(_, action) { | |
4310 var cell, modifications; | |
4311 cell = this._collection$_first; | |
4312 modifications = this._collection$_modifications; | |
4313 for (; cell != null;) { | |
4314 action.call$1(cell._element); | |
4315 if (modifications !== this._collection$_modifications) | |
4316 throw H.wrapException(new P.ConcurrentModificationError(this)); | |
4317 cell = cell._next; | |
4318 } | |
4319 }, | |
4320 add$1: function(_, element) { | |
4321 var strings, nums; | |
4322 if (typeof element === "string" && element !== "__proto__") { | |
4323 strings = this._collection$_strings; | |
4324 if (strings == null) { | |
4325 strings = P._LinkedHashSet__newHashTable(); | |
4326 this._collection$_strings = strings; | |
4327 } | |
4328 return this._addHashTableEntry$2(strings, element); | |
4329 } else if (typeof element === "number" && (element & 0x3ffffff) === elemen
t) { | |
4330 nums = this._collection$_nums; | |
4331 if (nums == null) { | |
4332 nums = P._LinkedHashSet__newHashTable(); | |
4333 this._collection$_nums = nums; | |
4334 } | |
4335 return this._addHashTableEntry$2(nums, element); | |
4336 } else | |
4337 return this._add$1(element); | |
4338 }, | |
4339 _add$1: function(element) { | |
4340 var rest, hash, bucket; | |
4341 rest = this._collection$_rest; | |
4342 if (rest == null) { | |
4343 rest = P._LinkedHashSet__newHashTable(); | |
4344 this._collection$_rest = rest; | |
4345 } | |
4346 hash = this._computeHashCode$1(element); | |
4347 bucket = rest[hash]; | |
4348 if (bucket == null) | |
4349 rest[hash] = [this._newLinkedCell$1(element)]; | |
4350 else { | |
4351 if (this._findBucketIndex$2(bucket, element) >= 0) | |
4352 return false; | |
4353 bucket.push(this._newLinkedCell$1(element)); | |
4354 } | |
4355 return true; | |
4356 }, | |
4357 remove$1: function(_, object) { | |
4358 if (typeof object === "string" && object !== "__proto__") | |
4359 return this._collection$_removeHashTableEntry$2(this._collection$_string
s, object); | |
4360 else if (typeof object === "number" && (object & 0x3ffffff) === object) | |
4361 return this._collection$_removeHashTableEntry$2(this._collection$_nums,
object); | |
4362 else | |
4363 return this._remove$1(object); | |
4364 }, | |
4365 _remove$1: function(object) { | |
4366 var rest, bucket, index; | |
4367 rest = this._collection$_rest; | |
4368 if (rest == null) | |
4369 return false; | |
4370 bucket = rest[this._computeHashCode$1(object)]; | |
4371 index = this._findBucketIndex$2(bucket, object); | |
4372 if (index < 0) | |
4373 return false; | |
4374 this._collection$_unlinkCell$1(bucket.splice(index, 1)[0]); | |
4375 return true; | |
4376 }, | |
4377 clear$0: function(_) { | |
4378 if (this._collection$_length > 0) { | |
4379 this._collection$_last = null; | |
4380 this._collection$_first = null; | |
4381 this._collection$_rest = null; | |
4382 this._collection$_nums = null; | |
4383 this._collection$_strings = null; | |
4384 this._collection$_length = 0; | |
4385 this._collection$_modifications = this._collection$_modifications + 1 &
67108863; | |
4386 } | |
4387 }, | |
4388 _addHashTableEntry$2: function(table, element) { | |
4389 if (table[element] != null) | |
4390 return false; | |
4391 table[element] = this._newLinkedCell$1(element); | |
4392 return true; | |
4393 }, | |
4394 _collection$_removeHashTableEntry$2: function(table, element) { | |
4395 var cell; | |
4396 if (table == null) | |
4397 return false; | |
4398 cell = table[element]; | |
4399 if (cell == null) | |
4400 return false; | |
4401 this._collection$_unlinkCell$1(cell); | |
4402 delete table[element]; | |
4403 return true; | |
4404 }, | |
4405 _newLinkedCell$1: function(element) { | |
4406 var cell, last; | |
4407 cell = new P.LinkedHashSetCell(element, null, null); | |
4408 if (this._collection$_first == null) { | |
4409 this._collection$_last = cell; | |
4410 this._collection$_first = cell; | |
4411 } else { | |
4412 last = this._collection$_last; | |
4413 cell._previous = last; | |
4414 last._next = cell; | |
4415 this._collection$_last = cell; | |
4416 } | |
4417 ++this._collection$_length; | |
4418 this._collection$_modifications = this._collection$_modifications + 1 & 67
108863; | |
4419 return cell; | |
4420 }, | |
4421 _collection$_unlinkCell$1: function(cell) { | |
4422 var previous, next; | |
4423 previous = cell.get$_previous(); | |
4424 next = cell._next; | |
4425 if (previous == null) | |
4426 this._collection$_first = next; | |
4427 else | |
4428 previous._next = next; | |
4429 if (next == null) | |
4430 this._collection$_last = previous; | |
4431 else | |
4432 next._previous = previous; | |
4433 --this._collection$_length; | |
4434 this._collection$_modifications = this._collection$_modifications + 1 & 67
108863; | |
4435 }, | |
4436 _computeHashCode$1: function(element) { | |
4437 return J.get$hashCode$(element) & 0x3ffffff; | |
4438 }, | |
4439 _findBucketIndex$2: function(bucket, element) { | |
4440 var $length, i; | |
4441 if (bucket == null) | |
4442 return -1; | |
4443 $length = bucket.length; | |
4444 for (i = 0; i < $length; ++i) | |
4445 if (J.$eq(bucket[i].get$_element(), element)) | |
4446 return i; | |
4447 return -1; | |
4448 }, | |
4449 $isEfficientLengthIterable: 1, | |
4450 static: {_LinkedHashSet__newHashTable: function() { | |
4451 var table = Object.create(null); | |
4452 table["<non-identifier-key>"] = table; | |
4453 delete table["<non-identifier-key>"]; | |
4454 return table; | |
4455 }} | |
4456 }, | |
4457 LinkedHashSetCell: { | |
4458 "^": "Object;_element<,_next,_previous<" | |
4459 }, | |
4460 LinkedHashSetIterator: { | |
4461 "^": "Object;_set,_collection$_modifications,_cell,_collection$_current", | |
4462 get$current: function() { | |
4463 return this._collection$_current; | |
4464 }, | |
4465 moveNext$0: function() { | |
4466 var t1 = this._set; | |
4467 if (this._collection$_modifications !== t1._collection$_modifications) | |
4468 throw H.wrapException(new P.ConcurrentModificationError(t1)); | |
4469 else { | |
4470 t1 = this._cell; | |
4471 if (t1 == null) { | |
4472 this._collection$_current = null; | |
4473 return false; | |
4474 } else { | |
4475 this._collection$_current = t1._element; | |
4476 this._cell = t1._next; | |
4477 return true; | |
4478 } | |
4479 } | |
4480 } | |
4481 }, | |
4482 _HashSetBase: { | |
4483 "^": "SetBase;" | |
4484 }, | |
4485 Maps_mapToString_closure: { | |
4486 "^": "Closure:8;_collection$_box_0,_captured_result_1", | |
4487 call$2: function(k, v) { | |
4488 var t1, t2; | |
4489 t1 = this._collection$_box_0; | |
4490 if (!t1._captured_first_0) | |
4491 this._captured_result_1._contents += ", "; | |
4492 t1._captured_first_0 = false; | |
4493 t1 = this._captured_result_1; | |
4494 t2 = t1._contents += H.S(k); | |
4495 t1._contents = t2 + ": "; | |
4496 t1._contents += H.S(v); | |
4497 } | |
4498 }, | |
4499 ListQueue: { | |
4500 "^": "Iterable;_table,_head,_tail,_modificationCount", | |
4501 get$iterator: function(_) { | |
4502 return new P._ListQueueIterator(this, this._tail, this._modificationCount,
this._head, null); | |
4503 }, | |
4504 forEach$1: function(_, action) { | |
4505 var modificationCount, i, t1; | |
4506 modificationCount = this._modificationCount; | |
4507 for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1
) >>> 0) { | |
4508 t1 = this._table; | |
4509 if (i < 0 || i >= t1.length) | |
4510 return H.ioore(t1, i); | |
4511 action.call$1(t1[i]); | |
4512 if (modificationCount !== this._modificationCount) | |
4513 H.throwExpression(new P.ConcurrentModificationError(this)); | |
4514 } | |
4515 }, | |
4516 get$isEmpty: function(_) { | |
4517 return this._head === this._tail; | |
4518 }, | |
4519 get$length: function(_) { | |
4520 return (this._tail - this._head & this._table.length - 1) >>> 0; | |
4521 }, | |
4522 clear$0: function(_) { | |
4523 var i, t1, t2, t3, t4; | |
4524 i = this._head; | |
4525 t1 = this._tail; | |
4526 if (i !== t1) { | |
4527 for (t2 = this._table, t3 = t2.length, t4 = t3 - 1; i !== t1; i = (i + 1
& t4) >>> 0) { | |
4528 if (i < 0 || i >= t3) | |
4529 return H.ioore(t2, i); | |
4530 t2[i] = null; | |
4531 } | |
4532 this._tail = 0; | |
4533 this._head = 0; | |
4534 ++this._modificationCount; | |
4535 } | |
4536 }, | |
4537 toString$0: function(_) { | |
4538 return P.IterableBase_iterableToFullString(this, "{", "}"); | |
4539 }, | |
4540 removeFirst$0: function() { | |
4541 var t1, t2, t3, result; | |
4542 t1 = this._head; | |
4543 if (t1 === this._tail) | |
4544 throw H.wrapException(H.IterableElementError_noElement()); | |
4545 ++this._modificationCount; | |
4546 t2 = this._table; | |
4547 t3 = t2.length; | |
4548 if (t1 >= t3) | |
4549 return H.ioore(t2, t1); | |
4550 result = t2[t1]; | |
4551 t2[t1] = null; | |
4552 this._head = (t1 + 1 & t3 - 1) >>> 0; | |
4553 return result; | |
4554 }, | |
4555 _add$1: function(element) { | |
4556 var t1, t2, t3; | |
4557 t1 = this._table; | |
4558 t2 = this._tail; | |
4559 t3 = t1.length; | |
4560 if (t2 >= t3) | |
4561 return H.ioore(t1, t2); | |
4562 t1[t2] = element; | |
4563 t3 = (t2 + 1 & t3 - 1) >>> 0; | |
4564 this._tail = t3; | |
4565 if (this._head === t3) | |
4566 this._grow$0(); | |
4567 ++this._modificationCount; | |
4568 }, | |
4569 _grow$0: function() { | |
4570 var t1, newTable, t2, split; | |
4571 t1 = Array(this._table.length * 2); | |
4572 t1.fixed$length = Array; | |
4573 newTable = H.setRuntimeTypeInfo(t1, [H.getTypeArgumentByIndex(this, 0)]); | |
4574 t1 = this._table; | |
4575 t2 = this._head; | |
4576 split = t1.length - t2; | |
4577 C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); | |
4578 C.JSArray_methods.setRange$4(newTable, split, split + this._head, this._ta
ble, 0); | |
4579 this._head = 0; | |
4580 this._tail = this._table.length; | |
4581 this._table = newTable; | |
4582 }, | |
4583 ListQueue$1: function(initialCapacity, $E) { | |
4584 var t1 = Array(8); | |
4585 t1.fixed$length = Array; | |
4586 this._table = H.setRuntimeTypeInfo(t1, [$E]); | |
4587 }, | |
4588 $isEfficientLengthIterable: 1, | |
4589 static: {ListQueue$: function(initialCapacity, $E) { | |
4590 var t1 = H.setRuntimeTypeInfo(new P.ListQueue(null, 0, 0, 0), [$E]); | |
4591 t1.ListQueue$1(initialCapacity, $E); | |
4592 return t1; | |
4593 }} | |
4594 }, | |
4595 _ListQueueIterator: { | |
4596 "^": "Object;_queue,_end,_modificationCount,_position,_collection$_current", | |
4597 get$current: function() { | |
4598 return this._collection$_current; | |
4599 }, | |
4600 moveNext$0: function() { | |
4601 var t1, t2, t3; | |
4602 t1 = this._queue; | |
4603 if (this._modificationCount !== t1._modificationCount) | |
4604 H.throwExpression(new P.ConcurrentModificationError(t1)); | |
4605 t2 = this._position; | |
4606 if (t2 === this._end) { | |
4607 this._collection$_current = null; | |
4608 return false; | |
4609 } | |
4610 t1 = t1._table; | |
4611 t3 = t1.length; | |
4612 if (t2 >= t3) | |
4613 return H.ioore(t1, t2); | |
4614 this._collection$_current = t1[t2]; | |
4615 this._position = (t2 + 1 & t3 - 1) >>> 0; | |
4616 return true; | |
4617 } | |
4618 }, | |
4619 SetMixin: { | |
4620 "^": "Object;", | |
4621 map$1: function(_, f) { | |
4622 return H.setRuntimeTypeInfo(new H.EfficientLengthMappedIterable(this, f),
[H.getTypeArgumentByIndex(this, 0), null]); | |
4623 }, | |
4624 toString$0: function(_) { | |
4625 return P.IterableBase_iterableToFullString(this, "{", "}"); | |
4626 }, | |
4627 forEach$1: function(_, f) { | |
4628 var t1; | |
4629 for (t1 = this.get$iterator(this); t1.moveNext$0();) | |
4630 f.call$1(t1._collection$_current); | |
4631 }, | |
4632 $isEfficientLengthIterable: 1 | |
4633 }, | |
4634 SetBase: { | |
4635 "^": "SetMixin;" | |
4636 } | |
4637 }], ["dart.core", "dart:core",, P, { | |
4638 "^": "", | |
4639 _symbolToString: function(symbol) { | |
4640 return H.Symbol_getName(symbol); | |
4641 }, | |
4642 Error_safeToString: function(object) { | |
4643 if (typeof object === "number" || typeof object === "boolean" || null == obj
ect) | |
4644 return J.toString$0(object); | |
4645 if (typeof object === "string") | |
4646 return JSON.stringify(object); | |
4647 return P.Error__objectToString(object); | |
4648 }, | |
4649 Error__objectToString: function(object) { | |
4650 var t1 = J.getInterceptor(object); | |
4651 if (!!t1.$isClosure) | |
4652 return t1.toString$0(object); | |
4653 return H.Primitives_objectToString(object); | |
4654 }, | |
4655 Exception_Exception: function(message) { | |
4656 return new P._ExceptionImplementation(message); | |
4657 }, | |
4658 identical: [function(a, b) { | |
4659 return a == null ? b == null : a === b; | |
4660 }, "call$2", "identical$closure", 4, 0, 14], | |
4661 identityHashCode: [function(object) { | |
4662 return H.objectHashCode(object); | |
4663 }, "call$1", "identityHashCode$closure", 2, 0, 15], | |
4664 List_List$from: function(elements, growable, $E) { | |
4665 var list, t1; | |
4666 list = H.setRuntimeTypeInfo([], [$E]); | |
4667 for (t1 = J.get$iterator$a(elements); t1.moveNext$0();) | |
4668 list.push(t1.get$current()); | |
4669 if (growable) | |
4670 return list; | |
4671 list.fixed$length = Array; | |
4672 return list; | |
4673 }, | |
4674 print: function(object) { | |
4675 var line = H.S(object); | |
4676 H.printString(line); | |
4677 }, | |
4678 NoSuchMethodError_toString_closure: { | |
4679 "^": "Closure:9;_core$_box_0,_captured_sb_1", | |
4680 call$2: function(key, value) { | |
4681 this._captured_sb_1._contents += this._core$_box_0._captured_comma_0; | |
4682 P._symbolToString(key); | |
4683 } | |
4684 }, | |
4685 bool: { | |
4686 "^": "Object;" | |
4687 }, | |
4688 "+bool": 0, | |
4689 $double: { | |
4690 "^": "num;" | |
4691 }, | |
4692 "+double": 0, | |
4693 Duration: { | |
4694 "^": "Object;_duration", | |
4695 $add: function(_, other) { | |
4696 return new P.Duration(C.JSInt_methods.$add(this._duration, other.get$_dura
tion())); | |
4697 }, | |
4698 $lt: function(_, other) { | |
4699 return C.JSInt_methods.$lt(this._duration, other.get$_duration()); | |
4700 }, | |
4701 $eq: function(_, other) { | |
4702 if (other == null) | |
4703 return false; | |
4704 if (!(other instanceof P.Duration)) | |
4705 return false; | |
4706 return this._duration === other._duration; | |
4707 }, | |
4708 get$hashCode: function(_) { | |
4709 return this._duration & 0x1FFFFFFF; | |
4710 }, | |
4711 toString$0: function(_) { | |
4712 var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; | |
4713 t1 = new P.Duration_toString_twoDigits(); | |
4714 t2 = this._duration; | |
4715 if (t2 < 0) | |
4716 return "-" + new P.Duration(-t2).toString$0(0); | |
4717 twoDigitMinutes = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._t
divFast$1(t2, 60000000), 60)); | |
4718 twoDigitSeconds = t1.call$1(C.JSInt_methods.remainder$1(C.JSInt_methods._t
divFast$1(t2, 1000000), 60)); | |
4719 sixDigitUs = new P.Duration_toString_sixDigits().call$1(C.JSInt_methods.re
mainder$1(t2, 1000000)); | |
4720 return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDig
itMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); | |
4721 } | |
4722 }, | |
4723 Duration_toString_sixDigits: { | |
4724 "^": "Closure:10;", | |
4725 call$1: function(n) { | |
4726 if (n >= 100000) | |
4727 return "" + n; | |
4728 if (n >= 10000) | |
4729 return "0" + n; | |
4730 if (n >= 1000) | |
4731 return "00" + n; | |
4732 if (n >= 100) | |
4733 return "000" + n; | |
4734 if (n >= 10) | |
4735 return "0000" + n; | |
4736 return "00000" + n; | |
4737 } | |
4738 }, | |
4739 Duration_toString_twoDigits: { | |
4740 "^": "Closure:10;", | |
4741 call$1: function(n) { | |
4742 if (n >= 10) | |
4743 return "" + n; | |
4744 return "0" + n; | |
4745 } | |
4746 }, | |
4747 Error: { | |
4748 "^": "Object;", | |
4749 get$stackTrace: function() { | |
4750 return H.getTraceFromException(this.$thrownJsError); | |
4751 } | |
4752 }, | |
4753 NullThrownError: { | |
4754 "^": "Error;", | |
4755 toString$0: function(_) { | |
4756 return "Throw of null."; | |
4757 } | |
4758 }, | |
4759 ArgumentError: { | |
4760 "^": "Error;_hasValue,invalidValue,name,message", | |
4761 get$_errorName: function() { | |
4762 return "Invalid argument" + (!this._hasValue ? "(s)" : ""); | |
4763 }, | |
4764 get$_errorExplanation: function() { | |
4765 return ""; | |
4766 }, | |
4767 toString$0: function(_) { | |
4768 var t1, nameString, message, prefix, explanation, errorValue; | |
4769 t1 = this.name; | |
4770 nameString = t1 != null ? " (" + H.S(t1) + ")" : ""; | |
4771 t1 = this.message; | |
4772 message = t1 == null ? "" : ": " + H.S(t1); | |
4773 prefix = this.get$_errorName() + nameString + message; | |
4774 if (!this._hasValue) | |
4775 return prefix; | |
4776 explanation = this.get$_errorExplanation(); | |
4777 errorValue = P.Error_safeToString(this.invalidValue); | |
4778 return prefix + explanation + ": " + H.S(errorValue); | |
4779 }, | |
4780 static: {ArgumentError$: function(message) { | |
4781 return new P.ArgumentError(false, null, null, message); | |
4782 }} | |
4783 }, | |
4784 RangeError: { | |
4785 "^": "ArgumentError;start,end,_hasValue,invalidValue,name,message", | |
4786 get$_errorName: function() { | |
4787 return "RangeError"; | |
4788 }, | |
4789 get$_errorExplanation: function() { | |
4790 var t1, explanation, t2; | |
4791 t1 = this.start; | |
4792 if (t1 == null) { | |
4793 t1 = this.end; | |
4794 explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""
; | |
4795 } else { | |
4796 t2 = this.end; | |
4797 if (t2 == null) | |
4798 explanation = ": Not greater than or equal to " + H.S(t1); | |
4799 else { | |
4800 if (typeof t2 !== "number") | |
4801 return t2.$gt(); | |
4802 if (typeof t1 !== "number") | |
4803 return H.iae(t1); | |
4804 if (t2 > t1) | |
4805 explanation = ": Not in range " + t1 + ".." + t2 + ", inclusive"; | |
4806 else | |
4807 explanation = t2 < t1 ? ": Valid value range is empty" : ": Only val
id value is " + t1; | |
4808 } | |
4809 } | |
4810 return explanation; | |
4811 }, | |
4812 static: {RangeError$value: function(value, $name, message) { | |
4813 return new P.RangeError(null, null, true, value, $name, "Value not in ra
nge"); | |
4814 }, RangeError$range: function(invalidValue, minValue, maxValue, $name, mes
sage) { | |
4815 return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "
Invalid value"); | |
4816 }, RangeError_checkValidRange: function(start, end, $length, startName, en
dName, message) { | |
4817 if (0 > start || start > $length) | |
4818 throw H.wrapException(P.RangeError$range(start, 0, $length, "start", m
essage)); | |
4819 if (start > end || end > $length) | |
4820 throw H.wrapException(P.RangeError$range(end, start, $length, "end", m
essage)); | |
4821 return end; | |
4822 }} | |
4823 }, | |
4824 IndexError: { | |
4825 "^": "ArgumentError;indexable,length>,_hasValue,invalidValue,name,message", | |
4826 get$_errorName: function() { | |
4827 return "RangeError"; | |
4828 }, | |
4829 get$_errorExplanation: function() { | |
4830 P.Error_safeToString(this.indexable); | |
4831 var explanation = ": index should be less than " + H.S(this.length); | |
4832 return J.$lt$n(this.invalidValue, 0) ? ": index must not be negative" : ex
planation; | |
4833 }, | |
4834 static: {IndexError$: function(invalidValue, indexable, $name, message, $len
gth) { | |
4835 var t1 = $length != null ? $length : J.get$length$as(indexable); | |
4836 return new P.IndexError(indexable, t1, true, invalidValue, $name, "Index
out of range"); | |
4837 }} | |
4838 }, | |
4839 UnsupportedError: { | |
4840 "^": "Error;message", | |
4841 toString$0: function(_) { | |
4842 return "Unsupported operation: " + this.message; | |
4843 } | |
4844 }, | |
4845 StateError: { | |
4846 "^": "Error;message", | |
4847 toString$0: function(_) { | |
4848 return "Bad state: " + this.message; | |
4849 } | |
4850 }, | |
4851 ConcurrentModificationError: { | |
4852 "^": "Error;modifiedObject", | |
4853 toString$0: function(_) { | |
4854 var t1 = this.modifiedObject; | |
4855 if (t1 == null) | |
4856 return "Concurrent modification during iteration."; | |
4857 return "Concurrent modification during iteration: " + H.S(P.Error_safeToSt
ring(t1)) + "."; | |
4858 } | |
4859 }, | |
4860 StackOverflowError: { | |
4861 "^": "Object;", | |
4862 toString$0: function(_) { | |
4863 return "Stack Overflow"; | |
4864 }, | |
4865 get$stackTrace: function() { | |
4866 return; | |
4867 }, | |
4868 $isError: 1 | |
4869 }, | |
4870 CyclicInitializationError: { | |
4871 "^": "Error;variableName", | |
4872 toString$0: function(_) { | |
4873 return "Reading static variable '" + this.variableName + "' during its ini
tialization"; | |
4874 } | |
4875 }, | |
4876 _ExceptionImplementation: { | |
4877 "^": "Object;message", | |
4878 toString$0: function(_) { | |
4879 var t1 = this.message; | |
4880 if (t1 == null) | |
4881 return "Exception"; | |
4882 return "Exception: " + H.S(t1); | |
4883 } | |
4884 }, | |
4885 Expando: { | |
4886 "^": "Object;name", | |
4887 toString$0: function(_) { | |
4888 return "Expando:" + H.S(this.name); | |
4889 }, | |
4890 $index: function(_, object) { | |
4891 var values = H.Primitives_getProperty(object, "expando$values"); | |
4892 return values == null ? null : H.Primitives_getProperty(values, this._getK
ey$0()); | |
4893 }, | |
4894 $indexSet: function(_, object, value) { | |
4895 var values = H.Primitives_getProperty(object, "expando$values"); | |
4896 if (values == null) { | |
4897 values = new P.Object(); | |
4898 H.Primitives_setProperty(object, "expando$values", values); | |
4899 } | |
4900 H.Primitives_setProperty(values, this._getKey$0(), value); | |
4901 }, | |
4902 _getKey$0: function() { | |
4903 var key, t1; | |
4904 key = H.Primitives_getProperty(this, "expando$key"); | |
4905 if (key == null) { | |
4906 t1 = $.Expando__keyCount; | |
4907 $.Expando__keyCount = t1 + 1; | |
4908 key = "expando$key$" + t1; | |
4909 H.Primitives_setProperty(this, "expando$key", key); | |
4910 } | |
4911 return key; | |
4912 } | |
4913 }, | |
4914 $int: { | |
4915 "^": "num;" | |
4916 }, | |
4917 "+int": 0, | |
4918 Iterable: { | |
4919 "^": "Object;", | |
4920 map$1: function(_, f) { | |
4921 return H.MappedIterable_MappedIterable(this, f, H.getRuntimeTypeArgument(t
his, "Iterable", 0), null); | |
4922 }, | |
4923 forEach$1: function(_, f) { | |
4924 var t1; | |
4925 for (t1 = this.get$iterator(this); t1.moveNext$0();) | |
4926 f.call$1(t1.get$current()); | |
4927 }, | |
4928 toList$1$growable: function(_, growable) { | |
4929 return P.List_List$from(this, growable, H.getRuntimeTypeArgument(this, "It
erable", 0)); | |
4930 }, | |
4931 toList$0: function($receiver) { | |
4932 return this.toList$1$growable($receiver, true); | |
4933 }, | |
4934 get$length: function(_) { | |
4935 var it, count; | |
4936 it = this.get$iterator(this); | |
4937 for (count = 0; it.moveNext$0();) | |
4938 ++count; | |
4939 return count; | |
4940 }, | |
4941 elementAt$1: function(_, index) { | |
4942 var t1, elementIndex, element; | |
4943 if (index < 0) | |
4944 H.throwExpression(P.RangeError$range(index, 0, null, "index", null)); | |
4945 for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { | |
4946 element = t1.get$current(); | |
4947 if (index === elementIndex) | |
4948 return element; | |
4949 ++elementIndex; | |
4950 } | |
4951 throw H.wrapException(P.IndexError$(index, this, "index", null, elementInd
ex)); | |
4952 }, | |
4953 toString$0: function(_) { | |
4954 return P.IterableBase_iterableToShortString(this, "(", ")"); | |
4955 } | |
4956 }, | |
4957 Iterator: { | |
4958 "^": "Object;" | |
4959 }, | |
4960 List: { | |
4961 "^": "Object;", | |
4962 $isEfficientLengthIterable: 1 | |
4963 }, | |
4964 "+List": 0, | |
4965 Null: { | |
4966 "^": "Object;", | |
4967 toString$0: function(_) { | |
4968 return "null"; | |
4969 } | |
4970 }, | |
4971 "+Null": 0, | |
4972 num: { | |
4973 "^": "Object;" | |
4974 }, | |
4975 "+num": 0, | |
4976 Object: { | |
4977 "^": ";", | |
4978 $eq: function(_, other) { | |
4979 return this === other; | |
4980 }, | |
4981 get$hashCode: function(_) { | |
4982 return H.Primitives_objectHashCode(this); | |
4983 }, | |
4984 toString$0: function(_) { | |
4985 return H.Primitives_objectToString(this); | |
4986 } | |
4987 }, | |
4988 StackTrace: { | |
4989 "^": "Object;" | |
4990 }, | |
4991 String: { | |
4992 "^": "Object;" | |
4993 }, | |
4994 "+String": 0, | |
4995 StringBuffer: { | |
4996 "^": "Object;_contents<", | |
4997 get$length: function(_) { | |
4998 return this._contents.length; | |
4999 }, | |
5000 toString$0: function(_) { | |
5001 var t1 = this._contents; | |
5002 return t1.charCodeAt(0) == 0 ? t1 : t1; | |
5003 }, | |
5004 static: {StringBuffer__writeAll: function(string, objects, separator) { | |
5005 var iterator = J.get$iterator$a(objects); | |
5006 if (!iterator.moveNext$0()) | |
5007 return string; | |
5008 if (separator.length === 0) { | |
5009 do | |
5010 string += H.S(iterator.get$current()); | |
5011 while (iterator.moveNext$0()); | |
5012 } else { | |
5013 string += H.S(iterator.get$current()); | |
5014 for (; iterator.moveNext$0();) | |
5015 string = string + separator + H.S(iterator.get$current()); | |
5016 } | |
5017 return string; | |
5018 }} | |
5019 }, | |
5020 Symbol: { | |
5021 "^": "Object;" | |
5022 } | |
5023 }], ["dart.isolate", "dart:isolate",, P, { | |
5024 "^": "", | |
5025 Capability: { | |
5026 "^": "Object;" | |
5027 } | |
5028 }], ["dart2js._js_primitives", "dart:_js_primitives",, H, { | |
5029 "^": "", | |
5030 printString: function(string) { | |
5031 if (typeof dartPrint == "function") { | |
5032 dartPrint(string); | |
5033 return; | |
5034 } | |
5035 if (typeof console == "object" && typeof console.log != "undefined") { | |
5036 console.log(string); | |
5037 return; | |
5038 } | |
5039 if (typeof window == "object") | |
5040 return; | |
5041 if (typeof print == "function") { | |
5042 print(string); | |
5043 return; | |
5044 } | |
5045 throw "Unable to print message: " + String(string); | |
5046 } | |
5047 }], ["", "test.dart",, V, { | |
5048 "^": "", | |
5049 main: [function() { | |
5050 var $goto = 0, completer = new P.Completer_Completer(), $returnValue, handle
r = 2, currentError; | |
5051 function main(errorCode, result) { | |
5052 if (errorCode === 1) { | |
5053 currentError = result; | |
5054 $goto = handler; | |
5055 } | |
5056 while (true) | |
5057 switch ($goto) { | |
5058 case 0: | |
5059 // Function start | |
5060 // goto return | |
5061 $goto = 1; | |
5062 break; | |
5063 case 1: | |
5064 // return | |
5065 return H.asyncHelper($returnValue, 0, completer, null); | |
5066 case 2: | |
5067 // rethrow | |
5068 return H.asyncHelper(currentError, 1, completer); | |
5069 } | |
5070 } | |
5071 return H.asyncHelper(null, main, completer, null); | |
5072 }, "call$0", "main$closure", 0, 0, 16] | |
5073 }, 1]]; | |
5074 setupProgram(dart, 0); | |
5075 // getInterceptor methods | |
5076 J.getInterceptor = function(receiver) { | |
5077 if (typeof receiver == "number") { | |
5078 if (Math.floor(receiver) == receiver) | |
5079 return J.JSInt.prototype; | |
5080 return J.JSDouble.prototype; | |
5081 } | |
5082 if (typeof receiver == "string") | |
5083 return J.JSString.prototype; | |
5084 if (receiver == null) | |
5085 return J.JSNull.prototype; | |
5086 if (typeof receiver == "boolean") | |
5087 return J.JSBool.prototype; | |
5088 if (receiver.constructor == Array) | |
5089 return J.JSArray.prototype; | |
5090 if (!(receiver instanceof P.Object)) | |
5091 return J.UnknownJavaScriptObject.prototype; | |
5092 return receiver; | |
5093 }; | |
5094 J.getInterceptor$a = function(receiver) { | |
5095 if (receiver == null) | |
5096 return receiver; | |
5097 if (receiver.constructor == Array) | |
5098 return J.JSArray.prototype; | |
5099 if (!(receiver instanceof P.Object)) | |
5100 return J.UnknownJavaScriptObject.prototype; | |
5101 return receiver; | |
5102 }; | |
5103 J.getInterceptor$as = function(receiver) { | |
5104 if (typeof receiver == "string") | |
5105 return J.JSString.prototype; | |
5106 if (receiver == null) | |
5107 return receiver; | |
5108 if (receiver.constructor == Array) | |
5109 return J.JSArray.prototype; | |
5110 if (!(receiver instanceof P.Object)) | |
5111 return J.UnknownJavaScriptObject.prototype; | |
5112 return receiver; | |
5113 }; | |
5114 J.getInterceptor$n = function(receiver) { | |
5115 if (typeof receiver == "number") | |
5116 return J.JSNumber.prototype; | |
5117 if (receiver == null) | |
5118 return receiver; | |
5119 if (!(receiver instanceof P.Object)) | |
5120 return J.UnknownJavaScriptObject.prototype; | |
5121 return receiver; | |
5122 }; | |
5123 J.getInterceptor$ns = function(receiver) { | |
5124 if (typeof receiver == "number") | |
5125 return J.JSNumber.prototype; | |
5126 if (typeof receiver == "string") | |
5127 return J.JSString.prototype; | |
5128 if (receiver == null) | |
5129 return receiver; | |
5130 if (!(receiver instanceof P.Object)) | |
5131 return J.UnknownJavaScriptObject.prototype; | |
5132 return receiver; | |
5133 }; | |
5134 J.$add$ns = function(receiver, a0) { | |
5135 if (typeof receiver == "number" && typeof a0 == "number") | |
5136 return receiver + a0; | |
5137 return J.getInterceptor$ns(receiver).$add(receiver, a0); | |
5138 }; | |
5139 J.$eq = function(receiver, a0) { | |
5140 if (receiver == null) | |
5141 return a0 == null; | |
5142 if (typeof receiver != "object") | |
5143 return a0 != null && receiver === a0; | |
5144 return J.getInterceptor(receiver).$eq(receiver, a0); | |
5145 }; | |
5146 J.$index$as = function(receiver, a0) { | |
5147 if (receiver.constructor == Array || typeof receiver == "string") | |
5148 if (a0 >>> 0 === a0 && a0 < receiver.length) | |
5149 return receiver[a0]; | |
5150 return J.getInterceptor$as(receiver).$index(receiver, a0); | |
5151 }; | |
5152 J.$lt$n = function(receiver, a0) { | |
5153 if (typeof receiver == "number" && typeof a0 == "number") | |
5154 return receiver < a0; | |
5155 return J.getInterceptor$n(receiver).$lt(receiver, a0); | |
5156 }; | |
5157 J.elementAt$1$a = function(receiver, a0) { | |
5158 return J.getInterceptor$a(receiver).elementAt$1(receiver, a0); | |
5159 }; | |
5160 J.forEach$1$a = function(receiver, a0) { | |
5161 return J.getInterceptor$a(receiver).forEach$1(receiver, a0); | |
5162 }; | |
5163 J.get$hashCode$ = function(receiver) { | |
5164 return J.getInterceptor(receiver).get$hashCode(receiver); | |
5165 }; | |
5166 J.get$iterator$a = function(receiver) { | |
5167 return J.getInterceptor$a(receiver).get$iterator(receiver); | |
5168 }; | |
5169 J.get$length$as = function(receiver) { | |
5170 return J.getInterceptor$as(receiver).get$length(receiver); | |
5171 }; | |
5172 J.map$1$a = function(receiver, a0) { | |
5173 return J.getInterceptor$a(receiver).map$1(receiver, a0); | |
5174 }; | |
5175 J.toString$0 = function(receiver) { | |
5176 return J.getInterceptor(receiver).toString$0(receiver); | |
5177 }; | |
5178 C.JSArray_methods = J.JSArray.prototype; | |
5179 C.JSInt_methods = J.JSInt.prototype; | |
5180 C.JSString_methods = J.JSString.prototype; | |
5181 C.C_DynamicRuntimeType = new H.DynamicRuntimeType(); | |
5182 C.C__RootZone = new P._RootZone(); | |
5183 C.Duration_0 = new P.Duration(0); | |
5184 C.JS_CONST_8ZY = function getTagFallback(o) { | |
5185 var constructor = o.constructor; | |
5186 if (typeof constructor == "function") { | |
5187 var name = constructor.name; | |
5188 if (typeof name == "string" && | |
5189 name.length > 2 && | |
5190 name !== "Object" && | |
5191 name !== "Function.prototype") { | |
5192 return name; | |
5193 } | |
5194 } | |
5195 var s = Object.prototype.toString.call(o); | |
5196 return s.substring(8, s.length - 1); | |
5197 }; | |
5198 { | |
5199 init.isHunkLoaded = function(hunkHash) { | |
5200 return !!$dart_deferred_initializers[hunkHash]; | |
5201 }; | |
5202 init.deferredInitialized = new Object(null); | |
5203 init.isHunkInitialized = function(hunkHash) { | |
5204 return init.deferredInitialized[hunkHash]; | |
5205 }; | |
5206 init.initializeLoadedHunk = function(hunkHash) { | |
5207 $dart_deferred_initializers[hunkHash](globalsHolder, $); | |
5208 init.deferredInitialized[hunkHash] = true; | |
5209 }; | |
5210 } | |
5211 init.deferredLibraryUris = {}; | |
5212 init.deferredLibraryHashes = {}; | |
5213 $.Primitives_mirrorFunctionCacheName = "$cachedFunction"; | |
5214 $.Primitives_mirrorInvokeCacheName = "$cachedInvocation"; | |
5215 $.Closure_functionCounter = 0; | |
5216 $.BoundClosure_selfFieldNameCache = null; | |
5217 $.BoundClosure_receiverFieldNameCache = null; | |
5218 $._nextCallback = null; | |
5219 $._lastCallback = null; | |
5220 $._lastPriorityCallback = null; | |
5221 $._isInCallbackLoop = false; | |
5222 $.Zone__current = C.C__RootZone; | |
5223 $.Expando__keyCount = 0; | |
5224 (function(lazies) { | |
5225 var descriptorLength = 4; | |
5226 for (var i = 0; i < lazies.length; i += descriptorLength) { | |
5227 var fieldName = lazies[i]; | |
5228 var getterName = lazies[i + 1]; | |
5229 var lazyValue = lazies[i + 2]; | |
5230 var staticName = lazies[i + 3]; | |
5231 Isolate.$lazy(fieldName, getterName, lazyValue, staticName); | |
5232 } | |
5233 })(["IsolateNatives_thisScript", "get$IsolateNatives_thisScript", function() { | |
5234 return H.IsolateNatives_computeThisScript(); | |
5235 }, "thisScript", "IsolateNatives_workerIds", "get$IsolateNatives_workerIds", fun
ction() { | |
5236 return new P.Expando(null); | |
5237 }, "workerIds", "TypeErrorDecoder_noSuchMethodPattern", "get$TypeErrorDecoder_no
SuchMethodPattern", function() { | |
5238 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({toString: function() { | |
5239 return "$receiver$"; | |
5240 }})); | |
5241 }, "noSuchMethodPattern", "TypeErrorDecoder_notClosurePattern", "get$TypeErrorDe
coder_notClosurePattern", function() { | |
5242 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({$method$: null, toString: function() { | |
5243 return "$receiver$"; | |
5244 }})); | |
5245 }, "notClosurePattern", "TypeErrorDecoder_nullCallPattern", "get$TypeErrorDecode
r_nullCallPattern", function() { | |
5246 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(null)); | |
5247 }, "nullCallPattern", "TypeErrorDecoder_nullLiteralCallPattern", "get$TypeErrorD
ecoder_nullLiteralCallPattern", function() { | |
5248 return H.TypeErrorDecoder_extractPattern(function() { | |
5249 var $argumentsExpr$ = '$arguments$'; | |
5250 try { | |
5251 null.$method$($argumentsExpr$); | |
5252 } catch (e) { | |
5253 return e.message; | |
5254 } | |
5255 }()); | |
5256 }, "nullLiteralCallPattern", "TypeErrorDecoder_undefinedCallPattern", "get$TypeE
rrorDecoder_undefinedCallPattern", function() { | |
5257 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(void 0)); | |
5258 }, "undefinedCallPattern", "TypeErrorDecoder_undefinedLiteralCallPattern", "get$
TypeErrorDecoder_undefinedLiteralCallPattern", function() { | |
5259 return H.TypeErrorDecoder_extractPattern(function() { | |
5260 var $argumentsExpr$ = '$arguments$'; | |
5261 try { | |
5262 (void 0).$method$($argumentsExpr$); | |
5263 } catch (e) { | |
5264 return e.message; | |
5265 } | |
5266 }()); | |
5267 }, "undefinedLiteralCallPattern", "TypeErrorDecoder_nullPropertyPattern", "get$T
ypeErrorDecoder_nullPropertyPattern", function() { | |
5268 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(null)); | |
5269 }, "nullPropertyPattern", "TypeErrorDecoder_nullLiteralPropertyPattern", "get$Ty
peErrorDecoder_nullLiteralPropertyPattern", function() { | |
5270 return H.TypeErrorDecoder_extractPattern(function() { | |
5271 try { | |
5272 null.$method$; | |
5273 } catch (e) { | |
5274 return e.message; | |
5275 } | |
5276 }()); | |
5277 }, "nullLiteralPropertyPattern", "TypeErrorDecoder_undefinedPropertyPattern", "g
et$TypeErrorDecoder_undefinedPropertyPattern", function() { | |
5278 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(void 0)); | |
5279 }, "undefinedPropertyPattern", "TypeErrorDecoder_undefinedLiteralPropertyPattern
", "get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { | |
5280 return H.TypeErrorDecoder_extractPattern(function() { | |
5281 try { | |
5282 (void 0).$method$; | |
5283 } catch (e) { | |
5284 return e.message; | |
5285 } | |
5286 }()); | |
5287 }, "undefinedLiteralPropertyPattern", "_AsyncRun_scheduleImmediateClosure", "get
$_AsyncRun_scheduleImmediateClosure", function() { | |
5288 return P._AsyncRun__initializeScheduleImmediate(); | |
5289 }, "scheduleImmediateClosure", "_toStringVisiting", "get$_toStringVisiting", fun
ction() { | |
5290 return []; | |
5291 }, "_toStringVisiting"]); | |
5292 ; | |
5293 | |
5294 { | |
5295 init.metadata = [null]; | |
5296 init.types = [{func: 1}, {func: 1, void: true}, {func: 1, args: [,]}, {func: 1
, args: [, P.StackTrace]}, {func: 1, args: [{func: 1, void: true}]}, {func: 1, a
rgs: [,], opt: [,]}, {func: 1, ret: P.bool}, {func: 1, void: true, args: [P.Obje
ct], opt: [P.StackTrace]}, {func: 1, args: [,,]}, {func: 1, args: [P.Symbol,,]},
{func: 1, ret: P.String, args: [P.$int]}, {func: 1, void: true, args: [{func: 1
, void: true}]}, {func: 1, ret: P.bool, args: [,,]}, {func: 1, ret: P.$int, args
: [,]}, {func: 1, ret: P.bool, args: [P.Object, P.Object]}, {func: 1, ret: P.$in
t, args: [P.Object]}, {func: 1, ret: P.Future}]; | |
5297 } | |
5298 | |
5299 $ = null; | |
5300 Isolate = Isolate.$finishIsolateConstructor(Isolate); | |
5301 $ = new Isolate(); | |
5302 function convertToFastObject(properties) { | |
5303 function MyClass() { | |
5304 } | |
5305 MyClass.prototype = properties; | |
5306 new MyClass(); | |
5307 return properties; | |
5308 } | |
5309 ; | |
5310 function convertToSlowObject(properties) { | |
5311 properties.__MAGIC_SLOW_PROPERTY = 1; | |
5312 delete properties.__MAGIC_SLOW_PROPERTY; | |
5313 return properties; | |
5314 } | |
5315 ; | |
5316 A = convertToFastObject(A); | |
5317 B = convertToFastObject(B); | |
5318 C = convertToFastObject(C); | |
5319 D = convertToFastObject(D); | |
5320 E = convertToFastObject(E); | |
5321 F = convertToFastObject(F); | |
5322 G = convertToFastObject(G); | |
5323 H = convertToFastObject(H); | |
5324 J = convertToFastObject(J); | |
5325 K = convertToFastObject(K); | |
5326 L = convertToFastObject(L); | |
5327 M = convertToFastObject(M); | |
5328 N = convertToFastObject(N); | |
5329 O = convertToFastObject(O); | |
5330 P = convertToFastObject(P); | |
5331 Q = convertToFastObject(Q); | |
5332 R = convertToFastObject(R); | |
5333 S = convertToFastObject(S); | |
5334 T = convertToFastObject(T); | |
5335 U = convertToFastObject(U); | |
5336 V = convertToFastObject(V); | |
5337 W = convertToFastObject(W); | |
5338 X = convertToFastObject(X); | |
5339 Y = convertToFastObject(Y); | |
5340 Z = convertToFastObject(Z); | |
5341 function init() { | |
5342 Isolate.$isolateProperties = Object.create(null); | |
5343 init.allClasses = Object.create(null); | |
5344 init.getTypeFromName = function(name) { | |
5345 return init.allClasses[name]; | |
5346 }; | |
5347 init.interceptorsByTag = Object.create(null); | |
5348 init.leafTags = Object.create(null); | |
5349 init.finishedClasses = Object.create(null); | |
5350 Isolate.$lazy = function(fieldName, getterName, lazyValue, staticName, prototy
pe) { | |
5351 if (!init.lazies) | |
5352 init.lazies = Object.create(null); | |
5353 init.lazies[fieldName] = getterName; | |
5354 prototype = prototype || Isolate.$isolateProperties; | |
5355 var sentinelUndefined = {}; | |
5356 var sentinelInProgress = {}; | |
5357 prototype[fieldName] = sentinelUndefined; | |
5358 prototype[getterName] = function() { | |
5359 var result = this[fieldName]; | |
5360 try { | |
5361 if (result === sentinelUndefined) { | |
5362 this[fieldName] = sentinelInProgress; | |
5363 try { | |
5364 result = this[fieldName] = lazyValue(); | |
5365 } finally { | |
5366 if (result === sentinelUndefined) | |
5367 this[fieldName] = null; | |
5368 } | |
5369 } else | |
5370 if (result === sentinelInProgress) | |
5371 H.throwCyclicInit(staticName || fieldName); | |
5372 return result; | |
5373 } finally { | |
5374 this[getterName] = function() { | |
5375 return this[fieldName]; | |
5376 }; | |
5377 } | |
5378 }; | |
5379 }; | |
5380 Isolate.$finishIsolateConstructor = function(oldIsolate) { | |
5381 var isolateProperties = oldIsolate.$isolateProperties; | |
5382 function Isolate() { | |
5383 var staticNames = Object.keys(isolateProperties); | |
5384 for (var i = 0; i < staticNames.length; i++) { | |
5385 var staticName = staticNames[i]; | |
5386 this[staticName] = isolateProperties[staticName]; | |
5387 } | |
5388 var lazies = init.lazies; | |
5389 var lazyInitializers = lazies ? Object.keys(lazies) : []; | |
5390 for (var i = 0; i < lazyInitializers.length; i++) | |
5391 this[lazies[lazyInitializers[i]]] = null; | |
5392 function ForceEfficientMap() { | |
5393 } | |
5394 ForceEfficientMap.prototype = this; | |
5395 new ForceEfficientMap(); | |
5396 for (var i = 0; i < lazyInitializers.length; i++) { | |
5397 var lazyInitName = lazies[lazyInitializers[i]]; | |
5398 this[lazyInitName] = isolateProperties[lazyInitName]; | |
5399 } | |
5400 } | |
5401 Isolate.prototype = oldIsolate.prototype; | |
5402 Isolate.prototype.constructor = Isolate; | |
5403 Isolate.$isolateProperties = isolateProperties; | |
5404 return Isolate; | |
5405 }; | |
5406 } | |
5407 ;// BEGIN invoke [main]. | |
5408 (function(callback) { | |
5409 if (typeof document === "undefined") { | |
5410 callback(null); | |
5411 return; | |
5412 } | |
5413 if (document.currentScript) { | |
5414 callback(document.currentScript); | |
5415 return; | |
5416 } | |
5417 var scripts = document.scripts; | |
5418 function onLoad(event) { | |
5419 for (var i = 0; i < scripts.length; ++i) | |
5420 scripts[i].removeEventListener("load", onLoad, false); | |
5421 callback(event.target); | |
5422 } | |
5423 for (var i = 0; i < scripts.length; ++i) | |
5424 scripts[i].addEventListener("load", onLoad, false); | |
5425 })(function(currentScript) { | |
5426 init.currentScript = currentScript; | |
5427 if (typeof dartMainRunner === "function") | |
5428 dartMainRunner(function(a) { | |
5429 H.startRootIsolate(V.main$closure(), a); | |
5430 }, []); | |
5431 else | |
5432 (function(a) { | |
5433 H.startRootIsolate(V.main$closure(), a); | |
5434 })([]); | |
5435 }); | |
5436 ; | |
5437 // END invoke [main]. | |
5438 })() | |
5439 | |
5440 //# sourceMappingURL=out.js.map | |
OLD | NEW |