Index: src/site/codelabs/darrrt/examples/2-inputnamebadge/piratebadge.dart.js |
diff --git a/src/site/samples/geolocation/example/trip_meter.dart.js b/src/site/codelabs/darrrt/examples/2-inputnamebadge/piratebadge.dart.js |
similarity index 79% |
copy from src/site/samples/geolocation/example/trip_meter.dart.js |
copy to src/site/codelabs/darrrt/examples/2-inputnamebadge/piratebadge.dart.js |
index 54ce7bf4a7cf4497d4c7b3aa6ca45f1808c09a5c..ae9abccc5a1b4099d4a75a7bddaea1e76492235f 100644 |
--- a/src/site/samples/geolocation/example/trip_meter.dart.js |
+++ b/src/site/codelabs/darrrt/examples/2-inputnamebadge/piratebadge.dart.js |
@@ -65,19 +65,33 @@ var $$ = {}; |
// Native classes |
// Method closures |
-$$.BoundClosure$2 = [P, {"": "BoundClosure;_self,_target,_receiver,__js_helper$_name", |
+$$.BoundClosure$i0 = [H, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name", |
+ call$0: function() { |
+ return this.__js_helper$_target.call(this._self, this._receiver); |
+ } |
+}]; |
+ |
+$$.BoundClosure$1 = [H, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name", |
+ call$1: function(p0) { |
+ return this.__js_helper$_target.call(this._self, p0); |
+ }, |
+ $is_args1: true |
+}]; |
+ |
+$$.BoundClosure$2 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name", |
call$2: function(p0, p1) { |
- return this._target.call(this._self, p0, p1); |
+ return this.__js_helper$_target.call(this._self, p0, p1); |
}, |
call$1: function(p0) { |
return this.call$2(p0, null); |
}, |
- $is_args2: true |
+ $is_args2: true, |
+ $is_args1: true |
}]; |
-$$.BoundClosure$0 = [P, {"": "BoundClosure;_self,_target,_receiver,__js_helper$_name", |
+$$.BoundClosure$0 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,__js_helper$_name", |
call$0: function() { |
- return this._target.call(this._self); |
+ return this.__js_helper$_target.call(this._self); |
} |
}]; |
@@ -87,13 +101,14 @@ $$.Closure$0 = [H, {"": "Closure;call$0,$name"}]; |
$$.Closure$7 = [H, {"": "Closure;call$7,$name"}]; |
-$$.Closure$1 = [H, {"": "Closure;call$1,$name"}]; |
+$$.Closure$1 = [H, {"": "Closure;call$1,$name", $is_args1: true}]; |
$$.Closure$21 = [P, {"": "Closure;call$2,$name", |
call$1: function(p0) { |
return this.call$2(p0, null); |
}, |
- $is_args2: true |
+ $is_args2: true, |
+ $is_args1: true |
}]; |
(function (reflectionData) { |
@@ -181,7 +196,7 @@ $$.Closure$21 = [P, {"": "Closure;call$2,$name", |
} |
})([ |
["_foreign_helper", "dart:_foreign_helper", , H, { |
-JS_CONST: {"": "Object;code>"}}], |
+JS_CONST: {"": "Object;code"}}], |
["_interceptors", "dart:_interceptors", , J, { |
getInterceptor: function(object) { |
return void 0; |
@@ -194,6 +209,11 @@ makeDispatchRecord: function(interceptor, proto, extension, indexability) { |
getNativeInterceptor: function(object) { |
var record, proto, objectProto; |
record = object[init.dispatchPropertyName]; |
+ if (record == null) |
+ if ($.initNativeDispatchFlag == null) { |
+ H.initNativeDispatch(); |
+ record = object[init.dispatchPropertyName]; |
+ } |
if (record != null) { |
proto = record.p; |
if (false === proto) |
@@ -258,18 +278,6 @@ PlainJavaScriptObject: {"": "JavaScriptObject;"}, |
UnknownJavaScriptObject: {"": "JavaScriptObject;"}, |
JSArray: {"": "List/Interceptor;", |
- add$1: function(receiver, value) { |
- if (!!receiver.fixed$length) |
- H.throwExpression(P.UnsupportedError$("add")); |
- receiver.push(value); |
- }, |
- removeLast$0: function(receiver) { |
- if (!!receiver.fixed$length) |
- H.throwExpression(P.UnsupportedError$("removeLast")); |
- if (receiver.length === 0) |
- throw H.wrapException(P.RangeError$value(-1)); |
- return receiver.pop(); |
- }, |
forEach$1: function(receiver, f) { |
return H.IterableMixinWorkaround_forEach(receiver, f); |
}, |
@@ -323,7 +331,7 @@ JSMutableArray: {"": "JSArray;", $isJSMutableArray: true, |
JSFixedArray: {"": "JSMutableArray;"}, |
-JSExtendableArray: {"": "JSMutableArray;", $isJSExtendableArray: true}, |
+JSExtendableArray: {"": "JSMutableArray;"}, |
JSNumber: {"": "num/Interceptor;", |
remainder$1: function(receiver, b) { |
@@ -331,6 +339,8 @@ JSNumber: {"": "num/Interceptor;", |
}, |
toInt$0: function(receiver) { |
var t1; |
+ if (receiver >= -2147483648 && receiver <= 2147483647) |
+ return receiver | 0; |
if (isFinite(receiver)) { |
t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); |
return t1 + 0; |
@@ -347,11 +357,17 @@ JSNumber: {"": "num/Interceptor;", |
return receiver & 0x1FFFFFFF; |
}, |
$tdiv: function(receiver, other) { |
+ if ((receiver | 0) === receiver && (other | 0) === other && 0 !== other && -1 !== other) |
+ return receiver / other | 0; |
+ else |
+ return this._slowTdiv$1(receiver, other); |
+ }, |
+ _slowTdiv$1: function(receiver, other) { |
return this.toInt$0(receiver / other); |
}, |
$shr: function(receiver, other) { |
if (other < 0) |
- throw H.wrapException(P.ArgumentError$(other)); |
+ throw H.wrapException(new P.ArgumentError(other)); |
if (receiver > 0) { |
if (other > 31) |
return 0; |
@@ -363,7 +379,7 @@ JSNumber: {"": "num/Interceptor;", |
}, |
$lt: function(receiver, other) { |
if (typeof other !== "number") |
- throw H.wrapException(P.ArgumentError$(other)); |
+ throw H.wrapException(new P.ArgumentError(other)); |
return receiver < other; |
}, |
$gt: function(receiver, other) { |
@@ -373,10 +389,14 @@ JSNumber: {"": "num/Interceptor;", |
}, |
$ge: function(receiver, other) { |
if (typeof other !== "number") |
- throw H.wrapException(P.ArgumentError$(other)); |
+ throw H.wrapException(new P.ArgumentError(other)); |
return receiver >= other; |
}, |
- $isnum: true |
+ $isnum: true, |
+ static: { |
+"": "JSNumber__MIN_INT32,JSNumber__MAX_INT32", |
+} |
+ |
}, |
JSInt: {"": "int/JSNumber;", $isdouble: true, $isnum: true, $isint: true}, |
@@ -446,14 +466,20 @@ _callInIsolate: function(isolate, $function) { |
}, |
startRootIsolate: function(entry) { |
- var rootContext; |
+ var rootContext, t1; |
$globalState = H._Manager$(entry); |
if ($globalState.isWorker === true) |
return; |
rootContext = H._IsolateContext$(); |
$globalState.rootContext = rootContext; |
$globalState.currentContext = rootContext; |
- rootContext.eval$1(entry); |
+ t1 = J.getInterceptor(entry); |
+ if (!!t1.$is_args1) |
+ rootContext.eval$1(new H.startRootIsolate_closure(entry)); |
+ else if (!!t1.$is_args2) |
+ rootContext.eval$1(new H.startRootIsolate_closure0(entry)); |
+ else |
+ rootContext.eval$1(entry); |
$globalState.topEventLoop.run$0(); |
}, |
@@ -486,7 +512,7 @@ IsolateNatives_computeThisScriptD8: function() { |
}, |
IsolateNatives__processWorkerMessage: function(sender, e) { |
- var msg, t1, functionName, entryPoint, replyTo, context, t2; |
+ var msg, t1, functionName, entryPoint, args, message, isSpawnUri, replyTo, context, t2; |
msg = H._deserializeMessage(e.data); |
t1 = J.getInterceptor$asx(msg); |
switch (t1.$index(msg, "command")) { |
@@ -494,18 +520,21 @@ IsolateNatives__processWorkerMessage: function(sender, e) { |
$globalState.currentManagerId = t1.$index(msg, "id"); |
functionName = t1.$index(msg, "functionName"); |
entryPoint = functionName == null ? $globalState.entry : init.globalFunctions[functionName]; |
+ args = t1.$index(msg, "args"); |
+ message = H._deserializeMessage(t1.$index(msg, "msg")); |
+ isSpawnUri = t1.$index(msg, "isSpawnUri"); |
replyTo = H._deserializeMessage(t1.$index(msg, "replyTo")); |
context = H._IsolateContext$(); |
- $globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, new H.IsolateNatives__processWorkerMessage_closure(entryPoint, replyTo), "worker-start")); |
+ $globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, new H.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, isSpawnUri, replyTo), "worker-start")); |
$globalState.currentContext = context; |
$globalState.topEventLoop.run$0(); |
break; |
case "spawn-worker": |
- H.IsolateNatives__spawnWorker(t1.$index(msg, "functionName"), t1.$index(msg, "uri"), t1.$index(msg, "replyPort")); |
+ H.IsolateNatives__spawnWorker(t1.$index(msg, "functionName"), t1.$index(msg, "uri"), t1.$index(msg, "args"), t1.$index(msg, "msg"), t1.$index(msg, "isSpawnUri"), t1.$index(msg, "replyPort")); |
break; |
case "message": |
if (t1.$index(msg, "port") != null) |
- t1.$index(msg, "port").send$2(t1.$index(msg, "msg"), t1.$index(msg, "replyTo")); |
+ t1.$index(msg, "port").send$1(t1.$index(msg, "msg")); |
$globalState.topEventLoop.run$0(); |
break; |
case "close": |
@@ -551,17 +580,27 @@ IsolateNatives__log: function(msg) { |
}, |
-IsolateNatives__startIsolate: function(topLevel, replyTo) { |
+IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, replyTo) { |
var t1; |
H.Primitives_initializeStatics($globalState.currentContext.id); |
$.lazyPort = H.ReceivePortImpl$(); |
- t1 = P._Isolate_port(); |
+ t1 = $.lazyPort; |
t1.toString; |
- replyTo.send$2("spawned", new H._NativeJsSendPort(t1, $globalState.currentContext.id)); |
- topLevel.call$0(); |
+ replyTo.send$1(["spawned", new H._NativeJsSendPort(t1, $globalState.currentContext.id)]); |
+ if (isSpawnUri !== true) |
+ topLevel.call$1(message); |
+ else { |
+ t1 = J.getInterceptor(topLevel); |
+ if (!!t1.$is_args2) |
+ topLevel.call$2(args, message); |
+ else if (!!t1.$is_args1) |
+ topLevel.call$1(args); |
+ else |
+ topLevel.call$0(); |
+ } |
}, |
-IsolateNatives__spawnWorker: function(functionName, uri, replyPort) { |
+IsolateNatives__spawnWorker: function(functionName, uri, args, message, isSpawnUri, replyPort) { |
var worker, t1, workerId; |
if (uri == null) |
uri = $.get$IsolateNatives_thisScript(); |
@@ -574,7 +613,7 @@ IsolateNatives__spawnWorker: function(functionName, uri, replyPort) { |
t1.$indexSet(t1, worker, workerId); |
t1 = $globalState.managers; |
t1.$indexSet(t1, workerId, worker); |
- worker.postMessage(H._serializeMessage(H.fillLiteralMap(["command", "start", "id", workerId, "replyTo", H._serializeMessage(replyPort), "functionName", functionName], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null)))); |
+ worker.postMessage(H._serializeMessage(H.fillLiteralMap(["command", "start", "id", workerId, "replyTo", H._serializeMessage(replyPort), "args", args, "msg", H._serializeMessage(message), "isSpawnUri", isSpawnUri, "functionName", functionName], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null)))); |
}, |
_waitForPendingPorts: function(message, callback) { |
@@ -611,24 +650,16 @@ _Deserializer_isPrimitive: function(x) { |
return x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean"; |
}, |
-CloseToken: {"": "Object;", $isCloseToken: true}, |
+startRootIsolate_closure: {"": "Closure;entry_0", |
+ call$0: function() { |
+ this.entry_0.call$1([]); |
+ } |
+}, |
-JsIsolateSink: {"": "EventSink;_isClosed,_port<", |
- add$1: function(_, message) { |
- this._port.send$1(message); |
- }, |
- $eq: function(_, other) { |
- var t1; |
- if (other == null) |
- return false; |
- t1 = J.getInterceptor(other); |
- return typeof other === "object" && other !== null && !!t1.$isIsolateSink && J.$eq(this._port, other.get$_port()); |
- }, |
- get$hashCode: function(_) { |
- return J.get$hashCode$(this._port) + 499; |
- }, |
- $isJsIsolateSink: true, |
- $isIsolateSink: true |
+startRootIsolate_closure0: {"": "Closure;entry_1", |
+ call$0: function() { |
+ this.entry_1.call$2([], null); |
+ } |
}, |
_Manager: {"": "Object;nextIsolateId,currentManagerId,nextManagerId,currentContext,rootContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,mainManager,managers,entry", |
@@ -794,62 +825,17 @@ _IsolateEvent: {"": "Object;isolate,fn,message", |
_MainManagerStub: {"": "Object;"}, |
-IsolateNatives__processWorkerMessage_closure: {"": "Closure;entryPoint_0,replyTo_1", |
+IsolateNatives__processWorkerMessage_closure: {"": "Closure;entryPoint_0,args_1,message_2,isSpawnUri_3,replyTo_4", |
call$0: function() { |
- H.IsolateNatives__startIsolate(this.entryPoint_0, this.replyTo_1); |
+ H.IsolateNatives__startIsolate(this.entryPoint_0, this.args_1, this.message_2, this.isSpawnUri_3, this.replyTo_4); |
} |
}, |
-_BaseSendPort: {"": "Object;", |
- _checkReplyTo$1: function(replyTo) { |
- var t1; |
- if (replyTo != null) { |
- t1 = J.getInterceptor(replyTo); |
- t1 = (typeof replyTo !== "object" || replyTo === null || !t1.$is_NativeJsSendPort) && (typeof replyTo !== "object" || replyTo === null || !t1.$is_WorkerSendPort) && true; |
- } else |
- t1 = false; |
- if (t1) |
- throw H.wrapException(P.Exception_Exception("SendPort.send: Illegal replyTo port type")); |
- }, |
- call$1: function(message) { |
- var t1, completer, port; |
- t1 = null; |
- completer = new P._AsyncCompleter(P._Future$(t1)); |
- H.setRuntimeTypeInfo(completer, [t1]); |
- port = H.ReceivePortImpl$(); |
- this.send$2(message, new H._NativeJsSendPort(port, $globalState.currentContext.id)); |
- port._callback = new H._BaseSendPort_call_closure(completer, port); |
- return completer.future; |
- }, |
- $isSendPort: true |
-}, |
- |
-_BaseSendPort_call_closure: {"": "Closure;completer_0,port_1", |
- call$2: function(value, ignoreReplyTo) { |
- var t1, t2; |
- t1 = this.port_1; |
- t1._callback = null; |
- $globalState.currentContext.unregister$1(t1._id); |
- t1 = J.getInterceptor(value); |
- t2 = this.completer_0; |
- if (typeof value === "object" && value !== null && !!t1.$isException) { |
- t1 = t2.future; |
- if (t1._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
- t1._asyncCompleteError$2(value, null); |
- } else { |
- t1 = t2.future; |
- if (t1._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
- t1._asyncComplete$1(value); |
- } |
- }, |
- $is_args2: true |
-}, |
+_BaseSendPort: {"": "Object;", $isSendPort: true}, |
_NativeJsSendPort: {"": "_BaseSendPort;_receivePort,_isolateId", |
send$2: function(message, replyTo) { |
- H._waitForPendingPorts([message, replyTo], new H._NativeJsSendPort_send_closure(this, message, replyTo)); |
+ H._waitForPendingPorts(message, new H._NativeJsSendPort_send_closure(this, message)); |
}, |
send$1: function(message) { |
return this.send$2(message, null); |
@@ -868,53 +854,50 @@ _NativeJsSendPort: {"": "_BaseSendPort;_receivePort,_isolateId", |
$isSendPort: true |
}, |
-_NativeJsSendPort_send_closure: {"": "Closure;this_1,message_2,replyTo_3", |
+_NativeJsSendPort_send_closure: {"": "Closure;this_1,message_2", |
call$0: function() { |
- var t1, t2, t3, t4, t5, isolate, shouldSerialize, msg; |
+ var t1, t2, t3, t4, isolate, shouldSerialize, msg; |
t1 = {}; |
- t2 = this.this_1; |
- t3 = this.replyTo_3; |
- t2._checkReplyTo$1(t3); |
- t4 = $globalState.isolates; |
- t5 = t2._isolateId; |
- isolate = t4.$index(t4, t5); |
+ t2 = $globalState.isolates; |
+ t3 = this.this_1; |
+ t4 = t3._isolateId; |
+ isolate = t2.$index(t2, t4); |
if (isolate == null) |
return; |
- if (t2._receivePort.get$_callback() == null) |
+ if ((t3._receivePort.get$_controller()._state & 4) !== 0) |
return; |
- shouldSerialize = $globalState.currentContext != null && $globalState.currentContext.id !== t5; |
+ shouldSerialize = $globalState.currentContext != null && $globalState.currentContext.id !== t4; |
msg = this.message_2; |
t1.msg_0 = msg; |
- t1.reply_1 = t3; |
- if (shouldSerialize) { |
+ if (shouldSerialize) |
t1.msg_0 = H._serializeMessage(t1.msg_0); |
- t1.reply_1 = H._serializeMessage(t1.reply_1); |
- } |
- t3 = $globalState.topEventLoop; |
+ t2 = $globalState.topEventLoop; |
t4 = "receive " + H.S(msg); |
- t3.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send__closure(t1, t2, shouldSerialize), t4)); |
+ t2.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send__closure(t1, t3, shouldSerialize), t4)); |
} |
}, |
-_NativeJsSendPort_send__closure: {"": "Closure;box_0,this_4,shouldSerialize_5", |
+_NativeJsSendPort_send__closure: {"": "Closure;box_0,this_3,shouldSerialize_4", |
call$0: function() { |
var t1, t2; |
- t1 = this.this_4._receivePort; |
- if (t1.get$_callback() != null) { |
- if (this.shouldSerialize_5) { |
+ t1 = this.this_3._receivePort; |
+ if ((t1.get$_controller()._state & 4) === 0) { |
+ if (this.shouldSerialize_4) { |
t2 = this.box_0; |
t2.msg_0 = H._deserializeMessage(t2.msg_0); |
- t2.reply_1 = H._deserializeMessage(t2.reply_1); |
} |
- t2 = this.box_0; |
- t1._callback$2(t2.msg_0, t2.reply_1); |
+ t1 = t1.get$_controller(); |
+ t2 = this.box_0.msg_0; |
+ if (t1._state >= 4) |
+ H.throwExpression(t1._badEventState$0()); |
+ t1._async$_add$1(t2); |
} |
} |
}, |
_WorkerSendPort: {"": "_BaseSendPort;_workerId,_receivePortId,_isolateId", |
send$2: function(message, replyTo) { |
- H._waitForPendingPorts([message, replyTo], new H._WorkerSendPort_send_closure(this, message, replyTo)); |
+ H._waitForPendingPorts(message, new H._WorkerSendPort_send_closure(this, message)); |
}, |
send$1: function(message) { |
return this.send$2(message, null); |
@@ -947,13 +930,11 @@ _WorkerSendPort: {"": "_BaseSendPort;_workerId,_receivePortId,_isolateId", |
$isSendPort: true |
}, |
-_WorkerSendPort_send_closure: {"": "Closure;this_0,message_1,replyTo_2", |
+_WorkerSendPort_send_closure: {"": "Closure;this_0,message_1", |
call$0: function() { |
- var t1, t2, workerMessage, manager; |
+ var t1, workerMessage, t2, manager; |
t1 = this.this_0; |
- t2 = this.replyTo_2; |
- t1._checkReplyTo$1(t2); |
- workerMessage = H._serializeMessage(H.fillLiteralMap(["command", "message", "port", t1, "msg", this.message_1, "replyTo", t2], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null))); |
+ workerMessage = H._serializeMessage(H.fillLiteralMap(["command", "message", "port", t1, "msg", this.message_1], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null))); |
if ($globalState.isWorker === true) { |
$globalState.mainManager.toString; |
self.postMessage(workerMessage); |
@@ -966,11 +947,26 @@ _WorkerSendPort_send_closure: {"": "Closure;this_0,message_1,replyTo_2", |
} |
}, |
-ReceivePortImpl: {"": "Object;_id<,_callback<", |
- _callback$2: function(arg0, arg1) { |
- return this._callback.call$2(arg0, arg1); |
+ReceivePortImpl: {"": "Stream;_id<,_controller<", |
+ listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { |
+ var t1 = this._controller; |
+ t1.toString; |
+ t1 = new P._ControllerStream(t1); |
+ H.setRuntimeTypeInfo(t1, [null]); |
+ return t1.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDone, onError); |
+ }, |
+ close$0: function(_) { |
+ var t1 = this._controller; |
+ if ((t1._state & 4) !== 0) |
+ return; |
+ t1.close$0(t1); |
+ $globalState.currentContext.unregister$1(this._id); |
+ }, |
+ get$close: function(_receiver) { |
+ return new H.BoundClosure$i0(this, H.ReceivePortImpl.prototype.close$0, _receiver, "close$0"); |
}, |
ReceivePortImpl$0: function() { |
+ this._controller = P.StreamController_StreamController(this.get$close(this), null, null, null, true, null); |
var t1 = $globalState.currentContext; |
t1.register$2(t1, this._id, this); |
}, |
@@ -989,7 +985,8 @@ ReceivePortImpl$: function() { |
_waitForPendingPorts_closure: {"": "Closure;callback_0", |
call$1: function(_) { |
return this.callback_0.call$0(); |
- } |
+ }, |
+ $is_args1: true |
}, |
_PendingSendPortFinder: {"": "_MessageTraverser;ports,_visited", |
@@ -1001,7 +998,7 @@ _PendingSendPortFinder: {"": "_MessageTraverser;ports,_visited", |
return; |
t1 = this._visited; |
t1.$indexSet(t1, list, true); |
- J.forEach$1$ax(list, new H._PendingSendPortFinder_visitList_closure(this)); |
+ J.forEach$1$ax(list, this.get$_dispatch()); |
}, |
visitMap$1: function(map) { |
var t1 = this._visited; |
@@ -1010,15 +1007,10 @@ _PendingSendPortFinder: {"": "_MessageTraverser;ports,_visited", |
t1 = this._visited; |
t1.$indexSet(t1, map, true); |
t1 = map.get$values(map); |
- t1.forEach$1(t1, new H._PendingSendPortFinder_visitMap_closure(this)); |
+ t1.forEach$1(t1, this.get$_dispatch()); |
}, |
visitSendPort$1: function(port) { |
}, |
- visitIsolateSink$1: function(sink) { |
- this.visitSendPort$1(sink._port); |
- }, |
- visitCloseToken$1: function(token) { |
- }, |
_PendingSendPortFinder$0: function() { |
this._visited = new H._JsVisitedMap(null); |
}, |
@@ -1031,52 +1023,23 @@ _PendingSendPortFinder$: function() { |
}, |
-_PendingSendPortFinder_visitList_closure: {"": "Closure;this_0", |
- call$1: function(e) { |
- return this.this_0._dispatch$1(e); |
- } |
-}, |
- |
-_PendingSendPortFinder_visitMap_closure: {"": "Closure;this_0", |
- call$1: function(e) { |
- return this.this_0._dispatch$1(e); |
- } |
-}, |
- |
_JsSerializer: {"": "_Serializer;_nextFreeRefId,_visited", |
visitSendPort$1: function(x) { |
- var t1 = J.getInterceptor(x); |
- if (typeof x === "object" && x !== null && !!t1.$is_NativeJsSendPort) |
+ if (!!x.$is_NativeJsSendPort) |
return ["sendport", $globalState.currentManagerId, x._isolateId, x._receivePort.get$_id()]; |
- if (typeof x === "object" && x !== null && !!t1.$is_WorkerSendPort) |
+ if (!!x.$is_WorkerSendPort) |
return ["sendport", x._workerId, x._isolateId, x._receivePortId]; |
throw H.wrapException("Illegal underlying port " + H.S(x)); |
- }, |
- visitIsolateSink$1: function(sink) { |
- var isClosed = sink._isClosed; |
- return ["isolateSink", this.visitSendPort$1(sink._port), isClosed]; |
- }, |
- visitCloseToken$1: function(token) { |
- return ["closeToken"]; |
} |
}, |
_JsCopier: {"": "_Copier;_visited", |
visitSendPort$1: function(x) { |
- var t1 = J.getInterceptor(x); |
- if (typeof x === "object" && x !== null && !!t1.$is_NativeJsSendPort) |
+ if (!!x.$is_NativeJsSendPort) |
return new H._NativeJsSendPort(x._receivePort, x._isolateId); |
- if (typeof x === "object" && x !== null && !!t1.$is_WorkerSendPort) |
+ if (!!x.$is_WorkerSendPort) |
return new H._WorkerSendPort(x._workerId, x._receivePortId, x._isolateId); |
throw H.wrapException("Illegal underlying port " + H.S(x)); |
- }, |
- visitIsolateSink$1: function(sink) { |
- var result = new H.JsIsolateSink(false, this.visitSendPort$1(sink._port)); |
- result._isClosed = sink._isClosed; |
- return result; |
- }, |
- visitCloseToken$1: function(token) { |
- return token; |
} |
}, |
@@ -1098,17 +1061,6 @@ _JsDeserializer: {"": "_Deserializer;_deserialized", |
return new H._NativeJsSendPort(receivePort, isolateId); |
} else |
return new H._WorkerSendPort(managerId, receivePortId, isolateId); |
- }, |
- deserializeIsolateSink$1: function(list) { |
- var t1, port, result; |
- t1 = J.getInterceptor$asx(list); |
- port = this.deserializeSendPort$1(t1.$index(list, 1)); |
- result = new H.JsIsolateSink(false, port); |
- result._isClosed = t1.$index(list, 2); |
- return result; |
- }, |
- deserializeCloseToken$1: function(list) { |
- return C.C_CloseToken; |
} |
}, |
@@ -1173,12 +1125,11 @@ _MessageTraverser: {"": "Object;", |
return this.visitMap$1(x); |
if (typeof x === "object" && x !== null && !!t1.$isSendPort) |
return this.visitSendPort$1(x); |
- if (typeof x === "object" && x !== null && !!t1.$isJsIsolateSink) |
- return this.visitIsolateSink$1(x); |
- if (typeof x === "object" && x !== null && !!t1.$isCloseToken) |
- return this.visitCloseToken$1(x); |
return this.visitObject$1(x); |
}, |
+ get$_dispatch: function() { |
+ return new H.BoundClosure$1(this, H._MessageTraverser.prototype._dispatch$1, null, "_dispatch$1"); |
+ }, |
visitObject$1: function(x) { |
throw H.wrapException("Message serialization: Illegal value " + H.S(x) + " passed"); |
} |
@@ -1189,28 +1140,6 @@ _Copier: {"": "_MessageTraverser;", |
return x; |
}, |
visitList$1: function(list) { |
- var t1, copy, len, i, t2; |
- if (typeof list !== "string" && (typeof list !== "object" || list === null || list.constructor !== Array && !H.isJsIndexable(list, list[init.dispatchPropertyName]))) |
- return this.visitList$1$bailout1(1, list); |
- t1 = this._visited; |
- copy = t1.$index(t1, list); |
- if (copy != null) |
- return copy; |
- len = list.length; |
- copy = P.List_List(len, null); |
- t1 = this._visited; |
- t1.$indexSet(t1, list, copy); |
- for (t1 = copy.length, i = 0; i < len; ++i) { |
- if (i >= list.length) |
- throw H.ioore(list, i); |
- t2 = this._dispatch$1(list[i]); |
- if (i >= t1) |
- throw H.ioore(copy, i); |
- copy[i] = t2; |
- } |
- return copy; |
- }, |
- visitList$1$bailout1: function(state0, list) { |
var t1, copy, len, t2, i, t3; |
t1 = this._visited; |
copy = t1.$index(t1, list); |
@@ -1285,22 +1214,6 @@ _Serializer: {"": "_MessageTraverser;", |
return ["map", id, keys, this._serializeList$1(P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "IterableBase", 0)))]; |
}, |
_serializeList$1: function(list) { |
- var len, result, t1, i, t2; |
- if (typeof list !== "string" && (typeof list !== "object" || list === null || list.constructor !== Array && !H.isJsIndexable(list, list[init.dispatchPropertyName]))) |
- return this._serializeList$1$bailout(1, list); |
- len = list.length; |
- result = P.List_List(len, null); |
- for (t1 = result.length, i = 0; i < len; ++i) { |
- if (i >= list.length) |
- throw H.ioore(list, i); |
- t2 = this._dispatch$1(list[i]); |
- if (i >= t1) |
- throw H.ioore(result, i); |
- result[i] = t2; |
- } |
- return result; |
- }, |
- _serializeList$1$bailout: function(state0, list) { |
var t1, len, result, t2, i, t3; |
t1 = J.getInterceptor$asx(list); |
len = t1.get$length(list); |
@@ -1338,10 +1251,6 @@ _Deserializer: {"": "Object;", |
return this._deserializeMap$1(x); |
case "sendport": |
return this.deserializeSendPort$1(x); |
- case "isolateSink": |
- return this.deserializeIsolateSink$1(x); |
- case "closeToken": |
- return this.deserializeCloseToken$1(x); |
default: |
return this.deserializeObject$1(x); |
} |
@@ -1351,23 +1260,6 @@ _Deserializer: {"": "Object;", |
t1 = J.getInterceptor$asx(x); |
id = t1.$index(x, 1); |
dartList = t1.$index(x, 2); |
- if (typeof dartList !== "object" || dartList === null || (dartList.constructor !== Array || !!dartList.immutable$list) && !H.isJsIndexable(dartList, dartList[init.dispatchPropertyName])) |
- return this._deserializeList$1$bailout(1, dartList, id); |
- t1 = this._deserialized; |
- t1.$indexSet(t1, id, dartList); |
- len = dartList.length; |
- for (i = 0; i < len; ++i) { |
- if (i >= dartList.length) |
- throw H.ioore(dartList, i); |
- t1 = this._deserializeHelper$1(dartList[i]); |
- if (i >= dartList.length) |
- throw H.ioore(dartList, i); |
- dartList[i] = t1; |
- } |
- return dartList; |
- }, |
- _deserializeList$1$bailout: function(state0, dartList, id) { |
- var t1, len, i; |
t1 = this._deserialized; |
t1.$indexSet(t1, id, dartList); |
t1 = J.getInterceptor$asx(dartList); |
@@ -1380,55 +1272,24 @@ _Deserializer: {"": "Object;", |
return dartList; |
}, |
_deserializeMap$1: function(x) { |
- var result, t1, id, t2, keys, values, len, i, key; |
+ var result, t1, id, t2, keys, values, len, i; |
result = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null); |
t1 = J.getInterceptor$asx(x); |
id = t1.$index(x, 1); |
t2 = this._deserialized; |
t2.$indexSet(t2, id, result); |
keys = t1.$index(x, 2); |
- if (typeof keys !== "string" && (typeof keys !== "object" || keys === null || keys.constructor !== Array && !H.isJsIndexable(keys, keys[init.dispatchPropertyName]))) |
- return this._deserializeMap$1$bailout(1, result, keys, t1, x); |
values = t1.$index(x, 3); |
- if (typeof values !== "string" && (typeof values !== "object" || values === null || values.constructor !== Array && !H.isJsIndexable(values, values[init.dispatchPropertyName]))) |
- return this._deserializeMap$1$bailout(2, result, keys, 0, 0, values); |
- len = keys.length; |
- for (i = 0; i < len; ++i) { |
- if (i >= keys.length) |
- throw H.ioore(keys, i); |
- key = this._deserializeHelper$1(keys[i]); |
- if (i >= values.length) |
- throw H.ioore(values, i); |
- result.$indexSet(result, key, this._deserializeHelper$1(values[i])); |
- } |
+ t1 = J.getInterceptor$asx(keys); |
+ len = t1.get$length(keys); |
+ if (typeof len !== "number") |
+ throw H.iae(len); |
+ t2 = J.getInterceptor$asx(values); |
+ i = 0; |
+ for (; i < len; ++i) |
+ result.$indexSet(result, this._deserializeHelper$1(t1.$index(keys, i)), this._deserializeHelper$1(t2.$index(values, i))); |
return result; |
}, |
- _deserializeMap$1$bailout: function(state0, result, keys, t1, x, values) { |
- switch (state0) { |
- case 0: |
- result = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null); |
- t1 = J.getInterceptor$asx(x); |
- id = t1.$index(x, 1); |
- t2 = this._deserialized; |
- t2.$indexSet(t2, id, result); |
- keys = t1.$index(x, 2); |
- case 1: |
- state0 = 0; |
- values = t1.$index(x, 3); |
- case 2: |
- var id, t2, len, i; |
- state0 = 0; |
- t1 = J.getInterceptor$asx(keys); |
- len = t1.get$length(keys); |
- if (typeof len !== "number") |
- throw H.iae(len); |
- t2 = J.getInterceptor$asx(values); |
- i = 0; |
- for (; i < len; ++i) |
- result.$indexSet(result, this._deserializeHelper$1(t1.$index(keys, i)), this._deserializeHelper$1(t2.$index(values, i))); |
- return result; |
- } |
- }, |
deserializeObject$1: function(x) { |
throw H.wrapException("Unexpected serialized object"); |
} |
@@ -1570,14 +1431,14 @@ Primitives_stringFromCodePoints: function(codePoints) { |
for (t1 = new H.ListIterator(codePoints, codePoints.length, 0, null); t1.moveNext$0();) { |
i = t1._current; |
if (typeof i !== "number" || Math.floor(i) !== i) |
- throw H.wrapException(P.ArgumentError$(i)); |
+ throw H.wrapException(new P.ArgumentError(i)); |
if (i <= 65535) |
a.push(i); |
else if (i <= 1114111) { |
a.push(55296 + (C.JSInt_methods.$shr(i - 65536, 10) & 1023)); |
a.push(56320 + (i & 1023)); |
} else |
- throw H.wrapException(P.ArgumentError$(i)); |
+ throw H.wrapException(new P.ArgumentError(i)); |
} |
return H.Primitives__fromCharCodeApply(a); |
}, |
@@ -1587,9 +1448,9 @@ Primitives_stringFromCharCodes: function(charCodes) { |
for (t1 = new H.ListIterator(charCodes, charCodes.length, 0, null); t1.moveNext$0();) { |
i = t1._current; |
if (typeof i !== "number" || Math.floor(i) !== i) |
- throw H.wrapException(P.ArgumentError$(i)); |
+ throw H.wrapException(new P.ArgumentError(i)); |
if (i < 0) |
- throw H.wrapException(P.ArgumentError$(i)); |
+ throw H.wrapException(new P.ArgumentError(i)); |
if (i > 65535) |
return H.Primitives_stringFromCodePoints(charCodes); |
} |
@@ -1784,6 +1645,22 @@ convertDartClosureToJS: function(closure, arity) { |
return $function; |
}, |
+propertyTypeCastError: function(value, property) { |
+ var t1 = J.getInterceptor$asx(property); |
+ throw H.wrapException(H.CastErrorImplementation$(H.Primitives_objectTypeName(value), t1.substring$2(property, 3, t1.get$length(property)))); |
+}, |
+ |
+interceptedTypeCast: function(value, property) { |
+ var t1; |
+ if (value != null) |
+ t1 = typeof value === "object" && J.getInterceptor(value)[property]; |
+ else |
+ t1 = true; |
+ if (t1) |
+ return value; |
+ H.propertyTypeCastError(value, property); |
+}, |
+ |
throwCyclicInit: function(staticName) { |
throw H.wrapException(P.CyclicInitializationError$("Cyclic initialization for static " + H.S(staticName))); |
}, |
@@ -1816,6 +1693,8 @@ runtimeTypeToString: function(type) { |
return type[0].builtin$cls + H.joinArguments(type, 1); |
else if (typeof type == "function") |
return type.builtin$cls; |
+ else if (typeof type === "number" && Math.floor(type) === type) |
+ return C.JSInt_methods.toString$0(type); |
else |
return; |
}, |
@@ -1853,6 +1732,10 @@ substitute: function(substitution, $arguments) { |
return $arguments; |
}, |
+computeSignature: function(signature, context, contextName) { |
+ return H.invokeOn(signature, context, H.getRuntimeTypeArguments(context, contextName)); |
+}, |
+ |
invokeOn: function($function, receiver, $arguments) { |
return $function.apply(receiver, $arguments); |
}, |
@@ -2002,7 +1885,6 @@ lookupDispatchRecord: function(obj) { |
if (interceptorClass == null) |
return; |
interceptor = interceptorClass.prototype; |
- init.leafTags; |
if (init.leafTags[tag] === true) |
return H.makeLeafDispatchRecord(interceptor); |
else |
@@ -2013,6 +1895,35 @@ makeLeafDispatchRecord: function(interceptor) { |
return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); |
}, |
+makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { |
+ var interceptor = interceptorClass.prototype; |
+ if (init.leafTags[tag] === true) |
+ return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); |
+ else |
+ return J.makeDispatchRecord(interceptor, proto, null, null); |
+}, |
+ |
+initNativeDispatch: function() { |
+ var context, map, tags, i, tag, proto, record; |
+ $.initNativeDispatchFlag = true; |
+ if (typeof window != "undefined") { |
+ context = window; |
+ map = init.interceptorsByTag; |
+ tags = Object.getOwnPropertyNames(map); |
+ for (i = 0; i < tags.length; ++i) { |
+ tag = tags[i]; |
+ if (typeof context[tag] == "function") { |
+ proto = context[tag].prototype; |
+ if (proto != null) { |
+ record = H.makeDefaultDispatchRecord(tag, map[tag], proto); |
+ if (record != null) |
+ Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); |
+ } |
+ } |
+ } |
+ } |
+}, |
+ |
TypeErrorDecoder: {"": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver", |
matchTypeError$1: function(message) { |
var match, result, t1; |
@@ -2165,7 +2076,8 @@ unwrapException_saveStackTrace: {"": "Closure;ex_0", |
if (error.$thrownJsError == null) |
error.$thrownJsError = this.ex_0; |
return error; |
- } |
+ }, |
+ $is_args1: true |
}, |
_StackTrace: {"": "Object;_exception,_trace", |
@@ -2218,7 +2130,7 @@ Closure: {"": "Object;", |
} |
}, |
-BoundClosure: {"": "Closure;_self,_target,_receiver,__js_helper$_name", |
+BoundClosure: {"": "Closure;_self,__js_helper$_target,_receiver,__js_helper$_name", |
$eq: function(_, other) { |
var t1; |
if (other == null) |
@@ -2228,7 +2140,7 @@ BoundClosure: {"": "Closure;_self,_target,_receiver,__js_helper$_name", |
t1 = J.getInterceptor(other); |
if (typeof other !== "object" || other === null || !t1.$isBoundClosure) |
return false; |
- return this._self === other._self && this._target === other._target && this._receiver === other._receiver; |
+ return this._self === other._self && this.__js_helper$_target === other.__js_helper$_target && this._receiver === other._receiver; |
}, |
get$hashCode: function(_) { |
var t1, receiverHashCode; |
@@ -2237,42 +2149,31 @@ BoundClosure: {"": "Closure;_self,_target,_receiver,__js_helper$_name", |
receiverHashCode = H.Primitives_objectHashCode(this._self); |
else |
receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1); |
- return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>> 0; |
+ return (receiverHashCode ^ H.Primitives_objectHashCode(this.__js_helper$_target)) >>> 0; |
}, |
$isBoundClosure: true |
}, |
+CastErrorImplementation: {"": "Error;message", |
+ toString$0: function(_) { |
+ return this.message; |
+ }, |
+ $isError: true, |
+ static: { |
+CastErrorImplementation$: function(actualType, expectedType) { |
+ return new H.CastErrorImplementation("CastError: Casting value of type " + actualType + " to incompatible type " + H.S(expectedType)); |
+}} |
+ |
+}, |
+ |
applyExperimentalFixup_newGetTagDartFunction: {"": "Closure;newGetTagJSFunction_0", |
call$1: function(object) { |
return this.newGetTagJSFunction_0(object); |
- } |
+ }, |
+ $is_args1: true |
}}], |
["dart._collection.dev", "dart:_collection-dev", , H, { |
Arrays_copy: function(src, srcStart, dst, dstStart, count) { |
- var i, j, t1, t2, t3, t4; |
- if (typeof dst !== "object" || dst === null || (dst.constructor !== Array || !!dst.immutable$list) && !H.isJsIndexable(dst, dst[init.dispatchPropertyName])) |
- return H.Arrays_copy$bailout(1, dst, src, srcStart, dstStart, count); |
- if (srcStart < dstStart) |
- for (i = srcStart + count - 1, j = dstStart + count - 1, t1 = src.length, t2 = dst.length; i >= srcStart; --i, --j) { |
- if (i < 0 || i >= t1) |
- throw H.ioore(src, i); |
- t3 = src[i]; |
- if (j < 0 || j >= t2) |
- throw H.ioore(dst, j); |
- dst[j] = t3; |
- } |
- else |
- for (t1 = srcStart + count, t2 = src.length, t3 = dst.length, j = dstStart, i = srcStart; i < t1; ++i, ++j) { |
- if (i < 0 || i >= t2) |
- throw H.ioore(src, i); |
- t4 = src[i]; |
- if (j < 0 || j >= t3) |
- throw H.ioore(dst, j); |
- dst[j] = t4; |
- } |
-}, |
- |
-Arrays_copy$bailout: function(state0, dst, src, srcStart, dstStart, count) { |
var i, j, t1; |
if (srcStart < dstStart) |
for (i = srcStart + count - 1, j = dstStart + count - 1; i >= srcStart; --i, --j) { |
@@ -2435,17 +2336,7 @@ MappedIterator: {"": "Iterator;_current,_iterator,_f", |
} |
}, |
-FixedLengthListMixin: {"": "Object;", |
- set$length: function(receiver, newLength) { |
- throw H.wrapException(P.UnsupportedError$("Cannot change the length of a fixed-length list")); |
- }, |
- add$1: function(receiver, value) { |
- throw H.wrapException(P.UnsupportedError$("Cannot add to a fixed-length list")); |
- }, |
- removeLast$0: function(receiver) { |
- throw H.wrapException(P.UnsupportedError$("Cannot remove from a fixed-length list")); |
- } |
-}}], |
+FixedLengthListMixin: {"": "Object;"}}], |
["dart.async", "dart:async", , P, { |
_attachStackTrace: function(o, st) { |
var t1; |
@@ -2560,11 +2451,16 @@ StreamController_StreamController: function(onCancel, onListen, onPause, onResum |
}, |
_runGuarded: function(notificationHandler) { |
- var e, s, exception, t1, t2; |
+ var result, e, s, t1, t2, exception; |
if (notificationHandler == null) |
return; |
try { |
- notificationHandler.call$0(); |
+ result = notificationHandler.call$0(); |
+ t1 = result; |
+ t2 = J.getInterceptor(t1); |
+ if (typeof t1 === "object" && t1 !== null && !!t2.$isFuture) |
+ return result; |
+ return; |
} catch (exception) { |
t1 = H.unwrapException(exception); |
e = t1; |
@@ -2611,8 +2507,18 @@ _runUserCode: function(userCode, onSuccess, onError) { |
}, |
-_cancelAndError: function(subscription, future) { |
- return new P._cancelAndError_closure(subscription, future); |
+_cancelAndError: function(subscription, future, error, stackTrace) { |
+ var cancelFuture, t1; |
+ cancelFuture = subscription.cancel$0(); |
+ t1 = J.getInterceptor(cancelFuture); |
+ if (typeof cancelFuture === "object" && cancelFuture !== null && !!t1.$isFuture) |
+ cancelFuture.whenComplete$1(new P._cancelAndError_closure(future, error, stackTrace)); |
+ else |
+ future._completeError$2(error, stackTrace); |
+}, |
+ |
+_cancelAndErrorClosure: function(subscription, future) { |
+ return new P._cancelAndErrorClosure_closure(subscription, future); |
}, |
Timer_Timer: function(duration, callback) { |
@@ -2633,7 +2539,7 @@ _createTimer: function(duration, callback) { |
}, |
_rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { |
- P._scheduleAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace)); |
+ P._rootRun($self, null, $self, new P._rootHandleUncaughtError_closure(error, stackTrace)); |
}, |
_rootRun: function($self, $parent, zone, f) { |
@@ -2668,22 +2574,6 @@ _rootRunUnary: function($self, $parent, zone, f, arg) { |
} |
}, |
-_rootRunBinary: function($self, $parent, zone, f, arg1, arg2) { |
- var old, t1, t2; |
- t1 = $.Zone__current; |
- t2 = zone; |
- if (t1 == null ? t2 == null : t1 === t2) |
- return f.call$2(arg1, arg2); |
- old = t1; |
- try { |
- $.Zone__current = zone; |
- t1 = f.call$2(arg1, arg2); |
- return t1; |
- } finally { |
- $.Zone__current = old; |
- } |
-}, |
- |
_AsyncError: {"": "Object;error>,stackTrace<", $isError: true}, |
Future: {"": "Object;", $isFuture: true}, |
@@ -2695,11 +2585,12 @@ Future_wait_handleError: {"": "Closure;box_0", |
t1.values_1 = null; |
t1 = t1.completer_0.future; |
if (t1._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
+ H.throwExpression(P.StateError$("Future already completed")); |
t1._asyncCompleteError$2(error, null); |
} |
return; |
- } |
+ }, |
+ $is_args1: true |
}, |
Future_wait_closure: {"": "Closure;box_0,pos_1", |
@@ -2719,13 +2610,14 @@ Future_wait_closure: {"": "Closure;box_0,pos_1", |
t1 = t1.values_1; |
t2 = t2.future; |
if (t2._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
+ H.throwExpression(P.StateError$("Future already completed")); |
t2._asyncComplete$1(t1); |
} |
- } |
+ }, |
+ $is_args1: true |
}, |
-_Completer: {"": "Object;future<"}, |
+_Completer: {"": "Object;"}, |
_AsyncCompleter: {"": "_Completer;future", $as_Completer: null}, |
@@ -2770,6 +2662,11 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa |
catchError$1: function(onError) { |
return this.catchError$2$test(onError, null); |
}, |
+ whenComplete$1: function(action) { |
+ var result = P._Future$_whenComplete(action, H.getRuntimeTypeArgument(this, "_Future", 0)); |
+ this._addListener$1(result); |
+ return result; |
+ }, |
get$_value: function() { |
return this._resultOrListeners; |
}, |
@@ -2826,19 +2723,6 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa |
return new P.BoundClosure$2(this, P._Future.prototype._completeError$2, null, "_completeError$2"); |
}, |
_asyncComplete$1: function(value) { |
- var t1, t2; |
- t1 = J.getInterceptor(value); |
- t2 = typeof value === "object" && value !== null && !!t1.$isFuture; |
- if (t2) |
- ; |
- if (t2) |
- t1 = !t1.$is_Future || value._state < 4; |
- else |
- t1 = false; |
- if (t1) { |
- this._complete$1(value); |
- return; |
- } |
if (this._state !== 0) |
H.throwExpression(P.StateError$("Future already completed")); |
this._state = 1; |
@@ -2847,7 +2731,7 @@ _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener@,_onValueCa |
}, |
_asyncCompleteError$2: function(error, stackTrace) { |
if (this._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
+ H.throwExpression(P.StateError$("Future already completed")); |
this._state = 1; |
this._zone.toString; |
P._scheduleAsyncCallback(new P._Future__asyncCompleteError_closure(this, error, stackTrace)); |
@@ -2890,6 +2774,14 @@ _Future$_catchError: function(onErrorCallback, errorTestCallback, $T) { |
return t2; |
}, |
+_Future$_whenComplete: function(whenCompleteActionCallback, $T) { |
+ var t1 = $.Zone__current; |
+ t1.toString; |
+ t1 = new P._Future(0, t1, null, null, null, null, null, whenCompleteActionCallback); |
+ H.setRuntimeTypeInfo(t1, [$T]); |
+ return t1; |
+}, |
+ |
_Future__chainFutures: function(source, target) { |
var t1; |
target._state = 2; |
@@ -3022,7 +2914,8 @@ _Future__addListener_closure: {"": "Closure;this_0,listener_1", |
_Future__chainFutures_closure: {"": "Closure;target_0", |
call$1: function(value) { |
this.target_0._complete$1(value); |
- } |
+ }, |
+ $is_args1: true |
}, |
_Future__chainFutures_closure0: {"": "Closure;target_1", |
@@ -3032,7 +2925,8 @@ _Future__chainFutures_closure0: {"": "Closure;target_1", |
call$1: function(error) { |
return this.call$2(error, null); |
}, |
- $is_args2: true |
+ $is_args2: true, |
+ $is_args1: true |
}, |
_Future__asyncComplete_closure: {"": "Closure;this_0,value_1", |
@@ -3129,7 +3023,8 @@ _Future__propagateToListeners_closure0: {"": "Closure;box_2,box_1,hasError_4,lis |
_Future__propagateToListeners__closure: {"": "Closure;box_2,listener_6", |
call$1: function(ignored) { |
P._Future__propagateToListeners(this.box_2.source_4, this.listener_6); |
- } |
+ }, |
+ $is_args1: true |
}, |
_Future__propagateToListeners__closure0: {"": "Closure;box_0,listener_7", |
@@ -3147,7 +3042,8 @@ _Future__propagateToListeners__closure0: {"": "Closure;box_0,listener_7", |
call$1: function(error) { |
return this.call$2(error, null); |
}, |
- $is_args2: true |
+ $is_args2: true, |
+ $is_args1: true |
}, |
Stream: {"": "Object;", |
@@ -3171,8 +3067,9 @@ Stream: {"": "Object;", |
Stream_forEach_closure: {"": "Closure;box_0,this_1,action_2,future_3", |
call$1: function(element) { |
- P._runUserCode(new P.Stream_forEach__closure(this.action_2, element), new P.Stream_forEach__closure0(), P._cancelAndError(this.box_0.subscription_0, this.future_3)); |
- } |
+ P._runUserCode(new P.Stream_forEach__closure(this.action_2, element), new P.Stream_forEach__closure0(), P._cancelAndErrorClosure(this.box_0.subscription_0, this.future_3)); |
+ }, |
+ $is_args1: true |
}, |
Stream_forEach__closure: {"": "Closure;action_4,element_5", |
@@ -3183,7 +3080,8 @@ Stream_forEach__closure: {"": "Closure;action_4,element_5", |
Stream_forEach__closure0: {"": "Closure;", |
call$1: function(_) { |
- } |
+ }, |
+ $is_args1: true |
}, |
Stream_forEach_closure0: {"": "Closure;future_6", |
@@ -3196,7 +3094,8 @@ Stream_length_closure: {"": "Closure;box_0", |
call$1: function(_) { |
var t1 = this.box_0; |
t1.count_0 = t1.count_0 + 1; |
- } |
+ }, |
+ $is_args1: true |
}, |
Stream_length_closure0: {"": "Closure;box_0,future_1", |
@@ -3207,8 +3106,6 @@ Stream_length_closure0: {"": "Closure;box_0,future_1", |
StreamSubscription: {"": "Object;"}, |
-EventSink: {"": "Object;"}, |
- |
_StreamController: {"": "Object;", |
get$_pendingEvents: function() { |
if ((this._state & 8) === 0) |
@@ -3234,35 +3131,38 @@ _StreamController: {"": "Object;", |
return new P.StateError("Cannot add event after closing"); |
return new P.StateError("Cannot add event while adding a stream"); |
}, |
- add$1: function(_, value) { |
- if (this._state >= 4) |
- throw H.wrapException(this._badEventState$0()); |
- this._async$_add$1(value); |
- }, |
- addError$2: function(error, stackTrace) { |
- if (this._state >= 4) |
- throw H.wrapException(this._badEventState$0()); |
- this._addError$2(error, stackTrace); |
- }, |
- addError$1: function(error) { |
- return this.addError$2(error, null); |
+ _ensureDoneFuture$0: function() { |
+ if (this._doneFuture == null) { |
+ this._doneFuture = P._Future$(null); |
+ if ((this._state & 2) !== 0) |
+ this._doneFuture._complete$1(null); |
+ } |
+ return this._doneFuture; |
}, |
- _async$_add$1: function(value) { |
+ close$0: function(_) { |
var t1 = this._state; |
+ if ((t1 & 4) !== 0) |
+ return this._doneFuture; |
+ if (t1 >= 4) |
+ throw H.wrapException(this._badEventState$0()); |
+ this._state = (t1 | 4) >>> 0; |
+ this._ensureDoneFuture$0(); |
+ t1 = this._state; |
if ((t1 & 1) !== 0) |
- this._sendData$1(value); |
+ this._sendDone$0(); |
else if ((t1 & 3) === 0) { |
t1 = this._ensurePendingEvents$0(); |
- t1.add$1(t1, new P._DelayedData(value, null)); |
+ t1.add$1(t1, C.C__DelayedDone); |
} |
+ return this._doneFuture; |
}, |
- _addError$2: function(error, stackTrace) { |
+ _async$_add$1: function(value) { |
var t1 = this._state; |
if ((t1 & 1) !== 0) |
- this._sendError$2(error, stackTrace); |
+ this._sendData$1(value); |
else if ((t1 & 3) === 0) { |
t1 = this._ensurePendingEvents$0(); |
- t1.add$1(t1, new P._DelayedError(error, stackTrace, null)); |
+ t1.add$1(t1, new P._DelayedData(value, null)); |
} |
}, |
_subscribe$1: function(cancelOnError) { |
@@ -3271,7 +3171,7 @@ _StreamController: {"": "Object;", |
throw H.wrapException(P.StateError$("Stream has already been listened to.")); |
t1 = $.Zone__current; |
t2 = cancelOnError ? 1 : 0; |
- subscription = new P._ControllerSubscription(this, null, null, null, t1, t2, null); |
+ subscription = new P._ControllerSubscription(this, null, null, null, t1, t2, null, null); |
H.setRuntimeTypeInfo(subscription, [null]); |
pendingEvents = this.get$_pendingEvents(); |
this._state = (this._state | 1) >>> 0; |
@@ -3284,15 +3184,18 @@ _StreamController: {"": "Object;", |
return subscription; |
}, |
_recordCancel$1: function(subscription) { |
- var t1; |
+ var t1, future; |
if ((this._state & 8) !== 0) |
this._varData.cancel$0(); |
this._varData = null; |
this._state = (this._state & 4294967286 | 2) >>> 0; |
- P._runGuarded(this.get$_onCancel()); |
- t1 = this._doneFuture; |
- if (t1 != null && t1._state === 0) |
- t1._asyncComplete$1(null); |
+ t1 = new P._StreamController__recordCancel_complete(this); |
+ future = P._runGuarded(this.get$_onCancel()); |
+ if (future != null) |
+ future = future.whenComplete$1(t1); |
+ else |
+ t1.call$0(); |
+ return future; |
} |
}, |
@@ -3302,12 +3205,20 @@ _StreamController__subscribe_closure: {"": "Closure;this_0", |
} |
}, |
+_StreamController__recordCancel_complete: {"": "Closure;this_0", |
+ call$0: function() { |
+ var t1 = this.this_0._doneFuture; |
+ if (t1 != null && t1._state === 0) |
+ t1._asyncComplete$1(null); |
+ } |
+}, |
+ |
_SyncStreamControllerDispatch: {"": "Object;", |
_sendData$1: function(data) { |
this.get$_subscription()._async$_add$1(data); |
}, |
- _sendError$2: function(error, stackTrace) { |
- this.get$_subscription()._addError$2(error, stackTrace); |
+ _sendDone$0: function() { |
+ this.get$_subscription()._close$0(); |
} |
}, |
@@ -3315,8 +3226,8 @@ _AsyncStreamControllerDispatch: {"": "Object;", |
_sendData$1: function(data) { |
this.get$_subscription()._addPending$1(new P._DelayedData(data, null)); |
}, |
- _sendError$2: function(error, stackTrace) { |
- this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace, null)); |
+ _sendDone$0: function() { |
+ this.get$_subscription()._addPending$1(C.C__DelayedDone); |
} |
}, |
@@ -3328,12 +3239,12 @@ _SyncStreamController: {"": "_StreamController__SyncStreamControllerDispatch;_on |
_StreamController__SyncStreamControllerDispatch: {"": "_StreamController+_SyncStreamControllerDispatch;"}, |
-_ControllerStream: {"": "_StreamImpl;_controller", |
+_ControllerStream: {"": "_StreamImpl;_async$_controller", |
_createSubscription$1: function(cancelOnError) { |
- return this._controller._subscribe$1(cancelOnError); |
+ return this._async$_controller._subscribe$1(cancelOnError); |
}, |
get$hashCode: function(_) { |
- return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0; |
+ return (H.Primitives_objectHashCode(this._async$_controller) ^ 892482866) >>> 0; |
}, |
$eq: function(_, other) { |
var t1; |
@@ -3344,19 +3255,19 @@ _ControllerStream: {"": "_StreamImpl;_controller", |
t1 = J.getInterceptor(other); |
if (typeof other !== "object" || other === null || !t1.$is_ControllerStream) |
return false; |
- return other._controller === this._controller; |
+ return other._async$_controller === this._async$_controller; |
}, |
$is_ControllerStream: true, |
$as_StreamImpl: null |
}, |
-_ControllerSubscription: {"": "_BufferingStreamSubscription;_controller,_onData,_onError,_onDone,_zone,_state,_pending", |
+_ControllerSubscription: {"": "_BufferingStreamSubscription;_async$_controller,_async$_onData,_onError,_onDone,_zone,_state,_cancelFuture,_pending", |
_onCancel$0: function() { |
- this._controller._recordCancel$1(this); |
+ return this._async$_controller._recordCancel$1(this); |
}, |
_onPause$0: function() { |
var t1, addState; |
- t1 = this._controller; |
+ t1 = this._async$_controller; |
if ((t1._state & 8) !== 0) { |
addState = t1._varData; |
addState.pause$0(addState); |
@@ -3367,7 +3278,7 @@ _ControllerSubscription: {"": "_BufferingStreamSubscription;_controller,_onData, |
return new P.BoundClosure$0(this, P._ControllerSubscription.prototype._onPause$0, null, "_onPause$0"); |
}, |
_onResume$0: function() { |
- var t1 = this._controller; |
+ var t1 = this._async$_controller; |
if ((t1._state & 8) !== 0) |
t1._varData.resume$0(); |
P._runGuarded(t1.get$_onResume()); |
@@ -3380,26 +3291,24 @@ _ControllerSubscription: {"": "_BufferingStreamSubscription;_controller,_onData, |
_EventSink: {"": "Object;"}, |
-_BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_state,_pending", |
+_BufferingStreamSubscription: {"": "Object;_async$_onData,_onError,_onDone,_zone<,_state,_cancelFuture,_pending", |
_setPendingEvents$1: function(pendingEvents) { |
if (pendingEvents == null) |
return; |
this._pending = pendingEvents; |
if (!pendingEvents.get$isEmpty(pendingEvents)) { |
- this._state = (this._state | 32) >>> 0; |
+ this._state = (this._state | 64) >>> 0; |
this._pending.schedule$1(this); |
} |
}, |
onData$1: function(handleData) { |
$.Zone__current.toString; |
- this._onData = handleData; |
+ this._async$_onData = handleData; |
}, |
onError$1: function(_, handleError) { |
this._onError = P._registerErrorHandler(handleError, $.Zone__current); |
}, |
onDone$1: function(handleDone) { |
- if (handleDone == null) |
- handleDone = P._nullDoneHandler$closure; |
$.Zone__current.toString; |
this._onDone = handleDone; |
}, |
@@ -3407,10 +3316,10 @@ _BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_stat |
var t1 = this._state; |
if ((t1 & 8) !== 0) |
return; |
- this._state = (t1 + 64 | 4) >>> 0; |
- if (t1 < 64 && this._pending != null) |
+ this._state = (t1 + 128 | 4) >>> 0; |
+ if (t1 < 128 && this._pending != null) |
this._pending.cancelSchedule$0(); |
- if ((t1 & 4) === 0 && (this._state & 16) === 0) |
+ if ((t1 & 4) === 0 && (this._state & 32) === 0) |
this._guardCallback$1(this.get$_onPause()); |
}, |
pause$0: function($receiver) { |
@@ -3421,11 +3330,11 @@ _BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_stat |
t1 = this._state; |
if ((t1 & 8) !== 0) |
return; |
- if (t1 >= 64) { |
- this._state = t1 - 64; |
+ if (t1 >= 128) { |
+ this._state = t1 - 128; |
t1 = this._state; |
- if (t1 < 64) { |
- if ((t1 & 32) !== 0) { |
+ if (t1 < 128) { |
+ if ((t1 & 64) !== 0) { |
t2 = this._pending; |
t2 = !t2.get$isEmpty(t2); |
} else |
@@ -3434,26 +3343,21 @@ _BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_stat |
this._pending.schedule$1(this); |
else { |
this._state = (t1 & 4294967291) >>> 0; |
- if ((this._state & 16) === 0) |
+ if ((this._state & 32) === 0) |
this._guardCallback$1(this.get$_onResume()); |
} |
} |
} |
}, |
cancel$0: function() { |
+ this._state = (this._state & 4294967279) >>> 0; |
if ((this._state & 8) !== 0) |
- return; |
+ return this._cancelFuture; |
this._cancel$0(); |
- var t1 = this._state; |
- if ((t1 & 16) === 0) { |
- this._state = (t1 | 16) >>> 0; |
- this._onCancel$0(); |
- this._pending = null; |
- this._state = (this._state & 4294967279) >>> 0; |
- } |
+ return this._cancelFuture; |
}, |
get$_mayResumeInput: function() { |
- if (this._state < 64) { |
+ if (this._state < 128) { |
var t1 = this._pending; |
t1 = t1 == null || t1.get$isEmpty(t1); |
} else |
@@ -3462,26 +3366,30 @@ _BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_stat |
}, |
_cancel$0: function() { |
this._state = (this._state | 8) >>> 0; |
- if ((this._state & 32) !== 0) |
+ if ((this._state & 64) !== 0) |
this._pending.cancelSchedule$0(); |
+ if ((this._state & 32) === 0) |
+ this._pending = null; |
+ this._cancelFuture = this._onCancel$0(); |
}, |
_async$_add$1: function(data) { |
var t1 = this._state; |
if ((t1 & 8) !== 0) |
return; |
- if (t1 < 16) |
+ if (t1 < 32) |
this._sendData$1(data); |
else |
this._addPending$1(new P._DelayedData(data, null)); |
}, |
- _addError$2: function(error, stackTrace) { |
+ _close$0: function() { |
var t1 = this._state; |
if ((t1 & 8) !== 0) |
return; |
- if (t1 < 16) |
- this._sendError$2(error, stackTrace); |
+ this._state = (t1 | 2) >>> 0; |
+ if (this._state < 32) |
+ this._sendDone$0(); |
else |
- this._addPending$1(new P._DelayedError(error, stackTrace, null)); |
+ this._addPending$1(C.C__DelayedDone); |
}, |
_onPause$0: function() { |
}, |
@@ -3504,89 +3412,90 @@ _BufferingStreamSubscription: {"": "Object;_onData,_onError,_onDone,_zone<,_stat |
} |
pending.add$1(pending, $event); |
t1 = this._state; |
- if ((t1 & 32) === 0) { |
- this._state = (t1 | 32) >>> 0; |
- if (this._state < 64) |
+ if ((t1 & 64) === 0) { |
+ this._state = (t1 | 64) >>> 0; |
+ if (this._state < 128) |
this._pending.schedule$1(this); |
} |
}, |
_sendData$1: function(data) { |
var t1 = this._state; |
- this._state = (t1 | 16) >>> 0; |
- this._zone.runUnaryGuarded$2(this._onData, data); |
- this._state = (this._state & 4294967279) >>> 0; |
+ this._state = (t1 | 32) >>> 0; |
+ this._zone.runUnaryGuarded$2(this._async$_onData, data); |
+ this._state = (this._state & 4294967263) >>> 0; |
this._checkState$1((t1 & 4) !== 0); |
}, |
- _sendError$2: function(error, stackTrace) { |
- var t1, t2, t3, t4; |
- t1 = this._state; |
- this._state = (t1 | 16) >>> 0; |
- t2 = this._zone; |
- t3 = $.Zone__current; |
- t2.toString; |
- t3.toString; |
- if (t3 == null ? t2 != null : t3 !== t2) |
- P._rootHandleUncaughtError(t3, null, t3, error, stackTrace); |
- else { |
- t3 = this._onError; |
- t4 = J.getInterceptor(t3); |
- if (!!t4.$is_args2) |
- t2.runBinaryGuarded$3(t3, error, stackTrace); |
- else |
- t2.runUnaryGuarded$2(t3, error); |
- } |
- this._state = (this._state & 4294967279) >>> 0; |
- if ((this._state & 1) !== 0) |
- this._cancel$0(); |
- this._checkState$1((t1 & 4) !== 0); |
+ _sendDone$0: function() { |
+ var t1, t2, t3; |
+ t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this); |
+ this._cancel$0(); |
+ this._state = (this._state | 16) >>> 0; |
+ t2 = this._cancelFuture; |
+ t3 = J.getInterceptor(t2); |
+ if (typeof t2 === "object" && t2 !== null && !!t3.$isFuture) |
+ t2.whenComplete$1(t1); |
+ else |
+ t1.call$0(); |
}, |
_guardCallback$1: function(callback) { |
var t1 = this._state; |
- this._state = (t1 | 16) >>> 0; |
+ this._state = (t1 | 32) >>> 0; |
callback.call$0(); |
- this._state = (this._state & 4294967279) >>> 0; |
+ this._state = (this._state & 4294967263) >>> 0; |
this._checkState$1((t1 & 4) !== 0); |
}, |
_checkState$1: function(wasInputPaused) { |
var t1, t2, isInputPaused; |
t1 = this._state; |
- if ((t1 & 32) !== 0) { |
+ if ((t1 & 64) !== 0) { |
t2 = this._pending; |
t2 = t2.get$isEmpty(t2); |
} else |
t2 = false; |
if (t2) { |
- this._state = (t1 & 4294967263) >>> 0; |
+ this._state = (t1 & 4294967231) >>> 0; |
if ((this._state & 4) !== 0 && this.get$_mayResumeInput()) |
this._state = (this._state & 4294967291) >>> 0; |
} |
for (; true; wasInputPaused = isInputPaused) { |
t1 = this._state; |
if ((t1 & 8) !== 0) { |
- this._onCancel$0(); |
this._pending = null; |
return; |
} |
isInputPaused = (t1 & 4) !== 0; |
if (wasInputPaused === isInputPaused) |
break; |
- this._state = (t1 ^ 16) >>> 0; |
+ this._state = (t1 ^ 32) >>> 0; |
if (isInputPaused) |
this._onPause$0(); |
else |
this._onResume$0(); |
- this._state = (this._state & 4294967279) >>> 0; |
+ this._state = (this._state & 4294967263) >>> 0; |
} |
t1 = this._state; |
- if ((t1 & 32) !== 0 && t1 < 64) |
+ if ((t1 & 64) !== 0 && t1 < 128) |
this._pending.schedule$1(this); |
}, |
static: { |
-"": "_BufferingStreamSubscription__STATE_CANCEL_ON_ERROR,_BufferingStreamSubscription__STATE_CLOSED,_BufferingStreamSubscription__STATE_INPUT_PAUSED,_BufferingStreamSubscription__STATE_CANCELED,_BufferingStreamSubscription__STATE_IN_CALLBACK,_BufferingStreamSubscription__STATE_HAS_PENDING,_BufferingStreamSubscription__STATE_PAUSE_COUNT,_BufferingStreamSubscription__STATE_PAUSE_COUNT_SHIFT", |
+"": "_BufferingStreamSubscription__STATE_CANCEL_ON_ERROR,_BufferingStreamSubscription__STATE_CLOSED,_BufferingStreamSubscription__STATE_INPUT_PAUSED,_BufferingStreamSubscription__STATE_CANCELED,_BufferingStreamSubscription__STATE_WAIT_FOR_CANCEL,_BufferingStreamSubscription__STATE_IN_CALLBACK,_BufferingStreamSubscription__STATE_HAS_PENDING,_BufferingStreamSubscription__STATE_PAUSE_COUNT,_BufferingStreamSubscription__STATE_PAUSE_COUNT_SHIFT", |
} |
}, |
+_BufferingStreamSubscription__sendDone_sendDone: {"": "Closure;this_0", |
+ call$0: function() { |
+ var t1, t2; |
+ t1 = this.this_0; |
+ t2 = t1._state; |
+ if ((t2 & 16) === 0) |
+ return; |
+ t1._state = (t2 | 42) >>> 0; |
+ t1._zone.runGuarded$1(t1._onDone); |
+ t1._state = (t1._state & 4294967263) >>> 0; |
+ } |
+}, |
+ |
_StreamImpl: {"": "Stream;", |
listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { |
var subscription = this._createSubscription$1(true === cancelOnError); |
@@ -3595,14 +3504,11 @@ _StreamImpl: {"": "Stream;", |
subscription.onDone$1(onDone); |
return subscription; |
}, |
- listen$2$onError: function(onData, onError) { |
- return this.listen$4$cancelOnError$onDone$onError(onData, null, null, onError); |
- }, |
_createSubscription$1: function(cancelOnError) { |
var t1, t2; |
t1 = $.Zone__current; |
t2 = cancelOnError ? 1 : 0; |
- return new P._BufferingStreamSubscription(null, null, null, t1, t2, null); |
+ return new P._BufferingStreamSubscription(null, null, null, t1, t2, null, null); |
}, |
$asStream: null |
}, |
@@ -3615,9 +3521,15 @@ _DelayedData: {"": "_DelayedEvent;value,next", |
} |
}, |
-_DelayedError: {"": "_DelayedEvent;error>,stackTrace<,next", |
+_DelayedDone: {"": "Object;", |
perform$1: function(dispatch) { |
- dispatch._sendError$2(this.error, this.stackTrace); |
+ dispatch._sendDone$0(); |
+ }, |
+ get$next: function() { |
+ return; |
+ }, |
+ set$next: function(_) { |
+ throw H.wrapException(P.StateError$("No events after a done.")); |
} |
}, |
@@ -3674,10 +3586,15 @@ _StreamImplEvents: {"": "_PendingEvents;firstPendingEvent,lastPendingEvent,_stat |
} |
}, |
-_cancelAndError_closure: {"": "Closure;subscription_0,future_1", |
+_cancelAndError_closure: {"": "Closure;future_0,error_1,stackTrace_2", |
+ call$0: function() { |
+ return this.future_0._completeError$2(this.error_1, this.stackTrace_2); |
+ } |
+}, |
+ |
+_cancelAndErrorClosure_closure: {"": "Closure;subscription_0,future_1", |
call$2: function(error, stackTrace) { |
- this.subscription_0.cancel$0(); |
- this.future_1._completeError$2(error, stackTrace); |
+ return P._cancelAndError(this.subscription_0, this.future_1, error, stackTrace); |
}, |
$is_args2: true |
}, |
@@ -3709,25 +3626,19 @@ _BaseZone: {"": "Object;", |
} |
}, |
- runBinaryGuarded$3: function(f, arg1, arg2) { |
- var e, s, t1, exception; |
- try { |
- t1 = this.runBinary$3(f, arg1, arg2); |
- return t1; |
- } catch (exception) { |
- t1 = H.unwrapException(exception); |
- e = t1; |
- s = new H._StackTrace(exception, null); |
- return this.handleUncaughtError$2(e, s); |
- } |
- |
- }, |
bindCallback$2$runGuarded: function(f, runGuarded) { |
var registered = this.registerCallback$1(f); |
if (runGuarded) |
return new P._BaseZone_bindCallback_closure(this, registered); |
else |
return new P._BaseZone_bindCallback_closure0(this, registered); |
+ }, |
+ bindUnaryCallback$2$runGuarded: function(f, runGuarded) { |
+ var registered = this.registerUnaryCallback$1(f); |
+ if (runGuarded) |
+ return new P._BaseZone_bindUnaryCallback_closure(this, registered); |
+ else |
+ return new P._BaseZone_bindUnaryCallback_closure0(this, registered); |
} |
}, |
@@ -3743,12 +3654,32 @@ _BaseZone_bindCallback_closure0: {"": "Closure;this_2,registered_3", |
} |
}, |
+_BaseZone_bindUnaryCallback_closure: {"": "Closure;this_0,registered_1", |
+ call$1: function(arg) { |
+ return this.this_0.runUnaryGuarded$2(this.registered_1, arg); |
+ }, |
+ $is_args1: true |
+}, |
+ |
+_BaseZone_bindUnaryCallback_closure0: {"": "Closure;this_2,registered_3", |
+ call$1: function(arg) { |
+ return this.this_2.runUnary$2(this.registered_3, arg); |
+ }, |
+ $is_args1: true |
+}, |
+ |
_rootHandleUncaughtError_closure: {"": "Closure;error_0,stackTrace_1", |
call$0: function() { |
+ P._scheduleAsyncCallback(new P._rootHandleUncaughtError__closure(this.error_0, this.stackTrace_1)); |
+ } |
+}, |
+ |
+_rootHandleUncaughtError__closure: {"": "Closure;error_2,stackTrace_3", |
+ call$0: function() { |
var t1, trace; |
- t1 = this.error_0; |
+ t1 = this.error_2; |
P.print("Uncaught Error: " + H.S(t1)); |
- trace = this.stackTrace_1; |
+ trace = this.stackTrace_3; |
if (trace == null) |
trace = P.getAttachedStackTrace(t1); |
P._attachStackTrace(t1, null); |
@@ -3771,11 +3702,11 @@ _RootZone: {"": "_BaseZone;", |
runUnary$2: function(f, arg) { |
return P._rootRunUnary(this, null, this, f, arg); |
}, |
- runBinary$3: function(f, arg1, arg2) { |
- return P._rootRunBinary(this, null, this, f, arg1, arg2); |
- }, |
registerCallback$1: function(f) { |
return f; |
+ }, |
+ registerUnaryCallback$1: function(f) { |
+ return f; |
} |
}}], |
["dart.collection", "dart:collection", , P, { |
@@ -3801,267 +3732,108 @@ HashMap_HashMap: function(equals, hashCode, isValidKey, $K, $V) { |
}, |
_iterableToString: function(iterable) { |
- var LENGTH_LIMIT, MIN_COUNT, MAX_COUNT, OVERHEAD, ELLIPSIS_SIZE, result, $length, count, it, next, penultimateString, ultimateString, penultimate, ultimate, elision, t1, t2, t3, t4; |
- LENGTH_LIMIT = 80; |
- MIN_COUNT = 3; |
- MAX_COUNT = 100; |
- OVERHEAD = 2; |
- ELLIPSIS_SIZE = 3; |
+ var parts, t1; |
t1 = $.get$_toStringVisiting(); |
if (t1.contains$1(t1, iterable)) |
return "(...)"; |
t1 = $.get$_toStringVisiting(); |
t1.add$1(t1, iterable); |
- result = []; |
+ parts = []; |
try { |
- $building$0: { |
- $length = 0; |
- count = 0; |
- it = J.get$iterator$ax(iterable); |
- while (true) { |
- t1 = count; |
- t2 = MIN_COUNT; |
- if (typeof t1 !== "number") |
- throw t1.$lt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- if (!(t1 < t2)) { |
- t1 = $length; |
- t2 = LENGTH_LIMIT; |
- if (typeof t1 !== "number") |
- throw t1.$lt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- t2 = t1 < t2; |
- t1 = t2; |
- } else |
- t1 = true; |
- if (!t1) |
- break; |
- if (!it.moveNext$0()) |
- break $building$0; |
- next = H.S(it.get$current()); |
- J.add$1$ax(result, next); |
- t1 = $length; |
- t2 = J.get$length$asx(next); |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- $length = t1 + (t2 + t3); |
- t3 = count; |
- if (typeof t3 !== "number") |
- throw t3.$add(); |
- count = t3 + 1; |
- } |
- penultimateString = null; |
- ultimateString = null; |
- penultimate = null; |
- ultimate = null; |
- if (!it.moveNext$0()) { |
- t1 = count; |
- t2 = MIN_COUNT; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t1 !== "number") |
- throw t1.$le(); |
- if (t1 <= t2 + 2) |
- break $building$0; |
- ultimateString = J.removeLast$0$ax(result); |
- penultimateString = J.removeLast$0$ax(result); |
- } else { |
- penultimate = it.get$current(); |
- t1 = count; |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- count = t1 + 1; |
- if (!it.moveNext$0()) { |
- t1 = count; |
- t2 = MIN_COUNT; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t1 !== "number") |
- throw t1.$le(); |
- if (t1 <= t2 + 1) { |
- J.add$1$ax(result, H.S(penultimate)); |
- break $building$0; |
- } |
- ultimateString = H.S(penultimate); |
- penultimateString = J.removeLast$0$ax(result); |
- t1 = $length; |
- t2 = J.get$length$asx(ultimateString); |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- $length = t1 + (t2 + t3); |
- } else { |
- ultimate = it.get$current(); |
- t1 = count; |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- count = t1 + 1; |
- for (; it.moveNext$0();) { |
- penultimate = ultimate; |
- ultimate = it.get$current(); |
- t1 = count; |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- count = t1 + 1; |
- t1 = count; |
- t2 = MAX_COUNT; |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- if (t1 > t2) { |
- while (true) { |
- t1 = $length; |
- t2 = LENGTH_LIMIT; |
- t3 = ELLIPSIS_SIZE; |
- if (typeof t2 !== "number") |
- throw t2.$sub(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- t4 = OVERHEAD; |
- if (typeof t4 !== "number") |
- throw H.iae(t4); |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (t1 > t2 - t3 - t4) { |
- t1 = count; |
- t2 = MIN_COUNT; |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- t2 = t1 > t2; |
- t1 = t2; |
- } else |
- t1 = false; |
- if (!t1) |
- break; |
- t1 = $length; |
- t2 = J.get$length$asx(J.removeLast$0$ax(result)); |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$sub(); |
- $length = t1 - (t2 + t3); |
- t3 = count; |
- if (typeof t3 !== "number") |
- throw t3.$sub(); |
- count = t3 - 1; |
- } |
- J.add$1$ax(result, "..."); |
- break $building$0; |
- } |
- } |
- penultimateString = H.S(penultimate); |
- ultimateString = H.S(ultimate); |
- t1 = $length; |
- t2 = J.get$length$asx(ultimateString); |
- t3 = J.get$length$asx(penultimateString); |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- t4 = OVERHEAD; |
- if (typeof t4 !== "number") |
- throw H.iae(t4); |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- $length = t1 + (t2 + t3 + 2 * t4); |
- } |
- } |
- elision = null; |
- t1 = count; |
- t2 = J.get$length$asx(result); |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (t1 > t2 + 2) { |
- elision = "..."; |
- t1 = $length; |
- t2 = ELLIPSIS_SIZE; |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- $length = t1 + (t2 + t3); |
- } |
- while (true) { |
- t1 = $length; |
- t2 = LENGTH_LIMIT; |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- if (t1 > t2) { |
- t1 = J.get$length$asx(result); |
- t2 = MIN_COUNT; |
- if (typeof t1 !== "number") |
- throw t1.$gt(); |
- if (typeof t2 !== "number") |
- throw H.iae(t2); |
- t2 = t1 > t2; |
- t1 = t2; |
- } else |
- t1 = false; |
- if (!t1) |
- break; |
- t1 = $length; |
- t2 = J.get$length$asx(J.removeLast$0$ax(result)); |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$sub(); |
- $length = t1 - (t2 + t3); |
- if (elision == null) { |
- elision = "..."; |
- t1 = $length; |
- t2 = ELLIPSIS_SIZE; |
- t3 = OVERHEAD; |
- if (typeof t2 !== "number") |
- throw t2.$add(); |
- if (typeof t3 !== "number") |
- throw H.iae(t3); |
- if (typeof t1 !== "number") |
- throw t1.$add(); |
- $length = t1 + (t2 + t3); |
- } |
- } |
- if (elision != null) |
- J.add$1$ax(result, elision); |
- J.add$1$ax(result, penultimateString); |
- J.add$1$ax(result, ultimateString); |
- } |
+ P._iterablePartsToStrings(iterable, parts); |
} finally { |
t1 = $.get$_toStringVisiting(); |
t1.remove$1(t1, iterable); |
} |
t1 = P.StringBuffer$("("); |
- t1.writeAll$2(result, ", "); |
+ t1.writeAll$2(parts, ", "); |
t1.write$1(")"); |
return t1._contents; |
}, |
+_iterablePartsToStrings: function(iterable, parts) { |
+ var it, $length, count, next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision; |
+ it = iterable.get$iterator(iterable); |
+ $length = 0; |
+ count = 0; |
+ while (true) { |
+ if (!($length < 80 || count < 3)) |
+ break; |
+ if (!it.moveNext$0()) |
+ return; |
+ next = H.S(it.get$current()); |
+ parts.push(next); |
+ $length += next.length + 2; |
+ ++count; |
+ } |
+ if (!it.moveNext$0()) { |
+ if (count <= 5) |
+ return; |
+ if (0 >= parts.length) |
+ throw H.ioore(parts, 0); |
+ ultimateString = parts.pop(); |
+ if (0 >= parts.length) |
+ throw H.ioore(parts, 0); |
+ penultimateString = parts.pop(); |
+ } else { |
+ penultimate = it.get$current(); |
+ ++count; |
+ if (!it.moveNext$0()) { |
+ if (count <= 4) { |
+ parts.push(H.S(penultimate)); |
+ return; |
+ } |
+ ultimateString = H.S(penultimate); |
+ if (0 >= parts.length) |
+ throw H.ioore(parts, 0); |
+ penultimateString = parts.pop(); |
+ $length += ultimateString.length + 2; |
+ } else { |
+ ultimate = it.get$current(); |
+ ++count; |
+ for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { |
+ ultimate0 = it.get$current(); |
+ ++count; |
+ if (count > 100) { |
+ while (true) { |
+ if (!($length > 75 && count > 3)) |
+ break; |
+ if (0 >= parts.length) |
+ throw H.ioore(parts, 0); |
+ $length -= parts.pop().length + 2; |
+ --count; |
+ } |
+ parts.push("..."); |
+ return; |
+ } |
+ } |
+ penultimateString = H.S(penultimate); |
+ ultimateString = H.S(ultimate); |
+ $length += ultimateString.length + penultimateString.length + 4; |
+ } |
+ } |
+ if (count > parts.length + 2) { |
+ $length += 5; |
+ elision = "..."; |
+ } else |
+ elision = null; |
+ while (true) { |
+ if (!($length > 80 && parts.length > 3)) |
+ break; |
+ if (0 >= parts.length) |
+ throw H.ioore(parts, 0); |
+ $length -= parts.pop().length + 2; |
+ if (elision == null) { |
+ $length += 5; |
+ elision = "..."; |
+ } |
+ } |
+ if (elision != null) |
+ parts.push(elision); |
+ parts.push(penultimateString); |
+ parts.push(ultimateString); |
+}, |
+ |
LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) { |
var t1 = new P._LinkedHashMap(0, null, null, null, null, null, 0); |
H.setRuntimeTypeInfo(t1, [$K, $V]); |
@@ -4270,7 +4042,8 @@ _HashMap_values_closure: {"": "Closure;this_0", |
call$1: function(each) { |
var t1 = this.this_0; |
return t1.$index(t1, each); |
- } |
+ }, |
+ $is_args1: true |
}, |
HashMapKeyIterable: {"": "IterableBase;_map", |
@@ -4515,7 +4288,8 @@ _LinkedHashMap_values_closure: {"": "Closure;this_0", |
call$1: function(each) { |
var t1 = this.this_0; |
return t1.$index(t1, each); |
- } |
+ }, |
+ $is_args1: true |
}, |
LinkedHashMapCell: {"": "Object;_key<,_collection$_value@,_next<,_previous<"}, |
@@ -4795,19 +4569,6 @@ ListMixin: {"": "Object;", |
}, |
forEach$1: function(receiver, action) { |
var $length, i; |
- if (typeof receiver !== "string" && (typeof receiver !== "object" || receiver === null || receiver.constructor !== Array && !H.isJsIndexable(receiver, receiver[init.dispatchPropertyName]))) |
- return this.forEach$1$bailout(1, receiver, action); |
- $length = C.JS_CONST_ZYJ(receiver); |
- for (i = 0; i < $length; ++i) { |
- if (i >= C.JS_CONST_ZYJ(receiver)) |
- throw H.ioore(receiver, i); |
- action.call$1(receiver[i]); |
- if ($length !== C.JS_CONST_ZYJ(receiver)) |
- throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
- } |
- }, |
- forEach$1$bailout: function(state0, receiver, action) { |
- var $length, i; |
$length = this.get$length(receiver); |
for (i = 0; i < $length; ++i) { |
action.call$1(this.$index(receiver, i)); |
@@ -4815,19 +4576,6 @@ ListMixin: {"": "Object;", |
throw H.wrapException(P.ConcurrentModificationError$(receiver)); |
} |
}, |
- add$1: function(receiver, element) { |
- var t1 = this.get$length(receiver); |
- this.set$length(receiver, t1 + 1); |
- this.$indexSet(receiver, t1, element); |
- }, |
- removeLast$0: function(receiver) { |
- var result; |
- if (this.get$length(receiver) === 0) |
- throw H.wrapException(P.StateError$("No elements")); |
- result = this.$index(receiver, this.get$length(receiver) - 1); |
- this.set$length(receiver, this.get$length(receiver) - 1); |
- return result; |
- }, |
toString$0: function(receiver) { |
var result, t1; |
t1 = $.get$_toStringVisiting(); |
@@ -4884,9 +4632,6 @@ ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount", |
get$length: function(_) { |
return (this._tail - this._head & this._table.length - 1) >>> 0; |
}, |
- add$1: function(_, element) { |
- this._add$1(element); |
- }, |
toString$0: function(_) { |
return H.IterableMixinWorkaround_toStringIterable(this, "{", "}"); |
}, |
@@ -4904,18 +4649,6 @@ ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount", |
this._head = (t2 + 1 & t3 - 1) >>> 0; |
return result; |
}, |
- removeLast$0: function(_) { |
- var t1, t2; |
- if (this._head === this._tail) |
- throw H.wrapException(P.StateError$("No elements")); |
- this._modificationCount = this._modificationCount + 1; |
- this._tail = (this._tail - 1 & this._table.length - 1) >>> 0; |
- t1 = this._table; |
- t2 = this._tail; |
- if (t2 < 0 || t2 >= t1.length) |
- throw H.ioore(t1, t2); |
- return t1[t2]; |
- }, |
_add$1: function(element) { |
var t1, t2, t3; |
t1 = this._table; |
@@ -5057,14 +4790,14 @@ List_List: function($length, $E) { |
if ($length == null) |
return new Array(0); |
if (typeof $length !== "number" || Math.floor($length) !== $length || $length < 0) |
- throw H.wrapException(P.ArgumentError$("Length must be a positive integer: " + H.S($length) + ".")); |
+ throw H.wrapException(new P.ArgumentError("Length must be a positive integer: " + H.S($length) + ".")); |
return H.Primitives_newFixedList($length); |
}, |
List_List$filled: function($length, fill, $E) { |
var result, t1, i; |
if ($length < 0) |
- throw H.wrapException(P.ArgumentError$("Length must be a positive integer: " + $length + ".")); |
+ throw H.wrapException(new P.ArgumentError("Length must be a positive integer: " + $length + ".")); |
result = H.Primitives_newFixedList($length); |
if ($length !== 0 && true) |
for (t1 = result.length, i = 0; i < t1; ++i) |
@@ -5111,22 +4844,13 @@ NoSuchMethodError_toString_closure: {"": "Closure;box_0", |
Duration: {"": "Object;_duration", |
$lt: function(_, other) { |
- var t1 = other.get$_duration(); |
- if (typeof t1 !== "number") |
- throw H.iae(t1); |
- return C.JSNumber_methods.$lt(this._duration, t1); |
+ return C.JSNumber_methods.$lt(this._duration, other.get$_duration()); |
}, |
$gt: function(_, other) { |
- var t1 = other.get$_duration(); |
- if (typeof t1 !== "number") |
- throw H.iae(t1); |
- return C.JSNumber_methods.$gt(this._duration, t1); |
+ return C.JSNumber_methods.$gt(this._duration, other.get$_duration()); |
}, |
$ge: function(_, other) { |
- var t1 = other.get$_duration(); |
- if (typeof t1 !== "number") |
- throw H.iae(t1); |
- return C.JSNumber_methods.$ge(this._duration, t1); |
+ return C.JSNumber_methods.$ge(this._duration, other.get$_duration()); |
}, |
$eq: function(_, other) { |
var t1; |
@@ -5174,7 +4898,8 @@ Duration_toString_sixDigits: {"": "Closure;", |
if (t1.$gt(n, 10)) |
return "0000" + H.S(n); |
return "00000" + H.S(n); |
- } |
+ }, |
+ $is_args1: true |
}, |
Duration_toString_twoDigits: {"": "Closure;", |
@@ -5182,7 +4907,8 @@ Duration_toString_twoDigits: {"": "Closure;", |
if (J.$ge$n(n, 10)) |
return H.S(n); |
return "0" + H.S(n); |
- } |
+ }, |
+ $is_args1: true |
}, |
Error: {"": "Object;", |
@@ -5254,7 +4980,7 @@ ConcurrentModificationError: {"": "Error;modifiedObject", |
var t1 = this.modifiedObject; |
if (t1 == null) |
return "Concurrent modification during iteration."; |
- return "Concurrent modification during iteration: " + H.S(P.Error_safeToString(t1)) + "."; |
+ return "Concurrent modification during iteration: " + P.Error_safeToString(t1) + "."; |
}, |
static: { |
ConcurrentModificationError$: function(modifiedObject) { |
@@ -5290,8 +5016,7 @@ _ExceptionImplementation: {"": "Object;message", |
if (t1 == null) |
return "Exception"; |
return "Exception: " + H.S(t1); |
- }, |
- $isException: true |
+ } |
}, |
Expando: {"": "Object;name", |
@@ -5356,11 +5081,6 @@ StringBuffer: {"": "Object;_contents<", |
return this._contents.length; |
}, |
write$1: function(obj) { |
- if (typeof obj !== "string") |
- return this.write$1$bailout(1, obj); |
- this._contents = this._contents + obj; |
- }, |
- write$1$bailout: function(state0, obj) { |
var str = typeof obj === "string" ? obj : H.S(obj); |
this._contents = this._contents + str; |
}, |
@@ -5402,83 +5122,85 @@ StringBuffer$: function($content) { |
Symbol: {"": "Object;"}}], |
["dart.dom.html", "dart:html", , W, { |
-Geolocation_getCurrentPosition_closure: {"": "Closure;this_0,completer_1", |
- call$1: function(position) { |
- var t1, t2; |
- t1 = C.Geolocation_methods._ensurePosition$1(this.this_0, position); |
- t2 = this.completer_1.future; |
- if (t2._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
- t2._asyncComplete$1(t1); |
- } |
+_convertNativeToDart_EventTarget: function(e) { |
+ var $window, t1; |
+ if (e == null) |
+ return; |
+ if ("setInterval" in e) { |
+ $window = W._DOMWindowCrossFrame__createSafe(e); |
+ t1 = J.getInterceptor($window); |
+ if (typeof $window === "object" && $window !== null && !!t1.$isEventTarget) |
+ return $window; |
+ return; |
+ } else |
+ return e; |
}, |
-Geolocation_getCurrentPosition_closure0: {"": "Closure;completer_2", |
- call$1: function(error) { |
- var t1 = this.completer_2.future; |
- if (t1._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
- t1._asyncCompleteError$2(error, null); |
- } |
+_wrapZone: function(callback) { |
+ var t1 = $.Zone__current; |
+ if (t1 === C.C__RootZone) |
+ return callback; |
+ return t1.bindUnaryCallback$2$runGuarded(callback, true); |
}, |
-Geolocation_watchPosition_closure0: {"": "Closure;box_0,this_1,options_2", |
- call$0: function() { |
- var t1, t2; |
- t1 = this.this_1; |
- t2 = this.box_0; |
- t2.watchId_0 = C.Geolocation_methods._watchPosition$3(t1, new W.Geolocation_watchPosition__closure(t2, t1), new W.Geolocation_watchPosition__closure0(t2), this.options_2); |
- } |
+_EventStream: {"": "Stream;", |
+ listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { |
+ var t1 = new W._EventStreamSubscription(0, this._target, this._eventType, W._wrapZone(onData), this._useCapture); |
+ H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_EventStream", 0)]); |
+ t1._tryResume$0(); |
+ return t1; |
+ }, |
+ $asStream: null |
}, |
-Geolocation_watchPosition__closure: {"": "Closure;box_0,this_3", |
- call$1: function(position) { |
- var t1, t2; |
- t1 = this.box_0.controller_1; |
- t2 = C.Geolocation_methods._ensurePosition$1(this.this_3, position); |
- if (t1._state >= 4) |
- H.throwExpression(t1._badEventState$0()); |
- t1._async$_add$1(t2); |
- } |
-}, |
+_ElementEventStreamImpl: {"": "_EventStream;_target,_eventType,_useCapture", $as_EventStream: null}, |
-Geolocation_watchPosition__closure0: {"": "Closure;box_0", |
- call$1: function(error) { |
- this.box_0.controller_1.addError$1(error); |
- } |
+_EventStreamSubscription: {"": "StreamSubscription;_pauseCount,_target,_eventType,_onData,_useCapture", |
+ cancel$0: function() { |
+ if (this._target == null) |
+ return; |
+ this._unlisten$0(); |
+ this._target = null; |
+ this._onData = null; |
+ }, |
+ _tryResume$0: function() { |
+ var t1 = this._onData; |
+ if (t1 != null && this._pauseCount <= 0) |
+ J.addEventListener$3$x(this._target, this._eventType, t1, this._useCapture); |
+ }, |
+ _unlisten$0: function() { |
+ var t1 = this._onData; |
+ if (t1 != null) |
+ J.removeEventListener$3$x(this._target, this._eventType, t1, this._useCapture); |
+ }, |
+ $asStreamSubscription: null |
}, |
-Geolocation_watchPosition_closure: {"": "Closure;box_0,this_4", |
- call$0: function() { |
- this.this_4.clearWatch(this.box_0.watchId_0); |
- } |
-}, |
+EventStreamProvider: {"": "Object;_eventType"}, |
-_GeopositionWrapper: {"": "Object;_ptr", |
- get$coords: function(_) { |
- return this._ptr.coords; |
- }, |
- $isGeoposition: true |
+_DOMWindowCrossFrame: {"": "Object;_window", $isEventTarget: true, static: { |
+_DOMWindowCrossFrame__createSafe: function(w) { |
+ if (w === window) |
+ return w; |
+ else |
+ return new W._DOMWindowCrossFrame(w); |
+}} |
}, |
-HtmlElement: {"": "Element;", "%": "HTMLAppletElement|HTMLBRElement|HTMLBaseElement|HTMLBaseFontElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTemplateElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement;HTMLElement"}, |
+HtmlElement: {"": "Element;", "%": "HTMLAppletElement|HTMLBRElement|HTMLBaseFontElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTMLTemplateElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement;HTMLElement"}, |
-AnchorElement: {"": "HtmlElement;", |
+AnchorElement: {"": "HtmlElement;target=", |
toString$0: function(receiver) { |
return receiver.toString(); |
}, |
"%": "HTMLAnchorElement" |
}, |
-AreaElement: {"": "HtmlElement;coords=", "%": "HTMLAreaElement"}, |
+AreaElement: {"": "HtmlElement;target=", "%": "HTMLAreaElement"}, |
-CloseEvent: {"": "Event;code=", "%": "CloseEvent"}, |
+BaseElement: {"": "HtmlElement;target=", "%": "HTMLBaseElement"}, |
-Coordinates: {"": "Interceptor;latitude=,longitude=", "%": "Coordinates"}, |
- |
-CssFontFaceLoadEvent: {"": "Event;error=", "%": "CSSFontFaceLoadEvent"}, |
- |
-DomError: {"": "Interceptor;", "%": ";DOMError"}, |
+CharacterData: {"": "Node;length=", "%": "CDATASection|Comment|Text;CharacterData"}, |
DomException: {"": "Interceptor;", |
toString$0: function(receiver) { |
@@ -5491,101 +5213,44 @@ Element: {"": "Node;", |
toString$0: function(receiver) { |
return receiver.localName; |
}, |
- "%": "SVGAElement|SVGAltGlyphDefElement|SVGAltGlyphElement|SVGAltGlyphItemElement|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGCircleElement|SVGClipPathElement|SVGComponentTransferFunctionElement|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponentTransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLightingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEDropShadowElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightElement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFETurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradientElement|SVGGraphicsElement|SVGHKernElement|SVGImageElement|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMetadataElement|SVGMissingGlyphElement|SVGPathElement|SVGPatternElement|SVGPolygonElement|SVGPolylineElement|SVGRadialGradientElement|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElement|SVGTextPositioningElement|SVGTitleElement|SVGUseElement|SVGVKernElement|SVGViewElement;Element" |
+ "%": ";Element" |
}, |
ErrorEvent: {"": "Event;error=", "%": "ErrorEvent"}, |
-Event: {"": "Interceptor;", "%": "AudioProcessingEvent|AutocompleteErrorEvent|BeforeLoadEvent|CompositionEvent|CustomEvent|DeviceMotionEvent|DeviceOrientationEvent|DragEvent|FocusEvent|HashChangeEvent|IDBVersionChangeEvent|KeyboardEvent|MIDIConnectionEvent|MIDIMessageEvent|MSPointerEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|MutationEvent|OfflineAudioCompletionEvent|OverflowEvent|PageTransitionEvent|PointerEvent|PopStateEvent|ProgressEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|ResourceProgressEvent|SVGZoomEvent|SecurityPolicyViolationEvent|SpeechInputEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|TextEvent|TouchEvent|TrackEvent|TransitionEvent|UIEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTransitionEvent|WheelEvent|XMLHttpRequestProgressEvent;Event"}, |
- |
-EventTarget: {"": "Interceptor;", "%": "MediaStream;EventTarget"}, |
- |
-FileError: {"": "DomError;code=", "%": "FileError"}, |
- |
-FormElement: {"": "HtmlElement;length=", "%": "HTMLFormElement"}, |
- |
-Geolocation: {"": "Interceptor;", |
- getCurrentPosition$3$enableHighAccuracy$maximumAge$timeout: function(receiver, enableHighAccuracy, maximumAge, timeout) { |
- var options, completer, e, stacktrace, t1, completer0, exception; |
- options = H.fillLiteralMap([], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null)); |
- t1 = W.Geoposition; |
- completer0 = new P._AsyncCompleter(P._Future$(t1)); |
- H.setRuntimeTypeInfo(completer0, [t1]); |
- completer = completer0; |
- try { |
- this._getCurrentPosition$3(receiver, new W.Geolocation_getCurrentPosition_closure(receiver, completer), new W.Geolocation_getCurrentPosition_closure0(completer), options); |
- } catch (exception) { |
- t1 = H.unwrapException(exception); |
- e = t1; |
- stacktrace = new H._StackTrace(exception, null); |
- t1 = completer.get$future(); |
- if (t1._state !== 0) |
- H.throwExpression(new P.StateError("Future already completed")); |
- t1._asyncCompleteError$2(e, stacktrace); |
- } |
- |
- return completer.get$future(); |
- }, |
- getCurrentPosition$0: function($receiver) { |
- return this.getCurrentPosition$3$enableHighAccuracy$maximumAge$timeout($receiver, null, null, null); |
+Event: {"": "Interceptor;", |
+ get$target: function(receiver) { |
+ return W._convertNativeToDart_EventTarget(receiver.target); |
}, |
- watchPosition$3$enableHighAccuracy$maximumAge$timeout: function(receiver, enableHighAccuracy, maximumAge, timeout) { |
- var t1, options; |
- t1 = {}; |
- options = H.fillLiteralMap([], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null)); |
- t1.watchId_0 = null; |
- t1.controller_1 = null; |
- t1.controller_1 = P.StreamController_StreamController(new W.Geolocation_watchPosition_closure(t1, receiver), new W.Geolocation_watchPosition_closure0(t1, receiver, options), null, null, true, W.Geoposition); |
- t1 = t1.controller_1; |
- t1.toString; |
- t1 = new P._ControllerStream(t1); |
- H.setRuntimeTypeInfo(t1, [null]); |
- return t1; |
- }, |
- watchPosition$0: function($receiver) { |
- return this.watchPosition$3$enableHighAccuracy$maximumAge$timeout($receiver, null, null, null); |
- }, |
- _ensurePosition$1: function(receiver, domPosition) { |
- var t1, t2, exception; |
- try { |
- t1 = domPosition; |
- t2 = J.getInterceptor(t1); |
- if (typeof t1 === "object" && t1 !== null && !!t2.$isGeoposition) |
- return domPosition; |
- } catch (exception) { |
- H.unwrapException(exception); |
- } |
+ "%": "AudioProcessingEvent|AutocompleteErrorEvent|BeforeLoadEvent|BeforeUnloadEvent|CSSFontFaceLoadEvent|CloseEvent|CompositionEvent|CustomEvent|DeviceMotionEvent|DeviceOrientationEvent|DragEvent|FocusEvent|HashChangeEvent|IDBVersionChangeEvent|KeyboardEvent|MIDIConnectionEvent|MIDIMessageEvent|MSPointerEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|MutationEvent|OfflineAudioCompletionEvent|OverflowEvent|PageTransitionEvent|PointerEvent|PopStateEvent|ProgressEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|ResourceProgressEvent|SVGZoomEvent|SecurityPolicyViolationEvent|SpeechInputEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|TextEvent|TouchEvent|TrackEvent|TransitionEvent|UIEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTransitionEvent|WheelEvent|XMLHttpRequestProgressEvent;Event" |
+}, |
- return new W._GeopositionWrapper(domPosition); |
- }, |
- _getCurrentPosition$3: function(receiver, successCallback, errorCallback, options) { |
- return receiver.getCurrentPosition(H.convertDartClosureToJS(successCallback, 1), H.convertDartClosureToJS(errorCallback, 1), options); |
+EventTarget: {"": "Interceptor;", |
+ addEventListener$3: function(receiver, type, listener, useCapture) { |
+ return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1), useCapture); |
}, |
- _watchPosition$3: function(receiver, successCallback, errorCallback, options) { |
- return receiver.watchPosition(H.convertDartClosureToJS(successCallback, 1), H.convertDartClosureToJS(errorCallback, 1), options); |
+ removeEventListener$3: function(receiver, type, listener, useCapture) { |
+ return receiver.removeEventListener(type, H.convertDartClosureToJS(listener, 1), useCapture); |
}, |
- "%": "Geolocation" |
+ $isEventTarget: true, |
+ "%": "MediaStream;EventTarget" |
}, |
-Geoposition: {"": "Interceptor;coords=", $isGeoposition: true, "%": "Geoposition"}, |
- |
-MediaElement: {"": "HtmlElement;error=", "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement"}, |
+FormElement: {"": "HtmlElement;length=,target=", "%": "HTMLFormElement"}, |
-MediaError: {"": "Interceptor;code=", "%": "MediaError"}, |
+InputElement: {"": "HtmlElement;", $isInputElement: true, $isEventTarget: true, "%": "HTMLInputElement"}, |
-MediaKeyError: {"": "Interceptor;code=", "%": "MediaKeyError"}, |
+MediaElement: {"": "HtmlElement;error=", "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement"}, |
Node: {"": "EventTarget;", |
toString$0: function(receiver) { |
var t1 = receiver.nodeValue; |
return t1 == null ? J.Interceptor.prototype.toString$0.call(this, receiver) : t1; |
}, |
- "%": "Document|HTMLDocument;Node" |
+ "%": "Attr|Document|DocumentFragment|DocumentType|Entity|HTMLDocument|Notation|SVGDocument|ShadowRoot;Node" |
}, |
-ObjectElement: {"": "HtmlElement;code=", "%": "HTMLObjectElement"}, |
- |
-PositionError: {"": "Interceptor;code=", "%": "PositionError"}, |
+ProcessingInstruction: {"": "CharacterData;target=", "%": "ProcessingInstruction"}, |
SelectElement: {"": "HtmlElement;length=", "%": "HTMLSelectElement"}, |
@@ -5595,17 +5260,16 @@ Window: {"": "EventTarget;", |
toString$0: function(receiver) { |
return receiver.toString(); |
}, |
+ $isEventTarget: true, |
"%": "DOMWindow|Window" |
}}], |
-["dart.dom.web_sql", "dart:web_sql", , P, { |
-SqlError: {"": "Interceptor;code=", "%": "SQLError"}}], |
-["dart.isolate", "dart:isolate", , P, { |
-_Isolate_port: function() { |
- if ($.lazyPort == null) |
- $.lazyPort = H.ReceivePortImpl$(); |
- return $.lazyPort; |
-}, |
+["dart.dom.svg", "dart:svg", , P, { |
+AElement: {"": "GraphicsElement;target=", "%": "SVGAElement"}, |
+ |
+GraphicsElement: {"": "SvgElement;", "%": "SVGAltGlyphElement|SVGCircleElement|SVGClipPathElement|SVGDefsElement|SVGEllipseElement|SVGForeignObjectElement|SVGGElement|SVGImageElement|SVGLineElement|SVGPathElement|SVGPolygonElement|SVGPolylineElement|SVGRectElement|SVGSVGElement|SVGSwitchElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElement|SVGTextPositioningElement|SVGUseElement;SVGGraphicsElement"}, |
+SvgElement: {"": "Element;", "%": "SVGAltGlyphDefElement|SVGAltGlyphItemElement|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGComponentTransferFunctionElement|SVGCursorElement|SVGDescElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponentTransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLightingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEDropShadowElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightElement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFETurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradientElement|SVGHKernElement|SVGLinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMetadataElement|SVGMissingGlyphElement|SVGPatternElement|SVGRadialGradientElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStyleElement|SVGSymbolElement|SVGTitleElement|SVGVKernElement|SVGViewElement;SVGElement"}}], |
+["dart.isolate", "dart:isolate", , P, { |
ReceivePort: {"": "Object;"}}], |
["dart.typed_data", "dart:typed_data", , P, { |
TypedData_ListMixin: {"": "TypedData+ListMixin;", $isList: true, $asList: null, $isEfficientLength: true}, |
@@ -5618,7 +5282,7 @@ TypedData: {"": "Interceptor;", |
if (t1.$lt(index, 0) || t1.$ge(index, $length)) |
throw H.wrapException(P.RangeError$range(index, 0, $length)); |
else |
- throw H.wrapException(P.ArgumentError$("Invalid list index " + H.S(index))); |
+ throw H.wrapException(new P.ArgumentError("Invalid list index " + H.S(index))); |
}, |
"%": ";ArrayBufferView;TypedData_ListMixin|TypedData_ListMixin_FixedLengthListMixin" |
}, |
@@ -5628,30 +5292,12 @@ Uint8List: {"": "TypedData_ListMixin_FixedLengthListMixin;", |
return C.JS_CONST_ZYJ(receiver); |
}, |
$index: function(receiver, index) { |
- var t1; |
- if (typeof index !== "number") |
- return this.$$index$bailout(1, receiver, index); |
- t1 = C.JS_CONST_ZYJ(receiver); |
- if (index >>> 0 != index || index >= t1) |
- this._invalidIndex$2(receiver, index, t1); |
- return receiver[index]; |
- }, |
- $$index$bailout: function(state0, receiver, index) { |
var t1 = C.JS_CONST_ZYJ(receiver); |
if (index >>> 0 != index || J.$ge$n(index, t1)) |
this._invalidIndex$2(receiver, index, t1); |
return receiver[index]; |
}, |
$indexSet: function(receiver, index, value) { |
- var t1; |
- if (typeof index !== "number") |
- return this.$$indexSet$bailout(1, receiver, index, value); |
- t1 = C.JS_CONST_ZYJ(receiver); |
- if (index >>> 0 != index || index >= t1) |
- this._invalidIndex$2(receiver, index, t1); |
- receiver[index] = value; |
- }, |
- $$indexSet$bailout: function(state0, receiver, index, value) { |
var t1 = C.JS_CONST_ZYJ(receiver); |
if (index >>> 0 != index || J.$ge$n(index, t1)) |
this._invalidIndex$2(receiver, index, t1); |
@@ -5665,68 +5311,20 @@ Uint8List: {"": "TypedData_ListMixin_FixedLengthListMixin;", |
$isJavaScriptIndexingBehavior: true, |
"%": ";Uint8Array" |
}}], |
-["trip_meter.dart", "trip_meter.dart", , E, { |
-calculateDistance: function(lat1, lon1, lat2, lon2) { |
- var t1, t2, t3, t4, a; |
- if (typeof lat2 !== "number") |
- throw lat2.$sub(); |
- if (typeof lat1 !== "number") |
- throw H.iae(lat1); |
- if (typeof lon2 !== "number") |
- throw lon2.$sub(); |
- if (typeof lon1 !== "number") |
- throw H.iae(lon1); |
- t1 = Math.sin((lat2 - lat1) / 2); |
- t1 = Math.pow(t1, 2); |
- t2 = Math.cos(lat1); |
- t3 = Math.cos(lat2); |
- t4 = Math.sin((lon2 - lon1) / 2); |
- a = t1 + t2 * t3 * Math.pow(t4, 2); |
- t1 = Math.sqrt(a); |
- t2 = Math.sqrt(1 - a); |
- return 6371 * (2 * Math.atan2(t1, t2)); |
-}, |
- |
+["", "piratebadge.dart", , A, { |
main: function() { |
- var t1 = {}; |
- t1.startPosition_0 = null; |
- J.getCurrentPosition$0$x(window.navigator.geolocation).then$2$onError(new E.main_closure(t1), new E.main_closure0()); |
- J.watchPosition$0$x(window.navigator.geolocation).listen$2$onError(new E.main_closure1(t1), new E.main_closure2()); |
-}, |
- |
-main_closure: {"": "Closure;box_0", |
- call$1: function(position) { |
- var t1 = this.box_0; |
- t1.startPosition_0 = position; |
- document.querySelector("#start-lat").textContent = H.S(J.get$latitude$x(J.get$coords$x(t1.startPosition_0))); |
- document.querySelector("#start-lon").textContent = H.S(J.get$longitude$x(J.get$coords$x(t1.startPosition_0))); |
- } |
-}, |
- |
-main_closure0: {"": "Closure;", |
- call$1: function(error) { |
- window.alert("Error occurred. Error code: " + H.S(J.get$code$x(error))); |
- return; |
- } |
-}, |
- |
-main_closure1: {"": "Closure;box_0", |
- call$1: function(position) { |
- var t1, t2, distance; |
- t1 = J.getInterceptor$x(position); |
- document.querySelector("#current-lat").textContent = H.S(J.get$latitude$x(t1.get$coords(position))); |
- document.querySelector("#current-lon").textContent = H.S(J.get$longitude$x(t1.get$coords(position))); |
- t2 = this.box_0; |
- distance = E.calculateDistance(J.get$latitude$x(J.get$coords$x(t2.startPosition_0)), J.get$longitude$x(J.get$coords$x(t2.startPosition_0)), J.get$latitude$x(t1.get$coords(position)), J.get$longitude$x(t1.get$coords(position))); |
- document.querySelector("#distance").textContent = H.S(distance); |
- } |
+ var t1, t2; |
+ t1 = document.querySelector("#inputName"); |
+ t1.toString; |
+ t1 = new W._ElementEventStreamImpl(t1, C.EventStreamProvider_input._eventType, false); |
+ H.setRuntimeTypeInfo(t1, [null]); |
+ t2 = new W._EventStreamSubscription(0, t1._target, t1._eventType, W._wrapZone(A.updateBadge$closure), t1._useCapture); |
+ H.setRuntimeTypeInfo(t2, [H.getRuntimeTypeArgument(t1, "_EventStream", 0)]); |
+ t2._tryResume$0(); |
}, |
-main_closure2: {"": "Closure;", |
- call$1: function(error) { |
- window.alert("Error occurred. Error code: " + H.S(J.get$code$x(error))); |
- return; |
- } |
+updateBadge: function(e) { |
+ document.querySelector("#badgeName").textContent = H.interceptedTypeCast(J.get$target$x(e), "$isInputElement").value; |
}}, |
1], |
]); |
@@ -5752,7 +5350,8 @@ init.globalFunctions._defaultEquals$closure = P._defaultEquals$closure = new H.C |
init.globalFunctions._defaultHashCode$closure = P._defaultHashCode$closure = new H.Closure$1(P._defaultHashCode, "_defaultHashCode$closure"); |
init.globalFunctions.identical$closure = P.identical$closure = new H.Closure$2(P.identical, "identical$closure"); |
init.globalFunctions.identityHashCode$closure = P.identityHashCode$closure = new H.Closure$1(P.identityHashCode, "identityHashCode$closure"); |
-init.globalFunctions.main$closure = E.main$closure = new H.Closure$0(E.main, "main$closure"); |
+init.globalFunctions.main$closure = A.main$closure = new H.Closure$0(A.main, "main$closure"); |
+init.globalFunctions.updateBadge$closure = A.updateBadge$closure = new H.Closure$1(A.updateBadge, "updateBadge$closure"); |
// Runtime type support |
J.JSInt.$isint = true; |
J.JSInt.$isObject = true; |
@@ -5760,8 +5359,8 @@ J.JSString.$isString = true; |
J.JSString.$isObject = true; |
J.JSNumber.$isObject = true; |
P.Duration.$isObject = true; |
-W.Geoposition.$isGeoposition = true; |
-W.Geoposition.$isObject = true; |
+W.Event.$isEvent = true; |
+W.Event.$isObject = true; |
P.ReceivePort.$isObject = true; |
H._IsolateEvent.$isObject = true; |
H._IsolateContext.$isObject = true; |
@@ -5770,17 +5369,17 @@ P.Symbol.$isSymbol = true; |
P.Symbol.$isObject = true; |
P.StackTrace.$isStackTrace = true; |
P.StackTrace.$isObject = true; |
-P.Future.$isFuture = true; |
-P.Future.$isObject = true; |
P.Object.$isObject = true; |
P.Function.$isFunction = true; |
P.Function.$isObject = true; |
J.JSBool.$isbool = true; |
J.JSBool.$isObject = true; |
-P.StreamSubscription.$isStreamSubscription = true; |
-P.StreamSubscription.$isObject = true; |
P._EventSink.$is_EventSink = true; |
P._EventSink.$isObject = true; |
+P.Future.$isFuture = true; |
+P.Future.$isObject = true; |
+P.StreamSubscription.$isStreamSubscription = true; |
+P.StreamSubscription.$isObject = true; |
// getInterceptor methods |
J.getInterceptor = function(receiver) { |
if (typeof receiver == "number") { |
@@ -5853,11 +5452,11 @@ J.getInterceptor$x = function(receiver) { |
return receiver; |
return J.getNativeInterceptor(receiver); |
}; |
-C.C_CloseToken = new H.CloseToken(); |
C.C_UnknownJavaScriptObject = new J.UnknownJavaScriptObject(); |
+C.C__DelayedDone = new P._DelayedDone(); |
C.C__RootZone = new P._RootZone(); |
C.Duration_0 = new P.Duration(0); |
-C.Geolocation_methods = W.Geolocation.prototype; |
+C.EventStreamProvider_input = new W.EventStreamProvider("input"); |
C.JSArray_methods = J.JSArray.prototype; |
C.JSInt_methods = J.JSInt.prototype; |
C.JSNumber_methods = J.JSNumber.prototype; |
@@ -5878,6 +5477,7 @@ $.lazyPort = null; |
$.ReceivePortImpl__nextFreeId = 1; |
$.Primitives_mirrorFunctionCacheName = "$cachedFunction"; |
$.Primitives_mirrorInvokeCacheName = "$cachedInvocation"; |
+$.initNativeDispatchFlag = null; |
$.printToZone = null; |
$._callbacksAreEnqueued = false; |
$.Zone__current = C.C__RootZone; |
@@ -5907,18 +5507,12 @@ J.$indexSet$ax = function(receiver, a0, a1) { |
return receiver[a0] = a1; |
return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); |
}; |
-J.add$1$ax = function(receiver, a0) { |
- return J.getInterceptor$ax(receiver).add$1(receiver, a0); |
+J.addEventListener$3$x = function(receiver, a0, a1, a2) { |
+ return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); |
}; |
J.forEach$1$ax = function(receiver, a0) { |
return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); |
}; |
-J.get$code$x = function(receiver) { |
- return J.getInterceptor$x(receiver).get$code(receiver); |
-}; |
-J.get$coords$x = function(receiver) { |
- return J.getInterceptor$x(receiver).get$coords(receiver); |
-}; |
J.get$error$x = function(receiver) { |
return J.getInterceptor$x(receiver).get$error(receiver); |
}; |
@@ -5928,27 +5522,18 @@ J.get$hashCode$ = function(receiver) { |
J.get$iterator$ax = function(receiver) { |
return J.getInterceptor$ax(receiver).get$iterator(receiver); |
}; |
-J.get$latitude$x = function(receiver) { |
- return J.getInterceptor$x(receiver).get$latitude(receiver); |
-}; |
J.get$length$asx = function(receiver) { |
return J.getInterceptor$asx(receiver).get$length(receiver); |
}; |
-J.get$longitude$x = function(receiver) { |
- return J.getInterceptor$x(receiver).get$longitude(receiver); |
-}; |
-J.getCurrentPosition$0$x = function(receiver) { |
- return J.getInterceptor$x(receiver).getCurrentPosition$0(receiver); |
+J.get$target$x = function(receiver) { |
+ return J.getInterceptor$x(receiver).get$target(receiver); |
}; |
-J.removeLast$0$ax = function(receiver) { |
- return J.getInterceptor$ax(receiver).removeLast$0(receiver); |
+J.removeEventListener$3$x = function(receiver, a0, a1, a2) { |
+ return J.getInterceptor$x(receiver).removeEventListener$3(receiver, a0, a1, a2); |
}; |
J.toString$0 = function(receiver) { |
return J.getInterceptor(receiver).toString$0(receiver); |
}; |
-J.watchPosition$0$x = function(receiver) { |
- return J.getInterceptor$x(receiver).watchPosition$0(receiver); |
-}; |
Isolate.$lazy($, "globalThis", "globalThis", "get$globalThis", function() { |
return function() { return this; }(); |
}); |
@@ -6016,7 +5601,7 @@ Isolate.$lazy($, "_toStringList", "Maps__toStringList", "get$Maps__toStringList" |
return P.List_List(null, null); |
}); |
// Native classes |
-J.Interceptor["%"] = "Navigator|NavigatorUserMediaError|SVGAnimatedNumberList"; |
+J.Interceptor["%"] = "DOMError|FileError|MediaError|MediaKeyError|Navigator|NavigatorUserMediaError|PositionError|SQLError|SVGAnimatedNumberList|SVGAnimatedString"; |
init.functionAliases = {}; |
@@ -6091,9 +5676,9 @@ Z = convertToFastObject(Z); |
init.currentScript = currentScript; |
if (typeof dartMainRunner === "function") { |
- dartMainRunner(function() { H.startRootIsolate(E.main$closure); }); |
+ dartMainRunner(function() { H.startRootIsolate(A.main$closure); }); |
} else { |
- H.startRootIsolate(E.main$closure); |
+ H.startRootIsolate(A.main$closure); |
} |
}); |
// END invoke [main]. |
@@ -6346,5 +5931,5 @@ function init() { |
} |
})() |
-//# sourceMappingURL=trip_meter.dart.js.map |
-//@ sourceMappingURL=trip_meter.dart.js.map |
+//# sourceMappingURL=piratebadge.dart.js.map |
+//@ sourceMappingURL=piratebadge.dart.js.map |