Improve performance (#31)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ddcd721..3b8c49b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 3.6.0
+
+- Improve performance by buffering out of order messages in the server instead
+ of the client.
+
+** Note ** This is not modelled as a breaking change as the server can handle
+messages from older clients. However, clients should be using the latest server
+if they require order guarantees.
+
+
## 3.5.0
- Add new `shutdown` methods on `SseHandler` and `SseConnection` to allow closing
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 0e180e4..2a0ddfa 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -4,7 +4,6 @@
implicit-casts: false
errors:
dead_code: error
- override_on_non_overriding_method: error
unused_element: error
unused_import: error
unused_local_variable: error
diff --git a/lib/client/sse_client.dart b/lib/client/sse_client.dart
index 232a9c9..1316191 100644
--- a/lib/client/sse_client.dart
+++ b/lib/client/sse_client.dart
@@ -21,6 +21,8 @@
final _logger = Logger('SseClient');
+ int _lastMessageId = -1;
+
EventSource _eventSource;
String _serverUrl;
@@ -51,8 +53,6 @@
});
}
});
-
- _startPostingMessages();
}
Stream<Event> get onOpen => _eventSource.onOpen;
@@ -95,24 +95,21 @@
close();
}
- final _messages = StreamController<dynamic>();
-
- void _onOutgoingMessage(dynamic message) async {
- _messages.add(message);
- }
-
- void _startPostingMessages() async {
- await for (var message in _messages.stream) {
- try {
- await HttpRequest.request(_serverUrl,
- method: 'POST',
- sendData: jsonEncode(message),
- withCredentials: true);
- } on JsonUnsupportedObjectError catch (e) {
- _logger.warning('Unable to encode outgoing message: $e');
- } on ArgumentError catch (e) {
- _logger.warning('Invalid argument: $e');
- }
+ void _onOutgoingMessage(String message) async {
+ String encodedMessage;
+ try {
+ encodedMessage = jsonEncode(message);
+ } on JsonUnsupportedObjectError catch (e) {
+ _logger.warning('Unable to encode outgoing message: $e');
+ } on ArgumentError catch (e) {
+ _logger.warning('Invalid argument: $e');
+ }
+ try {
+ await HttpRequest.request('$_serverUrl&messageId=${++_lastMessageId}',
+ method: 'POST', sendData: encodedMessage, withCredentials: true);
+ } catch (e) {
+ _logger.severe('Failed to send $message:\n $e');
+ close();
}
}
}
diff --git a/lib/src/server/sse_handler.dart b/lib/src/server/sse_handler.dart
index 923b87f..e764651 100644
--- a/lib/src/server/sse_handler.dart
+++ b/lib/src/server/sse_handler.dart
@@ -6,6 +6,7 @@
import 'dart:convert';
import 'package:async/async.dart';
+import 'package:collection/collection.dart';
import 'package:logging/logging.dart';
import 'package:pedantic/pedantic.dart';
import 'package:shelf/shelf.dart' as shelf;
@@ -20,6 +21,12 @@
'Access-Control-Allow-Origin: $origin\r\n'
'\r\n\r\n';
+class _SseMessage {
+ final int id;
+ final String message;
+ _SseMessage(this.id, this.message);
+}
+
/// A bi-directional SSE connection between server and browser.
class SseConnection extends StreamChannelMixin<String> {
/// Incoming messages from the Browser client.
@@ -39,6 +46,13 @@
/// Whether this connection is currently in the KeepAlive timeout period.
bool get isInKeepAlivePeriod => _keepAliveTimer?.isActive ?? false;
+ /// The id of the last processed incoming message.
+ int _lastProcessedId = -1;
+
+ /// Incoming messages that have yet to be processed.
+ final _pendingMessages =
+ HeapPriorityQueue<_SseMessage>((a, b) => a.id.compareTo(b.id));
+
final _closedCompleter = Completer<void>();
/// Wraps the `_outgoingController.stream` to buffer events to enable keep
@@ -106,6 +120,26 @@
@override
Stream<String> get stream => _incomingController.stream;
+ /// Adds an incoming [message] to the [stream].
+ ///
+ /// This will buffer messages to guarantee order.
+ void _addIncomingMessage(int id, String message) {
+ _pendingMessages.add(_SseMessage(id, message));
+ while (_pendingMessages.isNotEmpty) {
+ var pendingMessage = _pendingMessages.first;
+ // Only process the next incremental message.
+ if (pendingMessage.id - _lastProcessedId <= 1) {
+ _incomingController.sink.add(pendingMessage.message);
+ _lastProcessedId = pendingMessage.id;
+ _pendingMessages.removeFirst();
+ } else {
+ // A message came out of order. Wait until we receive the previous
+ // messages to process.
+ break;
+ }
+ }
+ }
+
void _acceptReconnection(Sink sink) {
_keepAliveTimer?.cancel();
_sink = sink;
@@ -221,9 +255,10 @@
shelf.Request req, String path) async {
try {
var clientId = req.url.queryParameters['sseClientId'];
+ var messageId = int.parse(req.url.queryParameters['messageId'] ?? '0');
var message = await req.readAsString();
var jsonObject = json.decode(message) as String;
- _connections[clientId]?._incomingController?.add(jsonObject);
+ _connections[clientId]?._addIncomingMessage(messageId, jsonObject);
} catch (e, st) {
_logger.fine('Failed to handle incoming message. $e $st');
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 76f3d97..4df0f80 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: sse
-version: 3.5.0
+version: 3.6.0
homepage: https://github.com/dart-lang/sse
description: >-
Provides client and server functionality for setting up bi-directional
@@ -11,6 +11,7 @@
dependencies:
async: ^2.0.8
+ collection: ^1.0.0
logging: ^0.11.3+2
pedantic: ^1.4.0
stream_channel: '>=1.6.8 <3.0.0'
diff --git a/test/sse_test.dart b/test/sse_test.dart
index e7263f1..00349d1 100644
--- a/test/sse_test.dart
+++ b/test/sse_test.dart
@@ -60,14 +60,30 @@
await server.close();
});
- test('Can round trip messages', () async {
+ test('can round trip messages', () async {
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
connection.sink.add('blah');
expect(await connection.stream.first, 'blah');
});
- test('Multiple clients can connect', () async {
+ test('messages arrive in-order', () async {
+ expect(handler.numberOfClients, 0);
+ await webdriver.get('http://localhost:${server.port}');
+ var connection = await handler.connections.next;
+ expect(handler.numberOfClients, 1);
+
+ var expected = <String>[];
+ var count = 100;
+ for (var i = 0; i < count; i++) {
+ expected.add(i.toString());
+ }
+ connection.sink.add('send $count');
+
+ expect(await connection.stream.take(count).toList(), equals(expected));
+ });
+
+ test('multiple clients can connect', () async {
var connections = handler.connections;
await webdriver.get('http://localhost:${server.port}');
await connections.next;
@@ -75,7 +91,7 @@
await connections.next;
});
- test('Routes data correctly', () async {
+ test('routes data correctly', () async {
var connections = handler.connections;
await webdriver.get('http://localhost:${server.port}');
var connectionA = await connections.next;
@@ -88,7 +104,7 @@
expect(await connectionB.stream.first, 'bar');
});
- test('Can close from the server', () async {
+ test('can close from the server', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -98,7 +114,7 @@
expect(handler.numberOfClients, 0);
});
- test('Client reconnects after being disconnected', () async {
+ test('client reconnects after being disconnected', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -111,7 +127,7 @@
await handler.connections.next;
});
- test('Can close from the client-side', () async {
+ test('can close from the client-side', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -125,7 +141,7 @@
expect(handler.numberOfClients, 0);
});
- test('Cancelling the listener closes the connection', () async {
+ test('cancelling the listener closes the connection', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -137,7 +153,7 @@
expect(handler.numberOfClients, 0);
});
- test('Disconnects when navigating away', () async {
+ test('disconnects when navigating away', () async {
await webdriver.get('http://localhost:${server.port}');
expect(handler.numberOfClients, 1);
@@ -172,7 +188,7 @@
await server.close();
});
- test('Client reconnect use the same connection', () async {
+ test('client reconnect use the same connection', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -213,7 +229,7 @@
expect(connection.isInKeepAlivePeriod, isFalse);
});
- test('Messages sent during disconnect arrive in-order', () async {
+ test('messages sent during disconnect arrive in-order', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
var connection = await handler.connections.next;
@@ -232,7 +248,7 @@
expect(await connection.stream.take(2).toList(), equals(['one', 'two']));
});
- test('Explicit shutdown does not wait for keepAlive', () async {
+ test('explicit shutdown does not wait for keepAlive', () async {
expect(handler.numberOfClients, 0);
await webdriver.get('http://localhost:${server.port}');
await handler.connections.next;
diff --git a/test/web/index.dart b/test/web/index.dart
index c58cde9..7d00757 100644
--- a/test/web/index.dart
+++ b/test/web/index.dart
@@ -14,6 +14,13 @@
});
channel.stream.listen((s) {
- channel.sink.add(s);
+ if (s.startsWith('send ')) {
+ var count = int.parse(s.split(' ').last);
+ for (var i = 0; i < count; i++) {
+ channel.sink.add('$i');
+ }
+ } else {
+ channel.sink.add(s);
+ }
});
}
diff --git a/test/web/index.dart.js b/test/web/index.dart.js
index caabae5..7ad7d5a 100644
--- a/test/web/index.dart.js
+++ b/test/web/index.dart.js
@@ -1,4 +1,4 @@
-// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.7.0-dev.0.0.
+// Generated by dart2js (fast startup emitter, strong), the Dart to JavaScript compiler version: 2.11.0-190.0.dev.
// The code supports the following hooks:
// dartPrint(message):
// if this function is defined it is called instead of the Dart [print]
@@ -19,8 +19,6 @@
// if this function is defined, it will be called at each entry of a
// method or constructor. Used only when compiling programs with
// --experiment-call-instrumentation.
-{
-}
(function dartProgram() {
function copyProperties(from, to) {
var keys = Object.keys(from);
@@ -86,7 +84,7 @@
copyProperties(mixin.prototype, cls.prototype);
cls.prototype.constructor = cls;
}
- function lazy(holder, name, getterName, initializer) {
+ function lazyOld(holder, name, getterName, initializer) {
var uninitializedSentinel = holder;
holder[name] = uninitializedSentinel;
holder[getterName] = function() {
@@ -111,6 +109,34 @@
return result;
};
}
+ function lazy(holder, name, getterName, initializer) {
+ var uninitializedSentinel = holder;
+ holder[name] = uninitializedSentinel;
+ holder[getterName] = function() {
+ if (holder[name] === uninitializedSentinel)
+ holder[name] = initializer();
+ holder[getterName] = function() {
+ return this[name];
+ };
+ return holder[name];
+ };
+ }
+ function lazyFinal(holder, name, getterName, initializer) {
+ var uninitializedSentinel = holder;
+ holder[name] = uninitializedSentinel;
+ holder[getterName] = function() {
+ if (holder[name] === uninitializedSentinel) {
+ var value = initializer();
+ if (holder[name] !== uninitializedSentinel)
+ H.throwLateInitializationError(name);
+ holder[name] = value;
+ }
+ holder[getterName] = function() {
+ return this[name];
+ };
+ return holder[name];
+ };
+ }
function makeConstList(list) {
list.immutable$list = Array;
list.fixed$length = Array;
@@ -205,7 +231,7 @@
return installStaticTearOff(container, getterName, requiredParameterCount, optionalParameterDefaultValues, callNames, [name], funType, applyIndex);
};
};
- return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags};
+ return {inherit: inherit, inheritMany: inheritMany, mixin: mixin, installStaticTearOff: installStaticTearOff, installInstanceTearOff: installInstanceTearOff, _instance_0u: mkInstance(0, 0, null, ["call$0"], 0), _instance_1u: mkInstance(0, 1, null, ["call$1"], 0), _instance_2u: mkInstance(0, 2, null, ["call$2"], 0), _instance_0i: mkInstance(1, 0, null, ["call$0"], 0), _instance_1i: mkInstance(1, 1, null, ["call$1"], 0), _instance_2i: mkInstance(1, 2, null, ["call$2"], 0), _static_0: mkStatic(0, null, ["call$0"], 0), _static_1: mkStatic(1, null, ["call$1"], 0), _static_2: mkStatic(2, null, ["call$2"], 0), makeConstList: makeConstList, lazy: lazy, lazyFinal: lazyFinal, lazyOld: lazyOld, updateHolder: updateHolder, convertToFastObject: convertToFastObject, setFunctionNamesIfNecessary: setFunctionNamesIfNecessary, updateTypes: updateTypes, setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag, setOrUpdateLeafTags: setOrUpdateLeafTags};
}();
function initializeDeferredHunk(hunk) {
typesOffset = init.types.length;
@@ -222,8 +248,11 @@
var C = {},
H = {JS_CONST: function JS_CONST() {
},
- IterableElementError_tooFew: function() {
- return new P.StateError("Too few elements");
+ IterableElementError_noElement: function() {
+ return new P.StateError("No element");
+ },
+ LateInitializationErrorImpl: function LateInitializationErrorImpl(t0) {
+ this._message = t0;
},
EfficientLengthIterable: function EfficientLengthIterable() {
},
@@ -239,18 +268,15 @@
},
FixedLengthListMixin: function FixedLengthListMixin() {
},
- Symbol0: function Symbol0(t0) {
+ Symbol: function Symbol(t0) {
this.__internal$_name = t0;
},
unminifyOrTag: function(rawClassName) {
var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName);
- if (typeof preserved === "string")
+ if (preserved != null)
return preserved;
return rawClassName;
},
- getType: function(index) {
- return init.types[H.intTypeCheck(index)];
- },
isJsIndexable: function(object, record) {
var result;
if (record != null) {
@@ -258,13 +284,13 @@
if (result != null)
return result;
}
- return !!J.getInterceptor$(object).$isJavaScriptIndexingBehavior;
+ return type$.JavaScriptIndexingBehavior_dynamic._is(object);
},
S: function(value) {
var res;
- if (typeof value === "string")
+ if (typeof value == "string")
return value;
- if (typeof value === "number") {
+ if (typeof value == "number") {
if (value !== 0)
return "" + value;
} else if (true === value)
@@ -274,7 +300,7 @@
else if (value == null)
return "null";
res = J.toString$0$(value);
- if (typeof res !== "string")
+ if (typeof res != "string")
throw H.wrapException(H.argumentErrorValue(value));
return res;
},
@@ -286,36 +312,45 @@
}
return hash;
},
- Primitives_objectTypeName: function(object) {
- return H.Primitives__objectClassName(object) + H._joinArguments(H.getRuntimeTypeInfo(object), 0, null);
+ Primitives_parseInt: function(source, radix) {
+ var match, decimalMatch;
+ if (typeof source != "string")
+ H.throwExpression(H.argumentErrorValue(source));
+ match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source);
+ if (match == null)
+ return null;
+ if (3 >= match.length)
+ return H.ioore(match, 3);
+ decimalMatch = match[3];
+ if (decimalMatch != null)
+ return parseInt(source, 10);
+ if (match[2] != null)
+ return parseInt(source, 16);
+ return null;
},
- Primitives__objectClassName: function(object) {
- var interceptorConstructorName, $name, t1, dispatchName, objectConstructor, match, decompiledName,
- interceptor = J.getInterceptor$(object),
- interceptorConstructor = interceptor.constructor;
- if (typeof interceptorConstructor == "function") {
- interceptorConstructorName = interceptorConstructor.name;
- $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null;
- } else
- $name = null;
- t1 = $name == null;
- if (t1 || interceptor === C.Interceptor_methods || !!interceptor.$isUnknownJavaScriptObject) {
+ Primitives_objectTypeName: function(object) {
+ return H.Primitives__objectTypeNameNewRti(object);
+ },
+ Primitives__objectTypeNameNewRti: function(object) {
+ var dispatchName, $constructor, constructorName;
+ if (object instanceof P.Object)
+ return H._rtiToString(H.instanceType(object), null);
+ if (J.getInterceptor$(object) === C.Interceptor_methods || type$.UnknownJavaScriptObject._is(object)) {
dispatchName = C.C_JS_CONST(object);
- if (t1)
- $name = dispatchName;
- if (dispatchName === "Object") {
- objectConstructor = object.constructor;
- if (typeof objectConstructor == "function") {
- match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/);
- decompiledName = match == null ? null : match[1];
- if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName))
- $name = decompiledName;
- }
+ if (H.Primitives__saneNativeClassName(dispatchName))
+ return dispatchName;
+ $constructor = object.constructor;
+ if (typeof $constructor == "function") {
+ constructorName = $constructor.name;
+ if (typeof constructorName == "string" && H.Primitives__saneNativeClassName(constructorName))
+ return constructorName;
}
- return $name;
}
- $name = $name;
- return H.unminifyOrTag($name.length > 1 && C.JSString_methods._codeUnitAt$1($name, 0) === 36 ? C.JSString_methods.substring$1($name, 1) : $name);
+ return H._rtiToString(H.instanceType(object), null);
+ },
+ Primitives__saneNativeClassName: function($name) {
+ var t1 = $name !== "Object" && $name !== "";
+ return t1;
},
Primitives_stringFromNativeUint8List: function(charCodes, start, end) {
var i, result, i0, chunkEnd;
@@ -411,9 +446,9 @@
return H.Primitives__genericApplyFunction2($function, positionalArguments, namedArguments);
},
Primitives__genericApplyFunction2: function($function, positionalArguments, namedArguments) {
- var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, used, t2;
+ var $arguments, argumentCount, requiredParameterCount, defaultValuesClosure, t1, defaultValues, interceptor, jsFunction, keys, _i, defaultValue, used, key;
if (positionalArguments != null)
- $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, null);
+ $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, type$.dynamic);
else
$arguments = [];
argumentCount = $arguments.length;
@@ -425,7 +460,7 @@
defaultValues = !t1 ? defaultValuesClosure() : null;
interceptor = J.getInterceptor$($function);
jsFunction = interceptor["call*"];
- if (typeof jsFunction === "string")
+ if (typeof jsFunction == "string")
jsFunction = interceptor[jsFunction];
if (t1) {
if (namedArguments != null && namedArguments.__js_helper$_length !== 0)
@@ -446,16 +481,24 @@
return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
keys = Object.keys(defaultValues);
if (namedArguments == null)
- for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i)
- C.JSArray_methods.add$1($arguments, defaultValues[H.stringTypeCheck(keys[_i])]);
+ for (t1 = keys.length, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) {
+ defaultValue = defaultValues[H._asStringS(keys[_i])];
+ if (C.C__Required === defaultValue)
+ return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+ C.JSArray_methods.add$1($arguments, defaultValue);
+ }
else {
for (t1 = keys.length, used = 0, _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) {
- t2 = H.stringTypeCheck(keys[_i]);
- if (namedArguments.containsKey$1(t2)) {
+ key = H._asStringS(keys[_i]);
+ if (namedArguments.containsKey$1(key)) {
++used;
- C.JSArray_methods.add$1($arguments, namedArguments.$index(0, t2));
- } else
- C.JSArray_methods.add$1($arguments, defaultValues[t2]);
+ C.JSArray_methods.add$1($arguments, namedArguments.$index(0, key));
+ } else {
+ defaultValue = defaultValues[key];
+ if (C.C__Required === defaultValue)
+ return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
+ C.JSArray_methods.add$1($arguments, defaultValue);
+ }
}
if (used !== namedArguments.__js_helper$_length)
return H.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
@@ -473,9 +516,9 @@
},
diagnoseIndexError: function(indexable, index) {
var $length, t1, _s5_ = "index";
- if (typeof index !== "number" || Math.floor(index) !== index)
+ if (!H._isInt(index))
return new P.ArgumentError(true, index, _s5_, null);
- $length = H.intTypeCheck(J.get$length$asx(indexable));
+ $length = H._asIntS(J.get$length$asx(indexable));
if (!(index < 0)) {
if (typeof $length !== "number")
return H.iae($length);
@@ -493,16 +536,17 @@
return value;
},
wrapException: function(ex) {
- var wrapper;
+ var wrapper, t1;
if (ex == null)
ex = new P.NullThrownError();
wrapper = new Error();
wrapper.dartException = ex;
+ t1 = H.toStringWrapper;
if ("defineProperty" in Object) {
- Object.defineProperty(wrapper, "message", {get: H.toStringWrapper});
+ Object.defineProperty(wrapper, "message", {get: t1});
wrapper.name = "";
} else
- wrapper.toString = H.toStringWrapper;
+ wrapper.toString = t1;
return wrapper;
},
toStringWrapper: function() {
@@ -519,7 +563,7 @@
message = H.quoteStringForRegExp(message.replace(String({}), '$receiver$'));
match = message.match(/\\\$[a-zA-Z]+\\\$/g);
if (match == null)
- match = H.setRuntimeTypeInfo([], [P.String]);
+ match = H.setRuntimeTypeInfo([], type$.JSArray_String);
$arguments = match.indexOf("\\$arguments\\$");
argumentsExpr = match.indexOf("\\$argumentsExpr\\$");
expr = match.indexOf("\\$expr\\$");
@@ -555,17 +599,25 @@
return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver);
},
unwrapException: function(ex) {
- var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t2, _null = null,
- t1 = new H.unwrapException_saveStackTrace(ex);
if (ex == null)
- return;
+ return new H.NullThrownFromJavaScriptException(ex);
if (ex instanceof H.ExceptionAndStackTrace)
- return t1.call$1(ex.dartException);
+ return H.saveStackTrace(ex, ex.dartException);
if (typeof ex !== "object")
return ex;
if ("dartException" in ex)
- return t1.call$1(ex.dartException);
- else if (!("message" in ex))
+ return H.saveStackTrace(ex, ex.dartException);
+ return H._unwrapNonDartException(ex);
+ },
+ saveStackTrace: function(ex, error) {
+ if (type$.Error._is(error))
+ if (error.$thrownJsError == null)
+ error.$thrownJsError = ex;
+ return error;
+ },
+ _unwrapNonDartException: function(ex) {
+ var message, number, ieErrorCode, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match, t1, _null = null;
+ if (!("message" in ex))
return ex;
message = ex.message;
if ("number" in ex && typeof ex.number == "number") {
@@ -574,10 +626,10 @@
if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10)
switch (ieErrorCode) {
case 438:
- return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
+ return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
case 445:
case 5007:
- return t1.call$1(H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
+ return H.saveStackTrace(ex, H.NullError$(H.S(message) + " (Error " + ieErrorCode + ")", _null));
}
}
if (ex instanceof TypeError) {
@@ -593,12 +645,12 @@
undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern();
match = nsme.matchTypeError$1(message);
if (match != null)
- return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match));
+ return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match));
else {
match = notClosure.matchTypeError$1(message);
if (match != null) {
match.method = "call";
- return t1.call$1(H.JsNoSuchMethodError$(H.stringTypeCheck(message), match));
+ return H.saveStackTrace(ex, H.JsNoSuchMethodError$(H._asStringS(message), match));
} else {
match = nullCall.matchTypeError$1(message);
if (match == null) {
@@ -615,29 +667,29 @@
match = undefProperty.matchTypeError$1(message);
if (match == null) {
match = undefLiteralProperty.matchTypeError$1(message);
- t2 = match != null;
+ t1 = match != null;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
+ t1 = true;
} else
- t2 = true;
- if (t2)
- return t1.call$1(H.NullError$(H.stringTypeCheck(message), match));
+ t1 = true;
+ if (t1)
+ return H.saveStackTrace(ex, H.NullError$(H._asStringS(message), match));
}
}
- return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : ""));
+ return H.saveStackTrace(ex, new H.UnknownJsTypeError(typeof message == "string" ? message : ""));
}
if (ex instanceof RangeError) {
- if (typeof message === "string" && message.indexOf("call stack") !== -1)
+ if (typeof message == "string" && message.indexOf("call stack") !== -1)
return new P.StackOverflowError();
message = function(ex) {
try {
@@ -646,10 +698,10 @@
}
return null;
}(ex);
- return t1.call$1(new P.ArgumentError(false, _null, _null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message));
+ return H.saveStackTrace(ex, new P.ArgumentError(false, _null, _null, typeof message == "string" ? message.replace(/^RangeError:\s*/, "") : message));
}
if (typeof InternalError == "function" && ex instanceof InternalError)
- if (typeof message === "string" && message === "too much recursion")
+ if (typeof message == "string" && message === "too much recursion")
return new P.StackOverflowError();
return ex;
},
@@ -675,8 +727,8 @@
return result;
},
invokeClosure: function(closure, numberOfArguments, arg1, arg2, arg3, arg4) {
- H.interceptedTypeCheck(closure, "$isFunction");
- switch (H.intTypeCheck(numberOfArguments)) {
+ type$.Function._as(closure);
+ switch (H._asIntS(numberOfArguments)) {
case 0:
return closure.call$0();
case 1:
@@ -693,7 +745,7 @@
convertDartClosureToJS: function(closure, arity) {
var $function;
if (closure == null)
- return;
+ return null;
$function = closure.$identity;
if (!!$function)
return $function;
@@ -706,10 +758,10 @@
return $function;
},
Closure_fromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, propertyName) {
- var $constructor, t1, trampoline, signatureFunction, applyTrampoline, i, stub, stubCallName, _null = null,
+ var $constructor, t1, trampoline, applyTrampoline, i, stub, stubCallName,
$function = functions[0],
callName = $function.$callName,
- $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(_null, _null, _null, _null).constructor.prototype);
+ $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, "").constructor.prototype);
$prototype.$initialize = $prototype.constructor;
if (isStatic)
$constructor = function static_tear_off() {
@@ -732,8 +784,7 @@
$prototype.$static_name = propertyName;
trampoline = $function;
}
- signatureFunction = H.Closure__computeSignatureFunctionLegacy(reflectionInfo, isStatic, isIntercepted);
- $prototype.$signature = signatureFunction;
+ $prototype.$signature = H.Closure__computeSignatureFunctionNewRti(reflectionInfo, isStatic, isIntercepted);
$prototype[callName] = trampoline;
for (applyTrampoline = trampoline, i = 1; i < functions.length; ++i) {
stub = functions[i];
@@ -752,25 +803,24 @@
$prototype.$defaultValues = $function.$defaultValues;
return $constructor;
},
- Closure__computeSignatureFunctionLegacy: function(functionType, isStatic, isIntercepted) {
- var getReceiver;
+ Closure__computeSignatureFunctionNewRti: function(functionType, isStatic, isIntercepted) {
+ var typeEvalMethod;
if (typeof functionType == "number")
return function(getType, t) {
return function() {
return getType(t);
};
- }(H.getType, functionType);
- if (typeof functionType == "function")
+ }(H.getTypeFromTypesTable, functionType);
+ if (typeof functionType == "string") {
if (isStatic)
- return functionType;
- else {
- getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf;
- return function(f, r) {
- return function() {
- return f.apply({$receiver: r(this)}, arguments);
- };
- }(functionType, getReceiver);
- }
+ throw H.wrapException("Cannot compute signature for static tearoff.");
+ typeEvalMethod = isIntercepted ? H.BoundClosure_evalRecipeIntercepted : H.BoundClosure_evalRecipe;
+ return function(recipe, evalOnReceiver) {
+ return function() {
+ return evalOnReceiver(this, recipe);
+ };
+ }(functionType, typeEvalMethod);
+ }
throw H.wrapException("Error in functionType of tearoff");
},
Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) {
@@ -837,9 +887,7 @@
return t1.$add();
$.Closure_functionCounter = t1 + 1;
selfName = "self" + t1;
- t1 = "return function(){var " + selfName + " = this.";
- t2 = $.BoundClosure_selfFieldNameCache;
- return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + ";return " + selfName + "." + H.S(stubName) + "();}")();
+ return new Function("return function(){var " + selfName + " = this." + H.S(H.BoundClosure_selfFieldName()) + ";return " + selfName + "." + H.S(stubName) + "();}")();
}
$arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",");
t1 = $.Closure_functionCounter;
@@ -847,16 +895,14 @@
return t1.$add();
$.Closure_functionCounter = t1 + 1;
$arguments += t1;
- t1 = "return function(" + $arguments + "){return this.";
- t2 = $.BoundClosure_selfFieldNameCache;
- return new Function(t1 + H.S(t2 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t2) + "." + H.S(stubName) + "(" + $arguments + ");}")();
+ return new Function("return function(" + $arguments + "){return this." + H.S(H.BoundClosure_selfFieldName()) + "." + H.S(stubName) + "(" + $arguments + ");}")();
},
Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) {
var getSelf = H.BoundClosure_selfOf,
getReceiver = H.BoundClosure_receiverOf;
switch (isSuperCall ? -1 : arity) {
case 0:
- throw H.wrapException(H.RuntimeError$("Intercepted function with no arguments."));
+ throw H.wrapException(new H.RuntimeError("Intercepted function with no arguments."));
case 1:
return function(n, s, r) {
return function() {
@@ -904,22 +950,20 @@
}
},
Closure_forwardInterceptedCallTo: function(receiver, $function) {
- var t2, stubName, arity, lookedUpFunction, t3, t4, $arguments,
- t1 = $.BoundClosure_selfFieldNameCache;
- if (t1 == null)
- t1 = $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self");
- t2 = $.BoundClosure_receiverFieldNameCache;
- if (t2 == null)
- t2 = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver");
+ var stubName, arity, lookedUpFunction, t1, t2, $arguments,
+ selfField = H.BoundClosure_selfFieldName(),
+ receiverField = $.BoundClosure_receiverFieldNameCache;
+ if (receiverField == null)
+ receiverField = $.BoundClosure_receiverFieldNameCache = H.BoundClosure_computeFieldNamed("receiver");
stubName = $function.$stubName;
arity = $function.length;
lookedUpFunction = receiver[stubName];
- t3 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
- t4 = !t3 || arity >= 28;
- if (t4)
- return H.Closure_cspForwardInterceptedCall(arity, !t3, stubName, $function);
+ t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction;
+ t2 = !t1 || arity >= 28;
+ if (t2)
+ return H.Closure_cspForwardInterceptedCall(arity, !t1, stubName, $function);
if (arity === 1) {
- t1 = "return function(){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ");";
+ t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ");";
t2 = $.Closure_functionCounter;
if (typeof t2 !== "number")
return t2.$add();
@@ -927,7 +971,7 @@
return new Function(t1 + t2 + "}")();
}
$arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(",");
- t1 = "return function(" + $arguments + "){return this." + H.S(t1) + "." + H.S(stubName) + "(this." + H.S(t2) + ", " + $arguments + ");";
+ t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + receiverField + ", " + $arguments + ");";
t2 = $.Closure_functionCounter;
if (typeof t2 !== "number")
return t2.$add();
@@ -937,530 +981,56 @@
closureFromTearOff: function(receiver, functions, applyTrampolineIndex, reflectionInfo, isStatic, isIntercepted, $name) {
return H.Closure_fromTearOff(receiver, functions, applyTrampolineIndex, reflectionInfo, !!isStatic, !!isIntercepted, $name);
},
+ BoundClosure_evalRecipe: function(closure, recipe) {
+ return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._self), recipe);
+ },
+ BoundClosure_evalRecipeIntercepted: function(closure, recipe) {
+ return H._Universe_evalInEnvironment(init.typeUniverse, H.instanceType(closure._receiver), recipe);
+ },
BoundClosure_selfOf: function(closure) {
return closure._self;
},
BoundClosure_receiverOf: function(closure) {
return closure._receiver;
},
+ BoundClosure_selfFieldName: function() {
+ var t1 = $.BoundClosure_selfFieldNameCache;
+ return t1 == null ? $.BoundClosure_selfFieldNameCache = H.BoundClosure_computeFieldNamed("self") : t1;
+ },
BoundClosure_computeFieldNamed: function(fieldName) {
var t1, i, $name,
template = new H.BoundClosure("self", "target", "receiver", "name"),
- names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template));
+ names = J.JSArray_markFixedList(Object.getOwnPropertyNames(template), type$.nullable_Object);
for (t1 = names.length, i = 0; i < t1; ++i) {
$name = names[i];
if (template[$name] === fieldName)
return $name;
}
+ throw H.wrapException(P.ArgumentError$("Field name " + fieldName + " not found."));
},
boolConversionCheck: function(value) {
if (value == null)
H.assertThrow("boolean expression must not be null");
return value;
},
- stringTypeCheck: function(value) {
- if (value == null)
- return value;
- if (typeof value === "string")
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "String"));
- },
- stringTypeCast: function(value) {
- if (typeof value === "string" || value == null)
- return value;
- throw H.wrapException(H.CastErrorImplementation$(value, "String"));
- },
- doubleTypeCheck: function(value) {
- if (value == null)
- return value;
- if (typeof value === "number")
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "double"));
- },
- numTypeCheck: function(value) {
- if (value == null)
- return value;
- if (typeof value === "number")
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "num"));
- },
- boolTypeCheck: function(value) {
- if (value == null)
- return value;
- if (typeof value === "boolean")
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "bool"));
- },
- intTypeCheck: function(value) {
- if (value == null)
- return value;
- if (typeof value === "number" && Math.floor(value) === value)
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "int"));
- },
- propertyTypeError: function(value, property) {
- throw H.wrapException(H.TypeErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3))));
- },
- propertyTypeCastError: function(value, property) {
- throw H.wrapException(H.CastErrorImplementation$(value, H.unminifyOrTag(H.stringTypeCheck(property).substring(3))));
- },
- interceptedTypeCheck: function(value, property) {
- if (value == null)
- return value;
- if ((typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property])
- return value;
- H.propertyTypeError(value, property);
- },
- interceptedTypeCast: function(value, property) {
- var t1;
- if (value != null)
- t1 = (typeof value === "object" || typeof value === "function") && J.getInterceptor$(value)[property];
- else
- t1 = true;
- if (t1)
- return value;
- H.propertyTypeCastError(value, property);
- },
- listTypeCheck: function(value) {
- if (value == null)
- return value;
- if (!!J.getInterceptor$(value).$isList)
- return value;
- throw H.wrapException(H.TypeErrorImplementation$(value, "List<dynamic>"));
- },
- listSuperNativeTypeCheck: function(value, property) {
- var t1;
- if (value == null)
- return value;
- t1 = J.getInterceptor$(value);
- if (!!t1.$isList)
- return value;
- if (t1[property])
- return value;
- H.propertyTypeError(value, property);
- },
- extractFunctionTypeObjectFromInternal: function(o) {
- var signature;
- if ("$signature" in o) {
- signature = o.$signature;
- if (typeof signature == "number")
- return init.types[H.intTypeCheck(signature)];
- else
- return o.$signature();
- }
- return;
- },
- functionTypeTest: function(value, functionTypeRti) {
- var functionTypeObject;
- if (typeof value == "function")
- return true;
- functionTypeObject = H.extractFunctionTypeObjectFromInternal(J.getInterceptor$(value));
- if (functionTypeObject == null)
- return false;
- return H._isFunctionSubtype(functionTypeObject, null, functionTypeRti, null);
- },
- functionTypeCheck: function(value, functionTypeRti) {
- var $self, t1;
- if (value == null)
- return value;
- if ($._inTypeAssertion)
- return value;
- $._inTypeAssertion = true;
- try {
- if (H.functionTypeTest(value, functionTypeRti))
- return value;
- $self = H.runtimeTypeToString(functionTypeRti);
- t1 = H.TypeErrorImplementation$(value, $self);
- throw H.wrapException(t1);
- } finally {
- $._inTypeAssertion = false;
- }
- },
- futureOrCheck: function(o, futureOrRti) {
- if (o != null && !H.checkSubtypeOfRuntimeType(o, futureOrRti))
- H.throwExpression(H.TypeErrorImplementation$(o, H.runtimeTypeToString(futureOrRti)));
- return o;
- },
- TypeErrorImplementation$: function(value, type) {
- return new H.TypeErrorImplementation("TypeError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'");
- },
- CastErrorImplementation$: function(value, type) {
- return new H.CastErrorImplementation("CastError: " + P.Error_safeToString(value) + ": type '" + H.S(H._typeDescription(value)) + "' is not a subtype of type '" + type + "'");
- },
- _typeDescription: function(value) {
- var functionTypeObject,
- t1 = J.getInterceptor$(value);
- if (!!t1.$isClosure) {
- functionTypeObject = H.extractFunctionTypeObjectFromInternal(t1);
- if (functionTypeObject != null)
- return H.runtimeTypeToString(functionTypeObject);
- return "Closure";
- }
- return H.Primitives_objectTypeName(value);
- },
assertThrow: function(message) {
throw H.wrapException(new H._AssertionError(message));
},
throwCyclicInit: function(staticName) {
throw H.wrapException(new P.CyclicInitializationError(staticName));
},
- RuntimeError$: function(message) {
- return new H.RuntimeError(message);
- },
getIsolateAffinityTag: function($name) {
return init.getIsolateTag($name);
},
- setRuntimeTypeInfo: function(target, rti) {
- target.$ti = rti;
- return target;
- },
- getRuntimeTypeInfo: function(target) {
- if (target == null)
- return;
- return target.$ti;
- },
- getRuntimeTypeArguments: function(interceptor, object, substitutionName) {
- return H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(object));
- },
- getRuntimeTypeArgumentIntercepted: function(interceptor, target, substitutionName, index) {
- var $arguments = H.substitute(interceptor["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target));
- return $arguments == null ? null : $arguments[index];
- },
- getRuntimeTypeArgument: function(target, substitutionName, index) {
- var $arguments = H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target));
- return $arguments == null ? null : $arguments[index];
- },
- getTypeArgumentByIndex: function(target, index) {
- var rti = H.getRuntimeTypeInfo(target);
- return rti == null ? null : rti[index];
- },
- runtimeTypeToString: function(rti) {
- return H._runtimeTypeToString(rti, null);
- },
- _runtimeTypeToString: function(rti, genericContext) {
- var t1, t2;
- if (rti == null)
- return "dynamic";
- if (rti === -1)
- return "void";
- if (typeof rti === "object" && rti !== null && rti.constructor === Array)
- return H.unminifyOrTag(rti[0].name) + H._joinArguments(rti, 1, genericContext);
- if (typeof rti == "function")
- return H.unminifyOrTag(rti.name);
- if (rti === -2)
- return "dynamic";
- if (typeof rti === "number") {
- H.intTypeCheck(rti);
- if (genericContext == null || rti < 0 || rti >= genericContext.length)
- return "unexpected-generic-index:" + rti;
- t1 = genericContext.length;
- t2 = t1 - rti - 1;
- if (t2 < 0 || t2 >= t1)
- return H.ioore(genericContext, t2);
- return H.S(genericContext[t2]);
- }
- if ('func' in rti)
- return H._functionRtiToString(rti, genericContext);
- if ('futureOr' in rti)
- return "FutureOr<" + H._runtimeTypeToString("type" in rti ? rti.type : null, genericContext) + ">";
- return "unknown-reified-type";
- },
- _functionRtiToString: function(rti, genericContext) {
- var boundsRti, outerContextLength, offset, i, i0, typeParameters, typeSep, t1, t2, boundRti, returnTypeText, $arguments, argumentsText, sep, _i, argument, optionalArguments, namedArguments, t3, _s2_ = ", ";
- if ("bounds" in rti) {
- boundsRti = rti.bounds;
- if (genericContext == null) {
- genericContext = H.setRuntimeTypeInfo([], [P.String]);
- outerContextLength = null;
- } else
- outerContextLength = genericContext.length;
- offset = genericContext.length;
- for (i = boundsRti.length, i0 = i; i0 > 0; --i0)
- C.JSArray_methods.add$1(genericContext, "T" + (offset + i0));
- for (typeParameters = "<", typeSep = "", i0 = 0; i0 < i; ++i0, typeSep = _s2_) {
- typeParameters += typeSep;
- t1 = genericContext.length;
- t2 = t1 - i0 - 1;
- if (t2 < 0)
- return H.ioore(genericContext, t2);
- typeParameters = C.JSString_methods.$add(typeParameters, genericContext[t2]);
- boundRti = boundsRti[i0];
- if (boundRti != null && boundRti !== P.Object)
- typeParameters += " extends " + H._runtimeTypeToString(boundRti, genericContext);
- }
- typeParameters += ">";
- } else {
- typeParameters = "";
- outerContextLength = null;
- }
- returnTypeText = !!rti.v ? "void" : H._runtimeTypeToString(rti.ret, genericContext);
- if ("args" in rti) {
- $arguments = rti.args;
- for (t1 = $arguments.length, argumentsText = "", sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) {
- argument = $arguments[_i];
- argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext);
- }
- } else {
- argumentsText = "";
- sep = "";
- }
- if ("opt" in rti) {
- optionalArguments = rti.opt;
- argumentsText += sep + "[";
- for (t1 = optionalArguments.length, sep = "", _i = 0; _i < t1; ++_i, sep = _s2_) {
- argument = optionalArguments[_i];
- argumentsText = argumentsText + sep + H._runtimeTypeToString(argument, genericContext);
- }
- argumentsText += "]";
- }
- if ("named" in rti) {
- namedArguments = rti.named;
- argumentsText += sep + "{";
- for (t1 = H.extractKeys(namedArguments), t2 = t1.length, sep = "", _i = 0; _i < t2; ++_i, sep = _s2_) {
- t3 = H.stringTypeCheck(t1[_i]);
- argumentsText = argumentsText + sep + H._runtimeTypeToString(namedArguments[t3], genericContext) + (" " + H.S(t3));
- }
- argumentsText += "}";
- }
- if (outerContextLength != null)
- genericContext.length = outerContextLength;
- return typeParameters + "(" + argumentsText + ") => " + returnTypeText;
- },
- _joinArguments: function(types, startIndex, genericContext) {
- var buffer, index, separator, allDynamic, t1, argument;
- if (types == null)
- return "";
- buffer = new P.StringBuffer("");
- for (index = startIndex, separator = "", allDynamic = true, t1 = ""; index < types.length; ++index, separator = ", ") {
- buffer._contents = t1 + separator;
- argument = types[index];
- if (argument != null)
- allDynamic = false;
- t1 = buffer._contents += H._runtimeTypeToString(argument, genericContext);
- }
- return "<" + buffer.toString$0(0) + ">";
- },
- substitute: function(substitution, $arguments) {
- if (substitution == null)
- return $arguments;
- substitution = substitution.apply(null, $arguments);
- if (substitution == null)
- return;
- if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array)
- return substitution;
- if (typeof substitution == "function")
- return substitution.apply(null, $arguments);
- return $arguments;
- },
- checkSubtype: function(object, isField, checks, asField) {
- var $arguments, interceptor;
- if (object == null)
- return false;
- $arguments = H.getRuntimeTypeInfo(object);
- interceptor = J.getInterceptor$(object);
- if (interceptor[isField] == null)
- return false;
- return H.areSubtypes(H.substitute(interceptor[asField], $arguments), null, checks, null);
- },
- subtypeCast: function(object, isField, checks, asField) {
- if (object == null)
- return object;
- if (H.checkSubtype(object, isField, checks, asField))
- return object;
- throw H.wrapException(H.CastErrorImplementation$(object, function(str, names) {
- return str.replace(/[^<,> ]+/g, function(m) {
- return names[m] || m;
- });
- }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames)));
- },
- assertSubtype: function(object, isField, checks, asField) {
- if (object == null)
- return object;
- if (H.checkSubtype(object, isField, checks, asField))
- return object;
- throw H.wrapException(H.TypeErrorImplementation$(object, function(str, names) {
- return str.replace(/[^<,> ]+/g, function(m) {
- return names[m] || m;
- });
- }(H.unminifyOrTag(isField.substring(3)) + H._joinArguments(checks, 0, null), init.mangledGlobalNames)));
- },
- areSubtypes: function(s, sEnv, t, tEnv) {
- var len, i;
- if (t == null)
- return true;
- if (s == null) {
- len = t.length;
- for (i = 0; i < len; ++i)
- if (!H._isSubtype(null, null, t[i], tEnv))
- return false;
- return true;
- }
- len = s.length;
- for (i = 0; i < len; ++i)
- if (!H._isSubtype(s[i], sEnv, t[i], tEnv))
- return false;
- return true;
- },
- computeSignature: function(signature, context, contextName) {
- return signature.apply(context, H.substitute(J.getInterceptor$(context)["$as" + H.S(contextName)], H.getRuntimeTypeInfo(context)));
- },
- isSupertypeOfNullRecursive: function(type) {
- var typeArgument;
- if (typeof type === "number")
- return false;
- if ('futureOr' in type) {
- typeArgument = "type" in type ? type.type : null;
- return type == null || type.name === "Object" || type.name === "Null" || type === -1 || type === -2 || H.isSupertypeOfNullRecursive(typeArgument);
- }
- return false;
- },
- checkSubtypeOfRuntimeType: function(o, t) {
- var type, rti;
- if (o == null)
- return t == null || t.name === "Object" || t.name === "Null" || t === -1 || t === -2 || H.isSupertypeOfNullRecursive(t);
- if (t == null || t === -1 || t.name === "Object" || t === -2)
- return true;
- if (typeof t == "object") {
- if ('futureOr' in t)
- if (H.checkSubtypeOfRuntimeType(o, "type" in t ? t.type : null))
- return true;
- if ('func' in t)
- return H.functionTypeTest(o, t);
- }
- type = J.getInterceptor$(o).constructor;
- rti = H.getRuntimeTypeInfo(o);
- if (rti != null) {
- rti = rti.slice();
- rti.splice(0, 0, type);
- type = rti;
- }
- return H._isSubtype(type, null, t, null);
- },
- assertSubtypeOfRuntimeType: function(object, type) {
- if (object != null && !H.checkSubtypeOfRuntimeType(object, type))
- throw H.wrapException(H.TypeErrorImplementation$(object, H.runtimeTypeToString(type)));
- return object;
- },
- _isSubtype: function(s, sEnv, t, tEnv) {
- var t1, typeOfS, tTypeArgument, futureSubstitution, futureArguments, t2, typeOfT, typeOfTString, substitution, _null = null;
- if (s === t)
- return true;
- if (t == null || t === -1 || t.name === "Object" || t === -2)
- return true;
- if (s === -2)
- return true;
- if (s == null || s === -1 || s.name === "Object" || s === -2) {
- if (typeof t === "number")
- return false;
- if ('futureOr' in t)
- return H._isSubtype(s, sEnv, "type" in t ? t.type : _null, tEnv);
- return false;
- }
- if (typeof s === "number")
- return H._isSubtype(sEnv[H.intTypeCheck(s)], sEnv, t, tEnv);
- if (typeof t === "number")
- return false;
- if (s.name === "Null")
- return true;
- t1 = typeof s === "object" && s !== null && s.constructor === Array;
- typeOfS = t1 ? s[0] : s;
- if ('futureOr' in t) {
- tTypeArgument = "type" in t ? t.type : _null;
- if ('futureOr' in s)
- return H._isSubtype("type" in s ? s.type : _null, sEnv, tTypeArgument, tEnv);
- else if (H._isSubtype(s, sEnv, tTypeArgument, tEnv))
- return true;
- else {
- if (!('$is' + "Future" in typeOfS.prototype))
- return false;
- futureSubstitution = typeOfS.prototype["$as" + "Future"];
- futureArguments = H.substitute(futureSubstitution, t1 ? s.slice(1) : _null);
- return H._isSubtype(typeof futureArguments === "object" && futureArguments !== null && futureArguments.constructor === Array ? futureArguments[0] : _null, sEnv, tTypeArgument, tEnv);
- }
- }
- if ('func' in t)
- return H._isFunctionSubtype(s, sEnv, t, tEnv);
- if ('func' in s)
- return t.name === "Function";
- t2 = typeof t === "object" && t !== null && t.constructor === Array;
- typeOfT = t2 ? t[0] : t;
- if (typeOfT !== typeOfS) {
- typeOfTString = typeOfT.name;
- if (!('$is' + typeOfTString in typeOfS.prototype))
- return false;
- substitution = typeOfS.prototype["$as" + typeOfTString];
- } else
- substitution = _null;
- if (!t2)
- return true;
- t1 = t1 ? s.slice(1) : _null;
- t2 = t.slice(1);
- return H.areSubtypes(H.substitute(substitution, t1), sEnv, t2, tEnv);
- },
- _isFunctionSubtype: function(s, sEnv, t, tEnv) {
- var sBounds, tBounds, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, tPos, sPos, sNamedParameters, tNamedParameters;
- if (!('func' in s))
- return false;
- if ("bounds" in s) {
- if (!("bounds" in t))
- return false;
- sBounds = s.bounds;
- tBounds = t.bounds;
- if (sBounds.length !== tBounds.length)
- return false;
- sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv);
- tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv);
- } else if ("bounds" in t)
- return false;
- if (!H._isSubtype(s.ret, sEnv, t.ret, tEnv))
- return false;
- sParameterTypes = s.args;
- tParameterTypes = t.args;
- sOptionalParameterTypes = s.opt;
- tOptionalParameterTypes = t.opt;
- sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0;
- tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0;
- sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParameterTypes.length : 0;
- tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParameterTypes.length : 0;
- if (sParametersLen > tParametersLen)
- return false;
- if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalParametersLen)
- return false;
- for (pos = 0; pos < sParametersLen; ++pos)
- if (!H._isSubtype(tParameterTypes[pos], tEnv, sParameterTypes[pos], sEnv))
- return false;
- for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos)
- if (!H._isSubtype(tParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv))
- return false;
- for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos)
- if (!H._isSubtype(tOptionalParameterTypes[tPos], tEnv, sOptionalParameterTypes[sPos], sEnv))
- return false;
- sNamedParameters = s.named;
- tNamedParameters = t.named;
- if (tNamedParameters == null)
- return true;
- if (sNamedParameters == null)
- return false;
- return H.namedParametersSubtypeCheck(sNamedParameters, sEnv, tNamedParameters, tEnv);
- },
- namedParametersSubtypeCheck: function(s, sEnv, t, tEnv) {
- var t1, i, $name,
- names = Object.getOwnPropertyNames(t);
- for (t1 = names.length, i = 0; i < t1; ++i) {
- $name = names[i];
- if (!Object.hasOwnProperty.call(s, $name))
- return false;
- if (!H._isSubtype(t[$name], tEnv, s[$name], sEnv))
- return false;
- }
- return true;
+ throwLateInitializationError: function($name) {
+ return H.throwExpression(new H.LateInitializationErrorImpl($name));
},
defineProperty: function(obj, property, value) {
Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true});
},
lookupAndCacheInterceptor: function(obj) {
- var interceptor, interceptorClass, mark, t1,
- tag = H.stringTypeCheck($.getTagFunction.call$1(obj)),
+ var interceptor, interceptorClass, altTag, mark, t1,
+ tag = H._asStringS($.getTagFunction.call$1(obj)),
record = $.dispatchRecordsForInstanceTags[tag];
if (record != null) {
Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
@@ -1471,21 +1041,22 @@
return interceptor;
interceptorClass = init.interceptorsByTag[tag];
if (interceptorClass == null) {
- tag = H.stringTypeCheck($.alternateTagFunction.call$2(obj, tag));
- if (tag != null) {
- record = $.dispatchRecordsForInstanceTags[tag];
+ altTag = H._asStringQ($.alternateTagFunction.call$2(obj, tag));
+ if (altTag != null) {
+ record = $.dispatchRecordsForInstanceTags[altTag];
if (record != null) {
Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true});
return record.i;
}
- interceptor = $.interceptorsForUncacheableTags[tag];
+ interceptor = $.interceptorsForUncacheableTags[altTag];
if (interceptor != null)
return interceptor;
- interceptorClass = init.interceptorsByTag[tag];
+ interceptorClass = init.interceptorsByTag[altTag];
+ tag = altTag;
}
}
if (interceptorClass == null)
- return;
+ return null;
interceptor = interceptorClass.prototype;
mark = tag[0];
if (mark === "!") {
@@ -1616,7 +1187,7 @@
JSInvocationMirror: function JSInvocationMirror(t0, t1, t2, t3, t4) {
var _ = this;
_._memberName = t0;
- _._kind = t1;
+ _.__js_helper$_kind = t1;
_._arguments = t2;
_._namedArgumentNames = t3;
_._typeArgumentCount = t4;
@@ -1636,24 +1207,24 @@
_._receiver = t5;
},
NullError: function NullError(t0, t1) {
- this._message = t0;
+ this.__js_helper$_message = t0;
this._method = t1;
},
JsNoSuchMethodError: function JsNoSuchMethodError(t0, t1, t2) {
- this._message = t0;
+ this.__js_helper$_message = t0;
this._method = t1;
this._receiver = t2;
},
UnknownJsTypeError: function UnknownJsTypeError(t0) {
- this._message = t0;
+ this.__js_helper$_message = t0;
+ },
+ NullThrownFromJavaScriptException: function NullThrownFromJavaScriptException(t0) {
+ this._irritant = t0;
},
ExceptionAndStackTrace: function ExceptionAndStackTrace(t0, t1) {
this.dartException = t0;
this.stackTrace = t1;
},
- unwrapException_saveStackTrace: function unwrapException_saveStackTrace(t0) {
- this.ex = t0;
- },
_StackTrace: function _StackTrace(t0) {
this._exception = t0;
this._trace = null;
@@ -1671,22 +1242,18 @@
_._receiver = t2;
_._name = t3;
},
- TypeErrorImplementation: function TypeErrorImplementation(t0) {
- this.message = t0;
- },
- CastErrorImplementation: function CastErrorImplementation(t0) {
- this.message = t0;
- },
RuntimeError: function RuntimeError(t0) {
this.message = t0;
},
_AssertionError: function _AssertionError(t0) {
this.message = t0;
},
+ _Required: function _Required() {
+ },
JsLinkedHashMap: function JsLinkedHashMap(t0) {
var _ = this;
_.__js_helper$_length = 0;
- _._last = _._first = _._rest = _._nums = _._strings = null;
+ _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null;
_._modifications = 0;
_.$ti = t0;
},
@@ -1749,8 +1316,1394 @@
},
_NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin: function _NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin() {
},
- extractKeys: function(victim) {
- return J.JSArray_JSArray$markFixed(victim ? Object.keys(victim) : [], null);
+ Rti__getQuestionFromStar: function(universe, rti) {
+ var question = rti._precomputed1;
+ return question == null ? rti._precomputed1 = H._Universe__lookupQuestionRti(universe, rti._primary, true) : question;
+ },
+ Rti__getFutureFromFutureOr: function(universe, rti) {
+ var future = rti._precomputed1;
+ return future == null ? rti._precomputed1 = H._Universe__lookupInterfaceRti(universe, "Future", [rti._primary]) : future;
+ },
+ Rti__isUnionOfFunctionType: function(rti) {
+ var kind = rti._kind;
+ if (kind === 6 || kind === 7 || kind === 8)
+ return H.Rti__isUnionOfFunctionType(rti._primary);
+ return kind === 11 || kind === 12;
+ },
+ Rti__getCanonicalRecipe: function(rti) {
+ return rti._canonicalRecipe;
+ },
+ findType: function(recipe) {
+ return H._Universe_eval(init.typeUniverse, recipe, false);
+ },
+ _substitute: function(universe, rti, typeArguments, depth) {
+ var baseType, substitutedBaseType, interfaceTypeArguments, substitutedInterfaceTypeArguments, base, substitutedBase, $arguments, substitutedArguments, returnType, substitutedReturnType, functionParameters, substitutedFunctionParameters, bounds, substitutedBounds, index, argument,
+ kind = rti._kind;
+ switch (kind) {
+ case 5:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return rti;
+ case 6:
+ baseType = rti._primary;
+ substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+ if (substitutedBaseType === baseType)
+ return rti;
+ return H._Universe__lookupStarRti(universe, substitutedBaseType, true);
+ case 7:
+ baseType = rti._primary;
+ substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+ if (substitutedBaseType === baseType)
+ return rti;
+ return H._Universe__lookupQuestionRti(universe, substitutedBaseType, true);
+ case 8:
+ baseType = rti._primary;
+ substitutedBaseType = H._substitute(universe, baseType, typeArguments, depth);
+ if (substitutedBaseType === baseType)
+ return rti;
+ return H._Universe__lookupFutureOrRti(universe, substitutedBaseType, true);
+ case 9:
+ interfaceTypeArguments = rti._rest;
+ substitutedInterfaceTypeArguments = H._substituteArray(universe, interfaceTypeArguments, typeArguments, depth);
+ if (substitutedInterfaceTypeArguments === interfaceTypeArguments)
+ return rti;
+ return H._Universe__lookupInterfaceRti(universe, rti._primary, substitutedInterfaceTypeArguments);
+ case 10:
+ base = rti._primary;
+ substitutedBase = H._substitute(universe, base, typeArguments, depth);
+ $arguments = rti._rest;
+ substitutedArguments = H._substituteArray(universe, $arguments, typeArguments, depth);
+ if (substitutedBase === base && substitutedArguments === $arguments)
+ return rti;
+ return H._Universe__lookupBindingRti(universe, substitutedBase, substitutedArguments);
+ case 11:
+ returnType = rti._primary;
+ substitutedReturnType = H._substitute(universe, returnType, typeArguments, depth);
+ functionParameters = rti._rest;
+ substitutedFunctionParameters = H._substituteFunctionParameters(universe, functionParameters, typeArguments, depth);
+ if (substitutedReturnType === returnType && substitutedFunctionParameters === functionParameters)
+ return rti;
+ return H._Universe__lookupFunctionRti(universe, substitutedReturnType, substitutedFunctionParameters);
+ case 12:
+ bounds = rti._rest;
+ depth += bounds.length;
+ substitutedBounds = H._substituteArray(universe, bounds, typeArguments, depth);
+ base = rti._primary;
+ substitutedBase = H._substitute(universe, base, typeArguments, depth);
+ if (substitutedBounds === bounds && substitutedBase === base)
+ return rti;
+ return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, true);
+ case 13:
+ index = rti._primary;
+ if (index < depth)
+ return rti;
+ argument = typeArguments[index - depth];
+ if (argument == null)
+ return rti;
+ return argument;
+ default:
+ throw H.wrapException(P.AssertionError$("Attempted to substitute unexpected RTI kind " + kind));
+ }
+ },
+ _substituteArray: function(universe, rtiArray, typeArguments, depth) {
+ var changed, i, rti, substitutedRti,
+ $length = rtiArray.length,
+ result = [];
+ for (changed = false, i = 0; i < $length; ++i) {
+ rti = rtiArray[i];
+ substitutedRti = H._substitute(universe, rti, typeArguments, depth);
+ if (substitutedRti !== rti)
+ changed = true;
+ result.push(substitutedRti);
+ }
+ return changed ? result : rtiArray;
+ },
+ _substituteNamed: function(universe, namedArray, typeArguments, depth) {
+ var changed, i, t1, t2, rti, substitutedRti,
+ $length = namedArray.length,
+ result = [];
+ for (changed = false, i = 0; i < $length; i += 3) {
+ t1 = namedArray[i];
+ t2 = namedArray[i + 1];
+ rti = namedArray[i + 2];
+ substitutedRti = H._substitute(universe, rti, typeArguments, depth);
+ if (substitutedRti !== rti)
+ changed = true;
+ result.push(t1);
+ result.push(t2);
+ result.push(substitutedRti);
+ }
+ return changed ? result : namedArray;
+ },
+ _substituteFunctionParameters: function(universe, functionParameters, typeArguments, depth) {
+ var result,
+ requiredPositional = functionParameters._requiredPositional,
+ substitutedRequiredPositional = H._substituteArray(universe, requiredPositional, typeArguments, depth),
+ optionalPositional = functionParameters._optionalPositional,
+ substitutedOptionalPositional = H._substituteArray(universe, optionalPositional, typeArguments, depth),
+ named = functionParameters._named,
+ substitutedNamed = H._substituteNamed(universe, named, typeArguments, depth);
+ if (substitutedRequiredPositional === requiredPositional && substitutedOptionalPositional === optionalPositional && substitutedNamed === named)
+ return functionParameters;
+ result = new H._FunctionParameters();
+ result._requiredPositional = substitutedRequiredPositional;
+ result._optionalPositional = substitutedOptionalPositional;
+ result._named = substitutedNamed;
+ return result;
+ },
+ setRuntimeTypeInfo: function(target, rti) {
+ target[init.arrayRti] = rti;
+ return target;
+ },
+ closureFunctionType: function(closure) {
+ var signature = closure.$signature;
+ if (signature != null) {
+ if (typeof signature == "number")
+ return H.getTypeFromTypesTable(signature);
+ return closure.$signature();
+ }
+ return null;
+ },
+ instanceOrFunctionType: function(object, testRti) {
+ var rti;
+ if (H.Rti__isUnionOfFunctionType(testRti))
+ if (object instanceof H.Closure) {
+ rti = H.closureFunctionType(object);
+ if (rti != null)
+ return rti;
+ }
+ return H.instanceType(object);
+ },
+ instanceType: function(object) {
+ var rti;
+ if (object instanceof P.Object) {
+ rti = object.$ti;
+ return rti != null ? rti : H._instanceTypeFromConstructor(object);
+ }
+ if (Array.isArray(object))
+ return H._arrayInstanceType(object);
+ return H._instanceTypeFromConstructor(J.getInterceptor$(object));
+ },
+ _arrayInstanceType: function(object) {
+ var rti = object[init.arrayRti],
+ defaultRti = type$.JSArray_dynamic;
+ if (rti == null)
+ return defaultRti;
+ if (rti.constructor !== defaultRti.constructor)
+ return defaultRti;
+ return rti;
+ },
+ _instanceType: function(object) {
+ var rti = object.$ti;
+ return rti != null ? rti : H._instanceTypeFromConstructor(object);
+ },
+ _instanceTypeFromConstructor: function(instance) {
+ var $constructor = instance.constructor,
+ probe = $constructor.$ccache;
+ if (probe != null)
+ return probe;
+ return H._instanceTypeFromConstructorMiss(instance, $constructor);
+ },
+ _instanceTypeFromConstructorMiss: function(instance, $constructor) {
+ var effectiveConstructor = instance instanceof H.Closure ? instance.__proto__.__proto__.constructor : $constructor,
+ rti = H._Universe_findErasedType(init.typeUniverse, effectiveConstructor.name);
+ $constructor.$ccache = rti;
+ return rti;
+ },
+ getTypeFromTypesTable: function(index) {
+ var table, type, rti;
+ H._asIntS(index);
+ table = init.types;
+ type = table[index];
+ if (typeof type == "string") {
+ rti = H._Universe_eval(init.typeUniverse, type, false);
+ table[index] = rti;
+ return rti;
+ }
+ return type;
+ },
+ _installSpecializedIsTest: function(object) {
+ var unstarred, isFn, testRti = this,
+ t1 = type$.Object;
+ if (testRti === t1)
+ return H._finishIsFn(testRti, object, H._isObject);
+ if (!H.isStrongTopType(testRti))
+ if (!(testRti === type$.legacy_Object))
+ t1 = testRti === t1;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ if (t1)
+ return H._finishIsFn(testRti, object, H._isTop);
+ t1 = testRti._kind;
+ unstarred = t1 === 6 ? testRti._primary : testRti;
+ if (unstarred === type$.int)
+ isFn = H._isInt;
+ else if (unstarred === type$.double || unstarred === type$.num)
+ isFn = H._isNum;
+ else if (unstarred === type$.String)
+ isFn = H._isString;
+ else
+ isFn = unstarred === type$.bool ? H._isBool : null;
+ if (isFn != null)
+ return H._finishIsFn(testRti, object, isFn);
+ if (unstarred._kind === 9) {
+ t1 = unstarred._primary;
+ if (unstarred._rest.every(H.isTopType)) {
+ testRti._specializedTestResource = "$is" + t1;
+ return H._finishIsFn(testRti, object, H._isTestViaProperty);
+ }
+ } else if (t1 === 7)
+ return H._finishIsFn(testRti, object, H._generalNullableIsTestImplementation);
+ return H._finishIsFn(testRti, object, H._generalIsTestImplementation);
+ },
+ _finishIsFn: function(testRti, object, isFn) {
+ testRti._is = isFn;
+ return testRti._is(object);
+ },
+ _installSpecializedAsCheck: function(object) {
+ var t1, asFn, testRti = this;
+ if (!H.isStrongTopType(testRti))
+ if (!(testRti === type$.legacy_Object))
+ t1 = testRti === type$.Object;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ if (t1)
+ asFn = H._asTop;
+ else if (testRti === type$.Object)
+ asFn = H._asObject;
+ else
+ asFn = H._generalNullableAsCheckImplementation;
+ testRti._as = asFn;
+ return testRti._as(object);
+ },
+ _nullIs: function(testRti) {
+ var t1,
+ kind = testRti._kind;
+ if (!H.isStrongTopType(testRti))
+ if (!(testRti === type$.legacy_Object))
+ if (!(testRti === type$.legacy_Never))
+ if (kind !== 7)
+ t1 = kind === 8 && H._nullIs(testRti._primary) || testRti === type$.Null || testRti === type$.JSNull;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ return t1;
+ },
+ _generalIsTestImplementation: function(object) {
+ var testRti = this;
+ if (object == null)
+ return H._nullIs(testRti);
+ return H._isSubtype(init.typeUniverse, H.instanceOrFunctionType(object, testRti), null, testRti, null);
+ },
+ _generalNullableIsTestImplementation: function(object) {
+ if (object == null)
+ return true;
+ return this._primary._is(object);
+ },
+ _isTestViaProperty: function(object) {
+ var tag, testRti = this;
+ if (object == null)
+ return H._nullIs(testRti);
+ tag = testRti._specializedTestResource;
+ if (object instanceof P.Object)
+ return !!object[tag];
+ return !!J.getInterceptor$(object)[tag];
+ },
+ _generalAsCheckImplementation: function(object) {
+ var testRti = this;
+ if (object == null)
+ return object;
+ else if (testRti._is(object))
+ return object;
+ H._failedAsCheck(object, testRti);
+ },
+ _generalNullableAsCheckImplementation: function(object) {
+ var testRti = this;
+ if (object == null)
+ return object;
+ else if (testRti._is(object))
+ return object;
+ H._failedAsCheck(object, testRti);
+ },
+ _failedAsCheck: function(object, testRti) {
+ throw H.wrapException(H._TypeError$fromMessage(H._Error_compose(object, H.instanceOrFunctionType(object, testRti), H._rtiToString(testRti, null))));
+ },
+ _Error_compose: function(object, objectRti, checkedTypeDescription) {
+ var objectDescription = P.Error_safeToString(object),
+ objectTypeDescription = H._rtiToString(objectRti == null ? H.instanceType(object) : objectRti, null);
+ return objectDescription + ": type '" + H.S(objectTypeDescription) + "' is not a subtype of type '" + H.S(checkedTypeDescription) + "'";
+ },
+ _TypeError$fromMessage: function(message) {
+ return new H._TypeError("TypeError: " + message);
+ },
+ _TypeError__TypeError$forType: function(object, type) {
+ return new H._TypeError("TypeError: " + H._Error_compose(object, null, type));
+ },
+ _isObject: function(object) {
+ return object != null;
+ },
+ _asObject: function(object) {
+ return object;
+ },
+ _isTop: function(object) {
+ return true;
+ },
+ _asTop: function(object) {
+ return object;
+ },
+ _isBool: function(object) {
+ return true === object || false === object;
+ },
+ _asBool: function(object) {
+ if (true === object)
+ return true;
+ if (false === object)
+ return false;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "bool"));
+ },
+ _asBoolS: function(object) {
+ if (true === object)
+ return true;
+ if (false === object)
+ return false;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "bool"));
+ },
+ _asBoolQ: function(object) {
+ if (true === object)
+ return true;
+ if (false === object)
+ return false;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "bool?"));
+ },
+ _asDouble: function(object) {
+ if (typeof object == "number")
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "double"));
+ },
+ _asDoubleS: function(object) {
+ if (typeof object == "number")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "double"));
+ },
+ _asDoubleQ: function(object) {
+ if (typeof object == "number")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "double?"));
+ },
+ _isInt: function(object) {
+ return typeof object == "number" && Math.floor(object) === object;
+ },
+ _asInt: function(object) {
+ if (typeof object == "number" && Math.floor(object) === object)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "int"));
+ },
+ _asIntS: function(object) {
+ if (typeof object == "number" && Math.floor(object) === object)
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "int"));
+ },
+ _asIntQ: function(object) {
+ if (typeof object == "number" && Math.floor(object) === object)
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "int?"));
+ },
+ _isNum: function(object) {
+ return typeof object == "number";
+ },
+ _asNum: function(object) {
+ if (typeof object == "number")
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "num"));
+ },
+ _asNumS: function(object) {
+ if (typeof object == "number")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "num"));
+ },
+ _asNumQ: function(object) {
+ if (typeof object == "number")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "num?"));
+ },
+ _isString: function(object) {
+ return typeof object == "string";
+ },
+ _asString: function(object) {
+ if (typeof object == "string")
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "String"));
+ },
+ _asStringS: function(object) {
+ if (typeof object == "string")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "String"));
+ },
+ _asStringQ: function(object) {
+ if (typeof object == "string")
+ return object;
+ if (object == null)
+ return object;
+ throw H.wrapException(H._TypeError__TypeError$forType(object, "String?"));
+ },
+ _rtiArrayToString: function(array, genericContext) {
+ var s, sep, i;
+ for (s = "", sep = "", i = 0; i < array.length; ++i, sep = ", ")
+ s += C.JSString_methods.$add(sep, H._rtiToString(array[i], genericContext));
+ return s;
+ },
+ _functionRtiToString: function(functionType, genericContext, bounds) {
+ var boundsLength, outerContextLength, offset, i, t1, t2, t3, typeParametersText, typeSep, t4, t5, boundRti, kind, parameters, requiredPositional, requiredPositionalLength, optionalPositional, optionalPositionalLength, named, namedLength, returnTypeText, argumentsText, sep, _s2_ = ", ";
+ if (bounds != null) {
+ boundsLength = bounds.length;
+ if (genericContext == null) {
+ genericContext = H.setRuntimeTypeInfo([], type$.JSArray_String);
+ outerContextLength = null;
+ } else
+ outerContextLength = genericContext.length;
+ offset = genericContext.length;
+ for (i = boundsLength; i > 0; --i)
+ C.JSArray_methods.add$1(genericContext, "T" + (offset + i));
+ for (t1 = type$.nullable_Object, t2 = type$.legacy_Object, t3 = type$.Object, typeParametersText = "<", typeSep = "", i = 0; i < boundsLength; ++i, typeSep = _s2_) {
+ typeParametersText += typeSep;
+ t4 = genericContext.length;
+ t5 = t4 - 1 - i;
+ if (t5 < 0)
+ return H.ioore(genericContext, t5);
+ typeParametersText = C.JSString_methods.$add(typeParametersText, genericContext[t5]);
+ boundRti = bounds[i];
+ kind = boundRti._kind;
+ if (!(kind === 2 || kind === 3 || kind === 4 || kind === 5 || boundRti === t1))
+ if (!(boundRti === t2))
+ t4 = boundRti === t3;
+ else
+ t4 = true;
+ else
+ t4 = true;
+ if (!t4)
+ typeParametersText += C.JSString_methods.$add(" extends ", H._rtiToString(boundRti, genericContext));
+ }
+ typeParametersText += ">";
+ } else {
+ typeParametersText = "";
+ outerContextLength = null;
+ }
+ t1 = functionType._primary;
+ parameters = functionType._rest;
+ requiredPositional = parameters._requiredPositional;
+ requiredPositionalLength = requiredPositional.length;
+ optionalPositional = parameters._optionalPositional;
+ optionalPositionalLength = optionalPositional.length;
+ named = parameters._named;
+ namedLength = named.length;
+ returnTypeText = H._rtiToString(t1, genericContext);
+ for (argumentsText = "", sep = "", i = 0; i < requiredPositionalLength; ++i, sep = _s2_)
+ argumentsText += C.JSString_methods.$add(sep, H._rtiToString(requiredPositional[i], genericContext));
+ if (optionalPositionalLength > 0) {
+ argumentsText += sep + "[";
+ for (sep = "", i = 0; i < optionalPositionalLength; ++i, sep = _s2_)
+ argumentsText += C.JSString_methods.$add(sep, H._rtiToString(optionalPositional[i], genericContext));
+ argumentsText += "]";
+ }
+ if (namedLength > 0) {
+ argumentsText += sep + "{";
+ for (sep = "", i = 0; i < namedLength; i += 3, sep = _s2_) {
+ argumentsText += sep;
+ if (named[i + 1])
+ argumentsText += "required ";
+ argumentsText += J.$add$ansx(H._rtiToString(named[i + 2], genericContext), " ") + named[i];
+ }
+ argumentsText += "}";
+ }
+ if (outerContextLength != null) {
+ genericContext.toString;
+ genericContext.length = outerContextLength;
+ }
+ return typeParametersText + "(" + argumentsText + ") => " + H.S(returnTypeText);
+ },
+ _rtiToString: function(rti, genericContext) {
+ var s, questionArgument, argumentKind, $name, $arguments, t1, t2,
+ kind = rti._kind;
+ if (kind === 5)
+ return "erased";
+ if (kind === 2)
+ return "dynamic";
+ if (kind === 3)
+ return "void";
+ if (kind === 1)
+ return "Never";
+ if (kind === 4)
+ return "any";
+ if (kind === 6) {
+ s = H._rtiToString(rti._primary, genericContext);
+ return s;
+ }
+ if (kind === 7) {
+ questionArgument = rti._primary;
+ s = H._rtiToString(questionArgument, genericContext);
+ argumentKind = questionArgument._kind;
+ return J.$add$ansx(argumentKind === 11 || argumentKind === 12 ? C.JSString_methods.$add("(", s) + ")" : s, "?");
+ }
+ if (kind === 8)
+ return "FutureOr<" + H.S(H._rtiToString(rti._primary, genericContext)) + ">";
+ if (kind === 9) {
+ $name = H._unminifyOrTag(rti._primary);
+ $arguments = rti._rest;
+ return $arguments.length !== 0 ? $name + ("<" + H._rtiArrayToString($arguments, genericContext) + ">") : $name;
+ }
+ if (kind === 11)
+ return H._functionRtiToString(rti, genericContext, null);
+ if (kind === 12)
+ return H._functionRtiToString(rti._primary, genericContext, rti._rest);
+ if (kind === 13) {
+ genericContext.toString;
+ t1 = rti._primary;
+ t2 = genericContext.length;
+ t1 = t2 - 1 - t1;
+ if (t1 < 0 || t1 >= t2)
+ return H.ioore(genericContext, t1);
+ return genericContext[t1];
+ }
+ return "?";
+ },
+ _unminifyOrTag: function(rawClassName) {
+ var preserved = H.unmangleGlobalNameIfPreservedAnyways(rawClassName);
+ if (preserved != null)
+ return preserved;
+ return rawClassName;
+ },
+ _Universe_findRule: function(universe, targetType) {
+ var rule = universe.tR[targetType];
+ for (; typeof rule == "string";)
+ rule = universe.tR[rule];
+ return rule;
+ },
+ _Universe_findErasedType: function(universe, cls) {
+ var $length, erased, $arguments, i, $interface,
+ metadata = universe.eT,
+ probe = metadata[cls];
+ if (probe == null)
+ return H._Universe_eval(universe, cls, false);
+ else if (typeof probe == "number") {
+ $length = probe;
+ erased = H._Universe__lookupTerminalRti(universe, 5, "#");
+ $arguments = [];
+ for (i = 0; i < $length; ++i)
+ $arguments.push(erased);
+ $interface = H._Universe__lookupInterfaceRti(universe, cls, $arguments);
+ metadata[cls] = $interface;
+ return $interface;
+ } else
+ return probe;
+ },
+ _Universe_addRules: function(universe, rules) {
+ return H._Utils_objectAssign(universe.tR, rules);
+ },
+ _Universe_addErasedTypes: function(universe, types) {
+ return H._Utils_objectAssign(universe.eT, types);
+ },
+ _Universe_eval: function(universe, recipe, normalize) {
+ var rti,
+ cache = universe.eC,
+ probe = cache.get(recipe);
+ if (probe != null)
+ return probe;
+ rti = H._Parser_parse(H._Parser_create(universe, null, recipe, normalize));
+ cache.set(recipe, rti);
+ return rti;
+ },
+ _Universe_evalInEnvironment: function(universe, environment, recipe) {
+ var probe, rti,
+ cache = environment._evalCache;
+ if (cache == null)
+ cache = environment._evalCache = new Map();
+ probe = cache.get(recipe);
+ if (probe != null)
+ return probe;
+ rti = H._Parser_parse(H._Parser_create(universe, environment, recipe, true));
+ cache.set(recipe, rti);
+ return rti;
+ },
+ _Universe_bind: function(universe, environment, argumentsRti) {
+ var argumentsRecipe, probe, rti,
+ cache = environment._bindCache;
+ if (cache == null)
+ cache = environment._bindCache = new Map();
+ argumentsRecipe = argumentsRti._canonicalRecipe;
+ probe = cache.get(argumentsRecipe);
+ if (probe != null)
+ return probe;
+ rti = H._Universe__lookupBindingRti(universe, environment, argumentsRti._kind === 10 ? argumentsRti._rest : [argumentsRti]);
+ cache.set(argumentsRecipe, rti);
+ return rti;
+ },
+ _Universe__installTypeTests: function(universe, rti) {
+ rti._as = H._installSpecializedAsCheck;
+ rti._is = H._installSpecializedIsTest;
+ return rti;
+ },
+ _Universe__lookupTerminalRti: function(universe, kind, key) {
+ var rti, t1,
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ rti = new H.Rti(null, null);
+ rti._kind = kind;
+ rti._canonicalRecipe = key;
+ t1 = H._Universe__installTypeTests(universe, rti);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__lookupStarRti: function(universe, baseType, normalize) {
+ var t1,
+ key = baseType._canonicalRecipe + "*",
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ t1 = H._Universe__createStarRti(universe, baseType, key, normalize);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__createStarRti: function(universe, baseType, key, normalize) {
+ var baseKind, t1, rti;
+ if (normalize) {
+ baseKind = baseType._kind;
+ if (!H.isStrongTopType(baseType))
+ t1 = baseType === type$.Null || baseType === type$.JSNull || baseKind === 7 || baseKind === 6;
+ else
+ t1 = true;
+ if (t1)
+ return baseType;
+ }
+ rti = new H.Rti(null, null);
+ rti._kind = 6;
+ rti._primary = baseType;
+ rti._canonicalRecipe = key;
+ return H._Universe__installTypeTests(universe, rti);
+ },
+ _Universe__lookupQuestionRti: function(universe, baseType, normalize) {
+ var t1,
+ key = baseType._canonicalRecipe + "?",
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ t1 = H._Universe__createQuestionRti(universe, baseType, key, normalize);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__createQuestionRti: function(universe, baseType, key, normalize) {
+ var baseKind, t1, starArgument, rti;
+ if (normalize) {
+ baseKind = baseType._kind;
+ if (!H.isStrongTopType(baseType))
+ if (!(baseType === type$.Null || baseType === type$.JSNull))
+ if (baseKind !== 7)
+ t1 = baseKind === 8 && H.isNullable(baseType._primary);
+ else
+ t1 = true;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ if (t1)
+ return baseType;
+ else if (baseKind === 1 || baseType === type$.legacy_Never)
+ return type$.Null;
+ else if (baseKind === 6) {
+ starArgument = baseType._primary;
+ if (starArgument._kind === 8 && H.isNullable(starArgument._primary))
+ return starArgument;
+ else
+ return H.Rti__getQuestionFromStar(universe, baseType);
+ }
+ }
+ rti = new H.Rti(null, null);
+ rti._kind = 7;
+ rti._primary = baseType;
+ rti._canonicalRecipe = key;
+ return H._Universe__installTypeTests(universe, rti);
+ },
+ _Universe__lookupFutureOrRti: function(universe, baseType, normalize) {
+ var t1,
+ key = baseType._canonicalRecipe + "/",
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ t1 = H._Universe__createFutureOrRti(universe, baseType, key, normalize);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__createFutureOrRti: function(universe, baseType, key, normalize) {
+ var t1, t2, rti;
+ if (normalize) {
+ t1 = baseType._kind;
+ if (!H.isStrongTopType(baseType))
+ if (!(baseType === type$.legacy_Object))
+ t2 = baseType === type$.Object;
+ else
+ t2 = true;
+ else
+ t2 = true;
+ if (t2 || baseType === type$.Object)
+ return baseType;
+ else if (t1 === 1)
+ return H._Universe__lookupInterfaceRti(universe, "Future", [baseType]);
+ else if (baseType === type$.Null || baseType === type$.JSNull)
+ return type$.nullable_Future_Null;
+ }
+ rti = new H.Rti(null, null);
+ rti._kind = 8;
+ rti._primary = baseType;
+ rti._canonicalRecipe = key;
+ return H._Universe__installTypeTests(universe, rti);
+ },
+ _Universe__lookupGenericFunctionParameterRti: function(universe, index) {
+ var rti, t1,
+ key = "" + index + "^",
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ rti = new H.Rti(null, null);
+ rti._kind = 13;
+ rti._primary = index;
+ rti._canonicalRecipe = key;
+ t1 = H._Universe__installTypeTests(universe, rti);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__canonicalRecipeJoin: function($arguments) {
+ var s, sep, i,
+ $length = $arguments.length;
+ for (s = "", sep = "", i = 0; i < $length; ++i, sep = ",")
+ s += sep + $arguments[i]._canonicalRecipe;
+ return s;
+ },
+ _Universe__canonicalRecipeJoinNamed: function($arguments) {
+ var s, sep, i, t1, nameSep, s0,
+ $length = $arguments.length;
+ for (s = "", sep = "", i = 0; i < $length; i += 3, sep = ",") {
+ t1 = $arguments[i];
+ nameSep = $arguments[i + 1] ? "!" : ":";
+ s0 = $arguments[i + 2]._canonicalRecipe;
+ s += sep + t1 + nameSep + s0;
+ }
+ return s;
+ },
+ _Universe__lookupInterfaceRti: function(universe, $name, $arguments) {
+ var probe, rti, t1,
+ s = $name;
+ if ($arguments.length !== 0)
+ s += "<" + H._Universe__canonicalRecipeJoin($arguments) + ">";
+ probe = universe.eC.get(s);
+ if (probe != null)
+ return probe;
+ rti = new H.Rti(null, null);
+ rti._kind = 9;
+ rti._primary = $name;
+ rti._rest = $arguments;
+ if ($arguments.length > 0)
+ rti._precomputed1 = $arguments[0];
+ rti._canonicalRecipe = s;
+ t1 = H._Universe__installTypeTests(universe, rti);
+ universe.eC.set(s, t1);
+ return t1;
+ },
+ _Universe__lookupBindingRti: function(universe, base, $arguments) {
+ var newBase, newArguments, key, probe, rti, t1;
+ if (base._kind === 10) {
+ newBase = base._primary;
+ newArguments = base._rest.concat($arguments);
+ } else {
+ newArguments = $arguments;
+ newBase = base;
+ }
+ key = newBase._canonicalRecipe + (";<" + H._Universe__canonicalRecipeJoin(newArguments) + ">");
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ rti = new H.Rti(null, null);
+ rti._kind = 10;
+ rti._primary = newBase;
+ rti._rest = newArguments;
+ rti._canonicalRecipe = key;
+ t1 = H._Universe__installTypeTests(universe, rti);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__lookupFunctionRti: function(universe, returnType, parameters) {
+ var sep, t1, key, probe, rti,
+ s = returnType._canonicalRecipe,
+ requiredPositional = parameters._requiredPositional,
+ requiredPositionalLength = requiredPositional.length,
+ optionalPositional = parameters._optionalPositional,
+ optionalPositionalLength = optionalPositional.length,
+ named = parameters._named,
+ namedLength = named.length,
+ recipe = "(" + H._Universe__canonicalRecipeJoin(requiredPositional);
+ if (optionalPositionalLength > 0) {
+ sep = requiredPositionalLength > 0 ? "," : "";
+ t1 = H._Universe__canonicalRecipeJoin(optionalPositional);
+ recipe += sep + "[" + t1 + "]";
+ }
+ if (namedLength > 0) {
+ sep = requiredPositionalLength > 0 ? "," : "";
+ t1 = H._Universe__canonicalRecipeJoinNamed(named);
+ recipe += sep + "{" + t1 + "}";
+ }
+ key = s + (recipe + ")");
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ rti = new H.Rti(null, null);
+ rti._kind = 11;
+ rti._primary = returnType;
+ rti._rest = parameters;
+ rti._canonicalRecipe = key;
+ t1 = H._Universe__installTypeTests(universe, rti);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__lookupGenericFunctionRti: function(universe, baseFunctionType, bounds, normalize) {
+ var t1,
+ key = baseFunctionType._canonicalRecipe + ("<" + H._Universe__canonicalRecipeJoin(bounds) + ">"),
+ probe = universe.eC.get(key);
+ if (probe != null)
+ return probe;
+ t1 = H._Universe__createGenericFunctionRti(universe, baseFunctionType, bounds, key, normalize);
+ universe.eC.set(key, t1);
+ return t1;
+ },
+ _Universe__createGenericFunctionRti: function(universe, baseFunctionType, bounds, key, normalize) {
+ var $length, typeArguments, count, i, bound, substitutedBase, substitutedBounds, rti;
+ if (normalize) {
+ $length = bounds.length;
+ typeArguments = new Array($length);
+ for (count = 0, i = 0; i < $length; ++i) {
+ bound = bounds[i];
+ if (bound._kind === 1) {
+ typeArguments[i] = bound;
+ ++count;
+ }
+ }
+ if (count > 0) {
+ substitutedBase = H._substitute(universe, baseFunctionType, typeArguments, 0);
+ substitutedBounds = H._substituteArray(universe, bounds, typeArguments, 0);
+ return H._Universe__lookupGenericFunctionRti(universe, substitutedBase, substitutedBounds, bounds !== substitutedBounds);
+ }
+ }
+ rti = new H.Rti(null, null);
+ rti._kind = 12;
+ rti._primary = baseFunctionType;
+ rti._rest = bounds;
+ rti._canonicalRecipe = key;
+ return H._Universe__installTypeTests(universe, rti);
+ },
+ _Parser_create: function(universe, environment, recipe, normalize) {
+ return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize};
+ },
+ _Parser_parse: function(parser) {
+ var t1, i, ch, universe, array, head, base, u, parameters, optionalPositional, named, item,
+ source = parser.r,
+ stack = parser.s;
+ for (t1 = source.length, i = 0; i < t1;) {
+ ch = source.charCodeAt(i);
+ if (ch >= 48 && ch <= 57)
+ i = H._Parser_handleDigit(i + 1, ch, source, stack);
+ else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36)
+ i = H._Parser_handleIdentifier(parser, i, source, stack, false);
+ else if (ch === 46)
+ i = H._Parser_handleIdentifier(parser, i, source, stack, true);
+ else {
+ ++i;
+ switch (ch) {
+ case 44:
+ break;
+ case 58:
+ stack.push(false);
+ break;
+ case 33:
+ stack.push(true);
+ break;
+ case 59:
+ stack.push(H._Parser_toType(parser.u, parser.e, stack.pop()));
+ break;
+ case 94:
+ stack.push(H._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop()));
+ break;
+ case 35:
+ stack.push(H._Universe__lookupTerminalRti(parser.u, 5, "#"));
+ break;
+ case 64:
+ stack.push(H._Universe__lookupTerminalRti(parser.u, 2, "@"));
+ break;
+ case 126:
+ stack.push(H._Universe__lookupTerminalRti(parser.u, 3, "~"));
+ break;
+ case 60:
+ stack.push(parser.p);
+ parser.p = stack.length;
+ break;
+ case 62:
+ universe = parser.u;
+ array = stack.splice(parser.p);
+ H._Parser_toTypes(parser.u, parser.e, array);
+ parser.p = stack.pop();
+ head = stack.pop();
+ if (typeof head == "string")
+ stack.push(H._Universe__lookupInterfaceRti(universe, head, array));
+ else {
+ base = H._Parser_toType(universe, parser.e, head);
+ switch (base._kind) {
+ case 11:
+ stack.push(H._Universe__lookupGenericFunctionRti(universe, base, array, parser.n));
+ break;
+ default:
+ stack.push(H._Universe__lookupBindingRti(universe, base, array));
+ break;
+ }
+ }
+ break;
+ case 38:
+ H._Parser_handleExtendedOperations(parser, stack);
+ break;
+ case 42:
+ u = parser.u;
+ stack.push(H._Universe__lookupStarRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+ break;
+ case 63:
+ u = parser.u;
+ stack.push(H._Universe__lookupQuestionRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+ break;
+ case 47:
+ u = parser.u;
+ stack.push(H._Universe__lookupFutureOrRti(u, H._Parser_toType(u, parser.e, stack.pop()), parser.n));
+ break;
+ case 40:
+ stack.push(parser.p);
+ parser.p = stack.length;
+ break;
+ case 41:
+ universe = parser.u;
+ parameters = new H._FunctionParameters();
+ optionalPositional = universe.sEA;
+ named = universe.sEA;
+ head = stack.pop();
+ if (typeof head == "number")
+ switch (head) {
+ case -1:
+ optionalPositional = stack.pop();
+ break;
+ case -2:
+ named = stack.pop();
+ break;
+ default:
+ stack.push(head);
+ break;
+ }
+ else
+ stack.push(head);
+ array = stack.splice(parser.p);
+ H._Parser_toTypes(parser.u, parser.e, array);
+ parser.p = stack.pop();
+ parameters._requiredPositional = array;
+ parameters._optionalPositional = optionalPositional;
+ parameters._named = named;
+ stack.push(H._Universe__lookupFunctionRti(universe, H._Parser_toType(universe, parser.e, stack.pop()), parameters));
+ break;
+ case 91:
+ stack.push(parser.p);
+ parser.p = stack.length;
+ break;
+ case 93:
+ array = stack.splice(parser.p);
+ H._Parser_toTypes(parser.u, parser.e, array);
+ parser.p = stack.pop();
+ stack.push(array);
+ stack.push(-1);
+ break;
+ case 123:
+ stack.push(parser.p);
+ parser.p = stack.length;
+ break;
+ case 125:
+ array = stack.splice(parser.p);
+ H._Parser_toTypesNamed(parser.u, parser.e, array);
+ parser.p = stack.pop();
+ stack.push(array);
+ stack.push(-2);
+ break;
+ default:
+ throw "Bad character " + ch;
+ }
+ }
+ }
+ item = stack.pop();
+ return H._Parser_toType(parser.u, parser.e, item);
+ },
+ _Parser_handleDigit: function(i, digit, source, stack) {
+ var t1, ch,
+ value = digit - 48;
+ for (t1 = source.length; i < t1; ++i) {
+ ch = source.charCodeAt(i);
+ if (!(ch >= 48 && ch <= 57))
+ break;
+ value = value * 10 + (ch - 48);
+ }
+ stack.push(value);
+ return i;
+ },
+ _Parser_handleIdentifier: function(parser, start, source, stack, hasPeriod) {
+ var t1, ch, t2, string, environment, recipe,
+ i = start + 1;
+ for (t1 = source.length; i < t1; ++i) {
+ ch = source.charCodeAt(i);
+ if (ch === 46) {
+ if (hasPeriod)
+ break;
+ hasPeriod = true;
+ } else {
+ if (!((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36))
+ t2 = ch >= 48 && ch <= 57;
+ else
+ t2 = true;
+ if (!t2)
+ break;
+ }
+ }
+ string = source.substring(start, i);
+ if (hasPeriod) {
+ t1 = parser.u;
+ environment = parser.e;
+ if (environment._kind === 10)
+ environment = environment._primary;
+ recipe = H._Universe_findRule(t1, environment._primary)[string];
+ if (recipe == null)
+ H.throwExpression('No "' + string + '" in "' + H.Rti__getCanonicalRecipe(environment) + '"');
+ stack.push(H._Universe_evalInEnvironment(t1, environment, recipe));
+ } else
+ stack.push(string);
+ return i;
+ },
+ _Parser_handleExtendedOperations: function(parser, stack) {
+ var $top = stack.pop();
+ if (0 === $top) {
+ stack.push(H._Universe__lookupTerminalRti(parser.u, 1, "0&"));
+ return;
+ }
+ if (1 === $top) {
+ stack.push(H._Universe__lookupTerminalRti(parser.u, 4, "1&"));
+ return;
+ }
+ throw H.wrapException(P.AssertionError$("Unexpected extended operation " + H.S($top)));
+ },
+ _Parser_toType: function(universe, environment, item) {
+ if (typeof item == "string")
+ return H._Universe__lookupInterfaceRti(universe, item, universe.sEA);
+ else if (typeof item == "number")
+ return H._Parser_indexToType(universe, environment, item);
+ else
+ return item;
+ },
+ _Parser_toTypes: function(universe, environment, items) {
+ var i,
+ $length = items.length;
+ for (i = 0; i < $length; ++i)
+ items[i] = H._Parser_toType(universe, environment, items[i]);
+ },
+ _Parser_toTypesNamed: function(universe, environment, items) {
+ var i,
+ $length = items.length;
+ for (i = 2; i < $length; i += 3)
+ items[i] = H._Parser_toType(universe, environment, items[i]);
+ },
+ _Parser_indexToType: function(universe, environment, index) {
+ var typeArguments, len,
+ kind = environment._kind;
+ if (kind === 10) {
+ if (index === 0)
+ return environment._primary;
+ typeArguments = environment._rest;
+ len = typeArguments.length;
+ if (index <= len)
+ return typeArguments[index - 1];
+ index -= len;
+ environment = environment._primary;
+ kind = environment._kind;
+ } else if (index === 0)
+ return environment;
+ if (kind !== 9)
+ throw H.wrapException(P.AssertionError$("Indexed base must be an interface type"));
+ typeArguments = environment._rest;
+ if (index <= typeArguments.length)
+ return typeArguments[index - 1];
+ throw H.wrapException(P.AssertionError$("Bad index " + index + " for " + environment.toString$0(0)));
+ },
+ _isSubtype: function(universe, s, sEnv, t, tEnv) {
+ var t1, sKind, leftTypeVariable, tKind, sBounds, tBounds, sLength, i, sBound, tBound;
+ if (s === t)
+ return true;
+ if (!H.isStrongTopType(t))
+ if (!(t === type$.legacy_Object))
+ t1 = t === type$.Object;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ if (t1)
+ return true;
+ sKind = s._kind;
+ if (sKind === 4)
+ return true;
+ if (H.isStrongTopType(s))
+ return false;
+ if (s._kind !== 1)
+ t1 = s === type$.Null || s === type$.JSNull;
+ else
+ t1 = true;
+ if (t1)
+ return true;
+ leftTypeVariable = sKind === 13;
+ if (leftTypeVariable)
+ if (H._isSubtype(universe, sEnv[s._primary], sEnv, t, tEnv))
+ return true;
+ tKind = t._kind;
+ if (sKind === 6)
+ return H._isSubtype(universe, s._primary, sEnv, t, tEnv);
+ if (tKind === 6) {
+ t1 = t._primary;
+ return H._isSubtype(universe, s, sEnv, t1, tEnv);
+ }
+ if (sKind === 8) {
+ if (!H._isSubtype(universe, s._primary, sEnv, t, tEnv))
+ return false;
+ return H._isSubtype(universe, H.Rti__getFutureFromFutureOr(universe, s), sEnv, t, tEnv);
+ }
+ if (sKind === 7) {
+ t1 = H._isSubtype(universe, s._primary, sEnv, t, tEnv);
+ return t1;
+ }
+ if (tKind === 8) {
+ if (H._isSubtype(universe, s, sEnv, t._primary, tEnv))
+ return true;
+ return H._isSubtype(universe, s, sEnv, H.Rti__getFutureFromFutureOr(universe, t), tEnv);
+ }
+ if (tKind === 7) {
+ t1 = H._isSubtype(universe, s, sEnv, t._primary, tEnv);
+ return t1;
+ }
+ if (leftTypeVariable)
+ return false;
+ t1 = sKind !== 11;
+ if ((!t1 || sKind === 12) && t === type$.Function)
+ return true;
+ if (tKind === 12) {
+ if (s === type$.JavaScriptFunction)
+ return true;
+ if (sKind !== 12)
+ return false;
+ sBounds = s._rest;
+ tBounds = t._rest;
+ sLength = sBounds.length;
+ if (sLength !== tBounds.length)
+ return false;
+ sEnv = sEnv == null ? sBounds : sBounds.concat(sEnv);
+ tEnv = tEnv == null ? tBounds : tBounds.concat(tEnv);
+ for (i = 0; i < sLength; ++i) {
+ sBound = sBounds[i];
+ tBound = tBounds[i];
+ if (!H._isSubtype(universe, sBound, sEnv, tBound, tEnv) || !H._isSubtype(universe, tBound, tEnv, sBound, sEnv))
+ return false;
+ }
+ return H._isFunctionSubtype(universe, s._primary, sEnv, t._primary, tEnv);
+ }
+ if (tKind === 11) {
+ if (s === type$.JavaScriptFunction)
+ return true;
+ if (t1)
+ return false;
+ return H._isFunctionSubtype(universe, s, sEnv, t, tEnv);
+ }
+ if (sKind === 9) {
+ if (tKind !== 9)
+ return false;
+ return H._isInterfaceSubtype(universe, s, sEnv, t, tEnv);
+ }
+ return false;
+ },
+ _isFunctionSubtype: function(universe, s, sEnv, t, tEnv) {
+ var sParameters, tParameters, sRequiredPositional, tRequiredPositional, sRequiredPositionalLength, tRequiredPositionalLength, requiredPositionalDelta, sOptionalPositional, tOptionalPositional, sOptionalPositionalLength, tOptionalPositionalLength, i, t1, sNamed, tNamed, sNamedLength, tNamedLength, sIndex, tIndex, tName, sName;
+ if (!H._isSubtype(universe, s._primary, sEnv, t._primary, tEnv))
+ return false;
+ sParameters = s._rest;
+ tParameters = t._rest;
+ sRequiredPositional = sParameters._requiredPositional;
+ tRequiredPositional = tParameters._requiredPositional;
+ sRequiredPositionalLength = sRequiredPositional.length;
+ tRequiredPositionalLength = tRequiredPositional.length;
+ if (sRequiredPositionalLength > tRequiredPositionalLength)
+ return false;
+ requiredPositionalDelta = tRequiredPositionalLength - sRequiredPositionalLength;
+ sOptionalPositional = sParameters._optionalPositional;
+ tOptionalPositional = tParameters._optionalPositional;
+ sOptionalPositionalLength = sOptionalPositional.length;
+ tOptionalPositionalLength = tOptionalPositional.length;
+ if (sRequiredPositionalLength + sOptionalPositionalLength < tRequiredPositionalLength + tOptionalPositionalLength)
+ return false;
+ for (i = 0; i < sRequiredPositionalLength; ++i) {
+ t1 = sRequiredPositional[i];
+ if (!H._isSubtype(universe, tRequiredPositional[i], tEnv, t1, sEnv))
+ return false;
+ }
+ for (i = 0; i < requiredPositionalDelta; ++i) {
+ t1 = sOptionalPositional[i];
+ if (!H._isSubtype(universe, tRequiredPositional[sRequiredPositionalLength + i], tEnv, t1, sEnv))
+ return false;
+ }
+ for (i = 0; i < tOptionalPositionalLength; ++i) {
+ t1 = sOptionalPositional[requiredPositionalDelta + i];
+ if (!H._isSubtype(universe, tOptionalPositional[i], tEnv, t1, sEnv))
+ return false;
+ }
+ sNamed = sParameters._named;
+ tNamed = tParameters._named;
+ sNamedLength = sNamed.length;
+ tNamedLength = tNamed.length;
+ for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) {
+ tName = tNamed[tIndex];
+ for (; true;) {
+ if (sIndex >= sNamedLength)
+ return false;
+ sName = sNamed[sIndex];
+ sIndex += 3;
+ if (tName < sName)
+ return false;
+ if (sName < tName)
+ continue;
+ t1 = sNamed[sIndex - 1];
+ if (!H._isSubtype(universe, tNamed[tIndex + 2], tEnv, t1, sEnv))
+ return false;
+ break;
+ }
+ }
+ return true;
+ },
+ _isInterfaceSubtype: function(universe, s, sEnv, t, tEnv) {
+ var sArgs, tArgs, $length, i, t1, t2, rule, supertypeArgs,
+ sName = s._primary,
+ tName = t._primary;
+ if (sName === tName) {
+ sArgs = s._rest;
+ tArgs = t._rest;
+ $length = sArgs.length;
+ for (i = 0; i < $length; ++i) {
+ t1 = sArgs[i];
+ t2 = tArgs[i];
+ if (!H._isSubtype(universe, t1, sEnv, t2, tEnv))
+ return false;
+ }
+ return true;
+ }
+ if (t === type$.Object)
+ return true;
+ rule = H._Universe_findRule(universe, sName);
+ if (rule == null)
+ return false;
+ supertypeArgs = rule[tName];
+ if (supertypeArgs == null)
+ return false;
+ $length = supertypeArgs.length;
+ tArgs = t._rest;
+ for (i = 0; i < $length; ++i)
+ if (!H._isSubtype(universe, H._Universe_evalInEnvironment(universe, s, supertypeArgs[i]), sEnv, tArgs[i], tEnv))
+ return false;
+ return true;
+ },
+ isNullable: function(t) {
+ var t1,
+ kind = t._kind;
+ if (!(t === type$.Null || t === type$.JSNull))
+ if (!H.isStrongTopType(t))
+ if (kind !== 7)
+ if (!(kind === 6 && H.isNullable(t._primary)))
+ t1 = kind === 8 && H.isNullable(t._primary);
+ else
+ t1 = true;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ return t1;
+ },
+ isTopType: function(t) {
+ var t1;
+ if (!H.isStrongTopType(t))
+ if (!(t === type$.legacy_Object))
+ t1 = t === type$.Object;
+ else
+ t1 = true;
+ else
+ t1 = true;
+ return t1;
+ },
+ isStrongTopType: function(t) {
+ var kind = t._kind;
+ return kind === 2 || kind === 3 || kind === 4 || kind === 5 || t === type$.nullable_Object;
+ },
+ _Utils_objectAssign: function(o, other) {
+ var i, key,
+ keys = Object.keys(other),
+ $length = keys.length;
+ for (i = 0; i < $length; ++i) {
+ key = keys[i];
+ o[key] = other[key];
+ }
+ },
+ Rti: function Rti(t0, t1) {
+ var _ = this;
+ _._as = t0;
+ _._is = t1;
+ _._cachedRuntimeType = _._specializedTestResource = _._precomputed1 = null;
+ _._kind = 0;
+ _._canonicalRecipe = _._bindCache = _._evalCache = _._rest = _._primary = null;
+ },
+ _FunctionParameters: function _FunctionParameters() {
+ this._named = this._optionalPositional = this._requiredPositional = null;
+ },
+ _Error: function _Error() {
+ },
+ _TypeError: function _TypeError(t0) {
+ this.__rti$_message = t0;
},
unmangleGlobalNameIfPreservedAnyways: function($name) {
return init.mangledGlobalNames[$name];
@@ -1781,7 +2734,7 @@
throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.S(proto(object, record))));
}
$constructor = object.constructor;
- interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()];
+ interceptor = $constructor == null ? null : $constructor[J.JS_INTEROP_INTERCEPTOR_TAG()];
if (interceptor != null)
return interceptor;
interceptor = H.lookupAndCacheInterceptor(object);
@@ -1795,15 +2748,21 @@
if (proto === Object.prototype)
return C.PlainJavaScriptObject_methods;
if (typeof $constructor == "function") {
- Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true});
+ Object.defineProperty($constructor, J.JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true});
return C.UnknownJavaScriptObject_methods;
}
return C.UnknownJavaScriptObject_methods;
},
- JSArray_JSArray$markFixed: function(allocation, $E) {
- return J.JSArray_markFixedList(H.setRuntimeTypeInfo(allocation, [$E]));
+ JS_INTEROP_INTERCEPTOR_TAG: function() {
+ var t1 = $._JS_INTEROP_INTERCEPTOR_TAG;
+ return t1 == null ? $._JS_INTEROP_INTERCEPTOR_TAG = init.getIsolateTag("_$dart_js") : t1;
},
- JSArray_markFixedList: function(list) {
+ JSArray_JSArray$fixed: function($length, $E) {
+ if ($length > 4294967295)
+ throw H.wrapException(P.RangeError$range($length, 0, 4294967295, "length", null));
+ return J.JSArray_markFixedList(H.setRuntimeTypeInfo(new Array($length), $E._eval$1("JSArray<0>")), $E);
+ },
+ JSArray_markFixedList: function(list, $T) {
list.fixed$length = Array;
return list;
},
@@ -1981,15 +2940,15 @@
return receiver - a0;
return J.getInterceptor$n(receiver).$sub(receiver, a0);
},
- _removeEventListener$3$x: function(receiver, a0, a1, a2) {
- return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2);
- },
addEventListener$3$x: function(receiver, a0, a1, a2) {
return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2);
},
noSuchMethod$1$: function(receiver, a0) {
return J.getInterceptor$(receiver).noSuchMethod$1(receiver, a0);
},
+ startsWith$1$s: function(receiver, a0) {
+ return J.getInterceptor$s(receiver).startsWith$1(receiver, a0);
+ },
toString$0$: function(receiver) {
return J.getInterceptor$(receiver).toString$0(receiver);
},
@@ -2046,13 +3005,13 @@
return P.async__AsyncRun__scheduleImmediateWithTimer$closure();
},
_AsyncRun__scheduleImmediateJsOverride: function(callback) {
- self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0));
+ self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(type$.void_Function._as(callback)), 0));
},
_AsyncRun__scheduleImmediateWithSetImmediate: function(callback) {
- self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(H.functionTypeCheck(callback, {func: 1, ret: -1})), 0));
+ self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(type$.void_Function._as(callback)), 0));
},
_AsyncRun__scheduleImmediateWithTimer: function(callback) {
- P.Timer__createTimer(C.Duration_0, H.functionTypeCheck(callback, {func: 1, ret: -1}));
+ P.Timer__createTimer(C.Duration_0, type$.void_Function._as(callback));
},
Timer__createTimer: function(duration, callback) {
var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000);
@@ -2064,7 +3023,7 @@
return t1;
},
_makeAsyncAwaitCompleter: function($T) {
- return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, [$T]), [$T]);
+ return new P._AsyncAwaitCompleter(new P._Future($.Zone__current, $T._eval$1("_Future<0>")), $T._eval$1("_AsyncAwaitCompleter<0>"));
},
_asyncStartSync: function(bodyFunction, completer) {
bodyFunction.call$2(0, null);
@@ -2081,20 +3040,21 @@
completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object));
},
_awaitOnObject: function(object, bodyFunction) {
- var future, _null = null,
+ var t1, future,
thenCallback = new P._awaitOnObject_closure(bodyFunction),
- errorCallback = new P._awaitOnObject_closure0(bodyFunction),
- t1 = J.getInterceptor$(object);
- if (!!t1.$is_Future)
- object._thenAwait$1$2(thenCallback, errorCallback, _null);
- else if (!!t1.$isFuture)
- object.then$1$2$onError(thenCallback, errorCallback, _null);
+ errorCallback = new P._awaitOnObject_closure0(bodyFunction);
+ if (object instanceof P._Future)
+ object._thenAwait$1$2(thenCallback, errorCallback, type$.dynamic);
else {
- future = new P._Future($.Zone__current, [null]);
- H.assertSubtypeOfRuntimeType(object, null);
- future._state = 4;
- future._resultOrListeners = object;
- future._thenAwait$1$2(thenCallback, _null, _null);
+ t1 = type$.dynamic;
+ if (type$.Future_dynamic._is(object))
+ object.then$1$2$onError(thenCallback, errorCallback, t1);
+ else {
+ future = new P._Future($.Zone__current, type$._Future_dynamic);
+ future._state = 4;
+ future._resultOrListeners = object;
+ future._thenAwait$1$2(thenCallback, errorCallback, t1);
+ }
}
},
_wrapJsFunctionForAsync: function($function) {
@@ -2110,20 +3070,13 @@
}
};
}($function, 1);
- return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), P.Null, P.int, null);
- },
- _Future$zoneValue: function(value, _zone, $T) {
- var t1 = new P._Future(_zone, [$T]);
- H.assertSubtypeOfRuntimeType(value, $T);
- t1._state = 4;
- t1._resultOrListeners = value;
- return t1;
+ return $.Zone__current.registerBinaryCallback$3$1(new P._wrapJsFunctionForAsync_closure($protected), type$.void, type$.int, type$.dynamic);
},
_Future__chainForeignFuture: function(source, target) {
var e, s, exception;
target._state = 1;
try {
- source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), P.Null);
+ source.then$1$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target), type$.Null);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
@@ -2131,59 +3084,62 @@
}
},
_Future__chainCoreFuture: function(source, target) {
- var t1, listeners;
- for (; t1 = source._state, t1 === 2;)
- source = H.interceptedTypeCheck(source._resultOrListeners, "$is_Future");
- if (t1 >= 4) {
+ var t1, t2, listeners;
+ for (t1 = type$._Future_dynamic; t2 = source._state, t2 === 2;)
+ source = t1._as(source._resultOrListeners);
+ if (t2 >= 4) {
listeners = target._removeListeners$0();
target._state = source._state;
target._resultOrListeners = source._resultOrListeners;
P._Future__propagateToListeners(target, listeners);
} else {
- listeners = H.interceptedTypeCheck(target._resultOrListeners, "$is_FutureListener");
+ listeners = type$.nullable__FutureListener_dynamic_dynamic._as(target._resultOrListeners);
target._state = 2;
target._resultOrListeners = source;
source._prependListeners$1(listeners);
}
},
_Future__propagateToListeners: function(source, listeners) {
- var _box_0, hasError, asyncError, listeners0, sourceResult, t2, t3, zone, t4, oldZone, current, result, _null = null, _box_1 = {},
+ var t2, t3, t4, _box_0, hasError, asyncError, nextListener, nextListener0, t5, sourceResult, t6, t7, zone, oldZone, result, current, _null = null, _box_1 = {},
t1 = _box_1.source = source;
- for (; true;) {
+ for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic, t4 = type$.Future_dynamic; true;) {
_box_0 = {};
hasError = t1._state === 8;
if (listeners == null) {
if (hasError) {
- asyncError = H.interceptedTypeCheck(t1._resultOrListeners, "$isAsyncError");
+ asyncError = t2._as(t1._resultOrListeners);
P._rootHandleUncaughtError(_null, _null, t1._zone, asyncError.error, asyncError.stackTrace);
}
return;
}
- for (; listeners0 = listeners._nextListener, listeners0 != null; listeners = listeners0) {
- listeners._nextListener = null;
- P._Future__propagateToListeners(_box_1.source, listeners);
+ _box_0.listener = listeners;
+ nextListener = listeners._nextListener;
+ for (t1 = listeners; nextListener != null; t1 = nextListener, nextListener = nextListener0) {
+ t1._nextListener = null;
+ P._Future__propagateToListeners(_box_1.source, t1);
+ _box_0.listener = nextListener;
+ nextListener0 = nextListener._nextListener;
}
- t1 = _box_1.source;
- sourceResult = t1._resultOrListeners;
+ t5 = _box_1.source;
+ sourceResult = t5._resultOrListeners;
_box_0.listenerHasError = hasError;
_box_0.listenerValueOrError = sourceResult;
- t2 = !hasError;
- if (t2) {
- t3 = listeners.state;
- t3 = (t3 & 1) !== 0 || (t3 & 15) === 8;
+ t6 = !hasError;
+ if (t6) {
+ t7 = t1.state;
+ t7 = (t7 & 1) !== 0 || (t7 & 15) === 8;
} else
- t3 = true;
- if (t3) {
- t3 = listeners.result;
- zone = t3._zone;
+ t7 = true;
+ if (t7) {
+ zone = t1.result._zone;
if (hasError) {
- t4 = t1._zone === zone;
- t4 = !(t4 || t4);
+ t7 = t5._zone === zone;
+ t7 = !(t7 || t7);
} else
- t4 = false;
- if (t4) {
- H.interceptedTypeCheck(sourceResult, "$isAsyncError");
- P._rootHandleUncaughtError(_null, _null, t1._zone, sourceResult.error, sourceResult.stackTrace);
+ t7 = false;
+ if (t7) {
+ t2._as(sourceResult);
+ P._rootHandleUncaughtError(_null, _null, t5._zone, sourceResult.error, sourceResult.stackTrace);
return;
}
oldZone = $.Zone__current;
@@ -2191,66 +3147,69 @@
$.Zone__current = zone;
else
oldZone = _null;
- t1 = listeners.state;
+ t1 = t1.state;
if ((t1 & 15) === 8)
- new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_1, _box_0, listeners, hasError).call$0();
- else if (t2) {
+ new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_0, _box_1, hasError).call$0();
+ else if (t6) {
if ((t1 & 1) !== 0)
- new P._Future__propagateToListeners_handleValueCallback(_box_0, listeners, sourceResult).call$0();
+ new P._Future__propagateToListeners_handleValueCallback(_box_0, sourceResult).call$0();
} else if ((t1 & 2) !== 0)
- new P._Future__propagateToListeners_handleError(_box_1, _box_0, listeners).call$0();
+ new P._Future__propagateToListeners_handleError(_box_1, _box_0).call$0();
if (oldZone != null)
$.Zone__current = oldZone;
t1 = _box_0.listenerValueOrError;
- if (!!J.getInterceptor$(t1).$isFuture) {
+ if (t4._is(t1)) {
+ result = _box_0.listener.result;
if (t1._state >= 4) {
- current = H.interceptedTypeCheck(t3._resultOrListeners, "$is_FutureListener");
- t3._resultOrListeners = null;
- listeners = t3._reverseListeners$1(current);
- t3._state = t1._state;
- t3._resultOrListeners = t1._resultOrListeners;
+ current = t3._as(result._resultOrListeners);
+ result._resultOrListeners = null;
+ listeners = result._reverseListeners$1(current);
+ result._state = t1._state;
+ result._resultOrListeners = t1._resultOrListeners;
_box_1.source = t1;
continue;
} else
- P._Future__chainCoreFuture(t1, t3);
+ P._Future__chainCoreFuture(t1, result);
return;
}
}
- result = listeners.result;
- current = H.interceptedTypeCheck(result._resultOrListeners, "$is_FutureListener");
+ result = _box_0.listener.result;
+ current = t3._as(result._resultOrListeners);
result._resultOrListeners = null;
listeners = result._reverseListeners$1(current);
t1 = _box_0.listenerHasError;
- t2 = _box_0.listenerValueOrError;
+ t5 = _box_0.listenerValueOrError;
if (!t1) {
- H.assertSubtypeOfRuntimeType(t2, H.getTypeArgumentByIndex(result, 0));
+ result.$ti._precomputed1._as(t5);
result._state = 4;
- result._resultOrListeners = t2;
+ result._resultOrListeners = t5;
} else {
- H.interceptedTypeCheck(t2, "$isAsyncError");
+ t2._as(t5);
result._state = 8;
- result._resultOrListeners = t2;
+ result._resultOrListeners = t5;
}
_box_1.source = result;
t1 = result;
}
},
_registerErrorHandler: function(errorHandler, zone) {
- if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object, P.StackTrace]}))
- return zone.registerBinaryCallback$3$1(errorHandler, null, P.Object, P.StackTrace);
- if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Object]}))
- return H.functionTypeCheck(errorHandler, {func: 1, ret: null, args: [P.Object]});
+ var t1;
+ if (type$.dynamic_Function_Object_StackTrace._is(errorHandler))
+ return zone.registerBinaryCallback$3$1(errorHandler, type$.dynamic, type$.Object, type$.StackTrace);
+ t1 = type$.dynamic_Function_Object;
+ if (t1._is(errorHandler))
+ return t1._as(errorHandler);
throw H.wrapException(P.ArgumentError$value(errorHandler, "onError", "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"));
},
_microtaskLoop: function() {
- var t1, t2;
- for (; t1 = $._nextCallback, t1 != null;) {
+ var entry, next;
+ for (entry = $._nextCallback; entry != null; entry = $._nextCallback) {
$._lastPriorityCallback = null;
- t2 = t1.next;
- $._nextCallback = t2;
- if (t2 == null)
+ next = entry.next;
+ $._nextCallback = next;
+ if (next == null)
$._lastCallback = null;
- t1.callback.call$0();
+ entry.callback.call$0();
}
},
_startMicrotaskLoop: function() {
@@ -2265,16 +3224,17 @@
}
},
_scheduleAsyncCallback: function(callback) {
- var newEntry = new P._AsyncCallbackEntry(callback);
- if ($._nextCallback == null) {
+ var newEntry = new P._AsyncCallbackEntry(callback),
+ lastCallback = $._lastCallback;
+ if (lastCallback == null) {
$._nextCallback = $._lastCallback = newEntry;
if (!$._isInCallbackLoop)
$.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure());
} else
- $._lastCallback = $._lastCallback.next = newEntry;
+ $._lastCallback = lastCallback.next = newEntry;
},
_schedulePriorityAsyncCallback: function(callback) {
- var entry, t2,
+ var entry, lastPriorityCallback, next,
t1 = $._nextCallback;
if (t1 == null) {
P._scheduleAsyncCallback(callback);
@@ -2282,14 +3242,15 @@
return;
}
entry = new P._AsyncCallbackEntry(callback);
- t2 = $._lastPriorityCallback;
- if (t2 == null) {
+ lastPriorityCallback = $._lastPriorityCallback;
+ if (lastPriorityCallback == null) {
entry.next = t1;
$._nextCallback = $._lastPriorityCallback = entry;
} else {
- entry.next = t2.next;
- $._lastPriorityCallback = t2.next = entry;
- if (entry.next == null)
+ next = lastPriorityCallback.next;
+ entry.next = next;
+ $._lastPriorityCallback = lastPriorityCallback.next = entry;
+ if (next == null)
$._lastCallback = entry;
}
},
@@ -2300,19 +3261,28 @@
P._rootScheduleMicrotask(_null, _null, C.C__RootZone, callback);
return;
}
- P._rootScheduleMicrotask(_null, _null, currentZone, H.functionTypeCheck(currentZone.bindCallbackGuarded$1(callback), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(_null, _null, currentZone, type$.void_Function._as(currentZone.bindCallbackGuarded$1(callback)));
},
StreamIterator_StreamIterator: function(stream, $T) {
- var t1 = stream == null ? H.throwExpression(P.ArgumentError$notNull("stream")) : stream;
- return new P._StreamIterator(t1, [$T]);
+ P.ArgumentError_checkNotNull(stream, "stream", $T._eval$1("Stream<0>"));
+ return new P._StreamIterator($T._eval$1("_StreamIterator<0>"));
},
StreamController_StreamController: function($T) {
var _null = null;
- return new P._AsyncStreamController(_null, _null, _null, _null, [$T]);
+ return new P._AsyncStreamController(_null, _null, _null, _null, $T._eval$1("_AsyncStreamController<0>"));
},
_runGuarded: function(notificationHandler) {
return;
},
+ _BufferingStreamSubscription__registerErrorHandler: function(zone, handleError) {
+ if (handleError == null)
+ handleError = P.async___nullErrorHandler$closure();
+ if (type$.void_Function_Object_StackTrace._is(handleError))
+ return zone.registerBinaryCallback$3$1(handleError, type$.dynamic, type$.Object, type$.StackTrace);
+ if (type$.void_Function_Object._is(handleError))
+ return type$.dynamic_Function_Object._as(handleError);
+ throw H.wrapException(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace."));
+ },
_nullErrorHandler: function(error, stackTrace) {
P._rootHandleUncaughtError(null, null, $.Zone__current, error, stackTrace);
},
@@ -2321,13 +3291,25 @@
Timer_Timer: function(duration, callback) {
var t1 = $.Zone__current;
if (t1 === C.C__RootZone)
- return P.Timer__createTimer(duration, H.functionTypeCheck(callback, {func: 1, ret: -1}));
- return P.Timer__createTimer(duration, H.functionTypeCheck(t1.bindCallbackGuarded$1(callback), {func: 1, ret: -1}));
+ return P.Timer__createTimer(duration, type$.void_Function._as(callback));
+ return P.Timer__createTimer(duration, type$.void_Function._as(t1.bindCallbackGuarded$1(callback)));
+ },
+ AsyncError$: function(error, stackTrace) {
+ var t1 = stackTrace == null ? P.AsyncError_defaultStackTrace(error) : stackTrace;
+ P.ArgumentError_checkNotNull(error, "error", type$.Object);
+ return new P.AsyncError(error, t1);
+ },
+ AsyncError_defaultStackTrace: function(error) {
+ var stackTrace;
+ if (type$.Error._is(error)) {
+ stackTrace = error.get$stackTrace();
+ if (stackTrace != null)
+ return stackTrace;
+ }
+ return C.C__StringStackTrace;
},
_rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) {
- var t1 = {};
- t1.error = error;
- P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace));
+ P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(error, stackTrace));
},
_rootRun: function($self, $parent, zone, f, $R) {
var old,
@@ -2373,10 +3355,10 @@
},
_rootScheduleMicrotask: function($self, $parent, zone, f) {
var t1;
- H.functionTypeCheck(f, {func: 1, ret: -1});
+ type$.void_Function._as(f);
t1 = C.C__RootZone !== zone;
if (t1)
- f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, -1);
+ f = !(!t1 || false) ? zone.bindCallbackGuarded$1(f) : zone.bindCallback$1$1(f, type$.void);
P._scheduleAsyncCallback(f);
},
_AsyncRun__initializeScheduleImmediate_internalCallback: function _AsyncRun__initializeScheduleImmediate_internalCallback(t0) {
@@ -2455,7 +3437,7 @@
this.e = t1;
this.s = t2;
},
- _Future__asyncComplete_closure: function _Future__asyncComplete_closure(t0, t1) {
+ _Future__asyncCompleteWithValue_closure: function _Future__asyncCompleteWithValue_closure(t0, t1) {
this.$this = t0;
this.value = t1;
},
@@ -2468,25 +3450,21 @@
this.error = t1;
this.stackTrace = t2;
},
- _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2, t3) {
- var _ = this;
- _._box_1 = t0;
- _._box_0 = t1;
- _.listener = t2;
- _.hasError = t3;
+ _Future__propagateToListeners_handleWhenCompleteCallback: function _Future__propagateToListeners_handleWhenCompleteCallback(t0, t1, t2) {
+ this._box_0 = t0;
+ this._box_1 = t1;
+ this.hasError = t2;
},
_Future__propagateToListeners_handleWhenCompleteCallback_closure: function _Future__propagateToListeners_handleWhenCompleteCallback_closure(t0) {
this.originalSource = t0;
},
- _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1, t2) {
+ _Future__propagateToListeners_handleValueCallback: function _Future__propagateToListeners_handleValueCallback(t0, t1) {
this._box_0 = t0;
- this.listener = t1;
- this.sourceResult = t2;
+ this.sourceResult = t1;
},
- _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1, t2) {
+ _Future__propagateToListeners_handleError: function _Future__propagateToListeners_handleError(t0, t1) {
this._box_1 = t0;
this._box_0 = t1;
- this.listener = t2;
},
_AsyncCallbackEntry: function _AsyncCallbackEntry(t0) {
this.callback = t0;
@@ -2531,14 +3509,16 @@
this._controller = t0;
this.$ti = t1;
},
- _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3) {
+ _ControllerSubscription: function _ControllerSubscription(t0, t1, t2, t3, t4, t5, t6) {
var _ = this;
_._controller = t0;
- _._onDone = _._onError = _._onData = null;
- _._zone = t1;
- _._state = t2;
+ _._onData = t1;
+ _._onError = t2;
+ _._onDone = t3;
+ _._zone = t4;
+ _._state = t5;
_._pending = _._cancelFuture = null;
- _.$ti = t3;
+ _.$ti = t6;
},
_StreamSinkWrapper: function _StreamSinkWrapper(t0, t1) {
this._async$_target = t0;
@@ -2582,12 +3562,8 @@
_._state = 0;
_.$ti = t0;
},
- _StreamIterator: function _StreamIterator(t0, t1) {
- var _ = this;
- _._subscription = null;
- _._stateData = t0;
- _._isPaused = false;
- _.$ti = t1;
+ _StreamIterator: function _StreamIterator(t0) {
+ this.$ti = t0;
},
AsyncError: function AsyncError(t0, t1) {
this.error = t0;
@@ -2596,7 +3572,7 @@
_Zone: function _Zone() {
},
_rootHandleUncaughtError_closure: function _rootHandleUncaughtError_closure(t0, t1) {
- this._box_0 = t0;
+ this.error = t0;
this.stackTrace = t1;
},
_RootZone: function _RootZone() {
@@ -2616,13 +3592,10 @@
this.T = t2;
},
LinkedHashMap_LinkedHashMap$_literal: function(keyValuePairs, $K, $V) {
- return H.assertSubtype(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap([$K, $V])), "$isLinkedHashMap", [$K, $V], "$asLinkedHashMap");
+ return $K._eval$1("@<0>")._bind$1($V)._eval$1("LinkedHashMap<1,2>")._as(H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"))));
},
LinkedHashMap_LinkedHashMap$_empty: function($K, $V) {
- return new H.JsLinkedHashMap([$K, $V]);
- },
- LinkedHashMap__makeEmpty: function() {
- return new H.JsLinkedHashMap([null, null]);
+ return new H.JsLinkedHashMap($K._eval$1("@<0>")._bind$1($V)._eval$1("JsLinkedHashMap<1,2>"));
},
IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) {
var parts, t1;
@@ -2631,7 +3604,7 @@
return "(...)";
return leftDelimiter + "..." + rightDelimiter;
}
- parts = H.setRuntimeTypeInfo([], [P.String]);
+ parts = H.setRuntimeTypeInfo([], type$.JSArray_String);
C.JSArray_methods.add$1($._toStringVisiting, iterable);
try {
P._iterablePartsToStrings(iterable, parts);
@@ -2640,7 +3613,7 @@
return H.ioore($._toStringVisiting, -1);
$._toStringVisiting.pop();
}
- t1 = P.StringBuffer__writeAll(leftDelimiter, H.listSuperNativeTypeCheck(parts, "$isIterable"), ", ") + rightDelimiter;
+ t1 = P.StringBuffer__writeAll(leftDelimiter, type$.Iterable_dynamic._as(parts), ", ") + rightDelimiter;
return t1.charCodeAt(0) == 0 ? t1 : t1;
},
IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) {
@@ -2788,7 +3761,7 @@
},
_parseJson: function(source, reviver) {
var parsed, e, exception, t1;
- if (typeof source !== "string")
+ if (typeof source != "string")
throw H.wrapException(H.argumentErrorValue(source));
parsed = null;
try {
@@ -2804,7 +3777,7 @@
_convertJsonToDartLazy: function(object) {
var i;
if (object == null)
- return;
+ return null;
if (typeof object != "object")
return object;
if (Object.getPrototypeOf(object) !== Array.prototype)
@@ -2819,10 +3792,13 @@
_defaultToEncodable: function(object) {
return object.toJson$0();
},
+ _JsonStringStringifier$: function(_sink, _toEncodable) {
+ return new P._JsonStringStringifier(_sink, [], P.convert___defaultToEncodable$closure());
+ },
_JsonStringStringifier_stringify: function(object, toEncodable, indent) {
var t1,
output = new P.StringBuffer(""),
- stringifier = new P._JsonStringStringifier(output, [], P.convert___defaultToEncodable$closure());
+ stringifier = P._JsonStringStringifier$(output, toEncodable);
stringifier.writeObject$1(object);
t1 = output._contents;
return t1.charCodeAt(0) == 0 ? t1 : t1;
@@ -2867,23 +3843,37 @@
this._toEncodable = t2;
},
_symbolMapToStringMap: function(map) {
- var result = new H.JsLinkedHashMap([P.String, null]);
+ var result = new H.JsLinkedHashMap(type$.JsLinkedHashMap_String_dynamic);
map.forEach$1(0, new P._symbolMapToStringMap_closure(result));
return result;
},
Function_apply: function($function, positionalArguments, namedArguments) {
return H.Primitives_applyFunction($function, positionalArguments, namedArguments == null ? null : P._symbolMapToStringMap(namedArguments));
},
+ int_parse: function(source) {
+ var value = H.Primitives_parseInt(source, null);
+ if (value != null)
+ return value;
+ throw H.wrapException(P.FormatException$(source, null, null));
+ },
Error__objectToString: function(object) {
if (object instanceof H.Closure)
return object.toString$0(0);
return "Instance of '" + H.S(H.Primitives_objectTypeName(object)) + "'";
},
- List_List$from: function(elements, growable, $E) {
+ List_List$filled: function($length, fill, $E) {
+ var i,
+ result = J.JSArray_JSArray$fixed($length, $E);
+ if ($length !== 0 && fill != null)
+ for (i = 0; i < result.length; ++i)
+ result[i] = fill;
+ return result;
+ },
+ List_List$from: function(elements, $E) {
var t1,
- list = H.setRuntimeTypeInfo([], [$E]);
+ list = H.setRuntimeTypeInfo([], $E._eval$1("JSArray<0>"));
for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
- C.JSArray_methods.add$1(list, H.assertSubtypeOfRuntimeType(t1.get$current(), $E));
+ C.JSArray_methods.add$1(list, $E._as(t1.get$current()));
return list;
},
String_String$fromCharCodes: function(charCodes) {
@@ -2944,20 +3934,25 @@
return "0" + n;
},
Error_safeToString: function(object) {
- if (typeof object === "number" || typeof object === "boolean" || null == object)
+ if (typeof object == "number" || H._isBool(object) || null == object)
return J.toString$0$(object);
- if (typeof object === "string")
+ if (typeof object == "string")
return JSON.stringify(object);
return P.Error__objectToString(object);
},
+ AssertionError$: function(message) {
+ return new P.AssertionError(message);
+ },
ArgumentError$: function(message) {
return new P.ArgumentError(false, null, null, message);
},
ArgumentError$value: function(value, $name, message) {
return new P.ArgumentError(true, value, $name, message);
},
- ArgumentError$notNull: function($name) {
- return new P.ArgumentError(false, null, $name, "Must not be null");
+ ArgumentError_checkNotNull: function(argument, $name, $T) {
+ if (argument == null)
+ throw H.wrapException(new P.ArgumentError(false, null, $name, "Must not be null"));
+ return argument;
},
RangeError$value: function(value, $name) {
return new P.RangeError(null, null, true, value, $name, "Value not in range");
@@ -2968,21 +3963,10 @@
RangeError_checkValidRange: function(start, end, $length) {
if (start > $length)
throw H.wrapException(P.RangeError$range(start, 0, $length, "start", null));
- if (end != null) {
- if (start > end || end > $length)
- throw H.wrapException(P.RangeError$range(end, start, $length, "end", null));
- return end;
- }
return $length;
},
- RangeError_checkNotNegative: function(value, $name) {
- if (typeof value !== "number")
- return value.$lt();
- if (value < 0)
- throw H.wrapException(P.RangeError$range(value, 0, null, $name, null));
- },
IndexError$: function(invalidValue, indexable, $name, message, $length) {
- var t1 = H.intTypeCheck($length == null ? J.get$length$asx(indexable) : $length);
+ var t1 = H._asIntS($length == null ? J.get$length$asx(indexable) : $length);
return new P.IndexError(t1, true, invalidValue, $name, "Index out of range");
},
UnsupportedError$: function(message) {
@@ -3010,14 +3994,10 @@
this._box_0 = t0;
this.sb = t1;
},
- bool: function bool() {
- },
DateTime: function DateTime(t0, t1) {
this._value = t0;
this.isUtc = t1;
},
- double: function double() {
- },
Duration: function Duration(t0) {
this._duration = t0;
},
@@ -3027,7 +4007,10 @@
},
Error: function Error() {
},
- AssertionError: function AssertionError() {
+ AssertionError: function AssertionError(t0) {
+ this.message = t0;
+ },
+ TypeError: function TypeError() {
},
NullThrownError: function NullThrownError() {
},
@@ -3089,38 +4072,22 @@
this.source = t1;
this.offset = t2;
},
- int: function int() {
- },
Iterable: function Iterable() {
},
- List: function List() {
- },
Null: function Null() {
},
- num: function num() {
- },
Object: function Object() {
},
- StackTrace: function StackTrace() {
- },
- String: function String() {
+ _StringStackTrace: function _StringStackTrace() {
},
StringBuffer: function StringBuffer(t0) {
this._contents = t0;
},
- Symbol: function Symbol() {
- },
convertDartToNative_Dictionary: function(dict) {
var object = {};
dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object));
return object;
},
- promiseToFuture: function(promise, $T) {
- var t1 = new P._Future($.Zone__current, [$T]),
- completer = new P._AsyncCompleter(t1, [$T]);
- promise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1));
- return t1;
- },
_AcceptStructuredClone: function _AcceptStructuredClone() {
},
_AcceptStructuredClone_walk_closure: function _AcceptStructuredClone_walk_closure(t0, t1) {
@@ -3135,6 +4102,12 @@
this.copies = t1;
this.mustCopy = false;
},
+ promiseToFuture: function(jsPromise, $T) {
+ var t1 = new P._Future($.Zone__current, $T._eval$1("_Future<0>")),
+ completer = new P._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>"));
+ jsPromise.then(H.convertDartClosureToJS(new P.promiseToFuture_closure(completer, $T), 1), H.convertDartClosureToJS(new P.promiseToFuture_closure0(completer), 1));
+ return t1;
+ },
promiseToFuture_closure: function promiseToFuture_closure(t0, t1) {
this.completer = t0;
this.T = t1;
@@ -3153,25 +4126,29 @@
return t1;
},
HttpRequest_request: function(url, method, sendData, withCredentials) {
- var t3,
- t1 = W.HttpRequest,
- t2 = new P._Future($.Zone__current, [t1]),
- completer = new P._AsyncCompleter(t2, [t1]),
+ var t2, t3, t4,
+ t1 = new P._Future($.Zone__current, type$._Future_HttpRequest),
+ completer = new P._AsyncCompleter(t1, type$._AsyncCompleter_HttpRequest),
xhr = new XMLHttpRequest();
C.HttpRequest_methods.open$3$async(xhr, method, url, true);
- xhr.withCredentials = true;
- t1 = W.ProgressEvent;
- t3 = {func: 1, ret: -1, args: [t1]};
- W._EventStreamSubscription$(xhr, "load", H.functionTypeCheck(new W.HttpRequest_request_closure(xhr, completer), t3), false, t1);
- W._EventStreamSubscription$(xhr, "error", H.functionTypeCheck(completer.get$completeError(), t3), false, t1);
- xhr.send(sendData);
- return t2;
+ C.HttpRequest_methods.set$withCredentials(xhr, true);
+ t2 = type$.nullable_void_Function_legacy_ProgressEvent;
+ t3 = t2._as(new W.HttpRequest_request_closure(xhr, completer));
+ type$.nullable_void_Function._as(null);
+ t4 = type$.legacy_ProgressEvent;
+ W._EventStreamSubscription$(xhr, "load", t3, false, t4);
+ W._EventStreamSubscription$(xhr, "error", t2._as(completer.get$completeError()), false, t4);
+ if (sendData != null)
+ xhr.send(sendData);
+ else
+ xhr.send();
+ return t1;
},
_EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) {
- var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), W.Event);
- t1 = new W._EventStreamSubscription(_target, _eventType, t1, false, [$T]);
- t1._tryResume$0();
- return t1;
+ var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData), type$.Event);
+ if (t1 != null && true)
+ J.addEventListener$3$x(_target, _eventType, t1, false);
+ return new W._EventStreamSubscription(_target, _eventType, t1, false, $T._eval$1("_EventStreamSubscription<0>"));
},
_wrapZone: function(callback, $T) {
var t1 = $.Zone__current;
@@ -3217,6 +4194,10 @@
},
UIEvent: function UIEvent() {
},
+ EventStreamProvider: function EventStreamProvider(t0, t1) {
+ this._eventType = t0;
+ this.$ti = t1;
+ },
_EventStream: function _EventStream(t0, t1, t2, t3) {
var _ = this;
_._target = t0;
@@ -3233,7 +4214,6 @@
},
_EventStreamSubscription: function _EventStreamSubscription(t0, t1, t2, t3, t4) {
var _ = this;
- _._pauseCount = 0;
_._target = t0;
_._eventType = t1;
_._html$_onData = t2;
@@ -3245,28 +4225,7 @@
}
},
N = {HexCodec: function HexCodec() {
- },
- Logger_Logger: function($name) {
- return $.Logger__loggers.putIfAbsent$2($name, new N.Logger_Logger_closure($name));
- },
- Logger: function Logger(t0, t1, t2) {
- this.name = t0;
- this.parent = t1;
- this._children = t2;
- },
- Logger_Logger_closure: function Logger_Logger_closure(t0) {
- this.name = t0;
- },
- Level: function Level(t0, t1) {
- this.name = t0;
- this.value = t1;
- },
- LogRecord: function LogRecord(t0, t1, t2) {
- this.level = t0;
- this.message = t1;
- this.loggerName = t2;
- }
- },
+ }},
R = {
_convert: function(bytes, start, end) {
var t1, t2, i, bufferIndex, byteOr, byte, bufferIndex0, t3,
@@ -3310,20 +4269,44 @@
StreamChannelMixin: function StreamChannelMixin() {
}
},
+ Y = {Level: function Level(t0, t1) {
+ this.name = t0;
+ this.value = t1;
+ }},
+ L = {LogRecord: function LogRecord(t0, t1, t2) {
+ this.level = t0;
+ this.message = t1;
+ this.loggerName = t2;
+ }},
+ F = {
+ Logger_Logger: function($name) {
+ return $.Logger__loggers.putIfAbsent$2($name, new F.Logger_Logger_closure($name));
+ },
+ Logger: function Logger(t0, t1, t2) {
+ var _ = this;
+ _.name = t0;
+ _.parent = t1;
+ _._level = null;
+ _._children = t2;
+ },
+ Logger_Logger_closure: function Logger_Logger_closure(t0) {
+ this.name = t0;
+ }
+ },
M = {
SseClient$: function(serverUrl) {
- var t1 = P.String;
- t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), N.Logger_Logger("SseClient"), P.StreamController_StreamController(null));
+ var t1 = type$.legacy_String;
+ t1 = new M.SseClient(P.StreamController_StreamController(t1), P.StreamController_StreamController(t1), F.Logger_Logger("SseClient"));
t1.SseClient$1(serverUrl);
return t1;
},
- SseClient: function SseClient(t0, t1, t2, t3) {
+ SseClient: function SseClient(t0, t1, t2) {
var _ = this;
_._incomingController = t0;
_._outgoingController = t1;
_._logger = t2;
+ _._lastMessageId = -1;
_._errorTimer = _._serverUrl = _._eventSource = null;
- _._messages = t3;
},
SseClient_closure: function SseClient_closure(t0) {
this.$this = t0;
@@ -3336,12 +4319,12 @@
this.error = t1;
}
},
- F = {
+ K = {
Uuid$: function() {
var options, t2, t1 = {};
t1.options = options;
t1.options = null;
- t2 = new F.Uuid();
+ t2 = new K.Uuid();
t2.Uuid$1$options(t1);
return t2;
},
@@ -3356,10 +4339,12 @@
main: function() {
var channel = M.SseClient$("/test"),
t1 = J.get$onClick$x(document.querySelector("button")),
- t2 = H.getTypeArgumentByIndex(t1, 0);
- W._EventStreamSubscription$(t1._target, t1._eventType, H.functionTypeCheck(new E.main_closure(channel), {func: 1, ret: -1, args: [t2]}), false, t2);
+ t2 = t1.$ti,
+ t3 = t2._eval$1("~(1)?")._as(new E.main_closure(channel));
+ type$.nullable_void_Function._as(null);
+ W._EventStreamSubscription$(t1._target, t1._eventType, t3, false, t2._precomputed1);
t2 = channel._incomingController;
- new P._ControllerStream(t2, [H.getTypeArgumentByIndex(t2, 0)]).listen$1(new E.main_closure0(channel));
+ new P._ControllerStream(t2, H._instanceType(t2)._eval$1("_ControllerStream<1>")).listen$1(new E.main_closure0(channel));
},
main_closure: function main_closure(t0) {
this.channel = t0;
@@ -3368,12 +4353,12 @@
this.channel = t0;
}
},
- U = {
+ T = {
UuidUtil_mathRNG: function() {
var b, rand, i,
t1 = new Array(16);
t1.fixed$length = Array;
- b = H.setRuntimeTypeInfo(t1, [P.int]);
+ b = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int);
for (rand = null, i = 0; i < 16; ++i) {
t1 = i & 3;
if (t1 === 0)
@@ -3385,7 +4370,7 @@
return b;
}
};
- var holders = [C, H, J, P, W, N, R, M, F, E, U];
+ var holders = [C, H, J, P, W, N, R, Y, L, F, M, K, E, T];
hunkHelpers.setFunctionNamesIfNecessary(holders);
var $ = {};
H.JS_CONST.prototype = {};
@@ -3400,7 +4385,7 @@
return "Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'";
},
noSuchMethod$1: function(receiver, invocation) {
- H.interceptedTypeCheck(invocation, "$isInvocation");
+ type$.Invocation._as(invocation);
throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()));
}
};
@@ -3409,10 +4394,10 @@
return String(receiver);
},
$and: function(receiver, other) {
- return H.checkBool(H.boolTypeCheck(other)) && receiver;
+ return H.checkBool(H._asBoolS(other)) && receiver;
},
$or: function(receiver, other) {
- return H.checkBool(H.boolTypeCheck(other)) || receiver;
+ return H.checkBool(H._asBoolS(other)) || receiver;
},
get$hashCode: function(receiver) {
return receiver ? 519018 : 218159;
@@ -3430,7 +4415,7 @@
return 0;
},
noSuchMethod$1: function(receiver, invocation) {
- return this.super$Interceptor$noSuchMethod(receiver, H.interceptedTypeCheck(invocation, "$isInvocation"));
+ return this.super$Interceptor$noSuchMethod(receiver, type$.Invocation._as(invocation));
},
$isNull: 1
};
@@ -3451,47 +4436,28 @@
return this.super$JavaScriptObject$toString(receiver);
return "JavaScript function for " + H.S(J.toString$0$(dartClosure));
},
- $signature: function() {
- return {func: 1, opt: [,,,,,,,,,,,,,,,,]};
- },
$isFunction: 1
};
J.JSArray.prototype = {
add$1: function(receiver, value) {
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0));
+ H._arrayInstanceType(receiver)._precomputed1._as(value);
if (!!receiver.fixed$length)
H.throwExpression(P.UnsupportedError$("add"));
receiver.push(value);
},
addAll$1: function(receiver, collection) {
var t1, _i;
- H.assertSubtype(collection, "$isIterable", [H.getTypeArgumentByIndex(receiver, 0)], "$asIterable");
+ H._arrayInstanceType(receiver)._eval$1("Iterable<1>")._as(collection);
if (!!receiver.fixed$length)
H.throwExpression(P.UnsupportedError$("addAll"));
for (t1 = collection.length, _i = 0; _i < collection.length; collection.length === t1 || (0, H.throwConcurrentModificationError)(collection), ++_i)
receiver.push(collection[_i]);
},
- setRange$3: function(receiver, start, end, iterable) {
- var $length, i,
- t1 = H.getTypeArgumentByIndex(receiver, 0);
- H.assertSubtype(iterable, "$isIterable", [t1], "$asIterable");
- if (!!receiver.immutable$list)
- H.throwExpression(P.UnsupportedError$("setRange"));
- P.RangeError_checkValidRange(start, end, receiver.length);
- $length = end - start;
- if ($length === 0)
- return;
- P.RangeError_checkNotNegative(0, "skipCount");
- H.assertSubtype(iterable, "$isList", [t1], "$asList");
- t1 = J.getInterceptor$asx(iterable);
- if ($length > t1.get$length(iterable))
- throw H.wrapException(H.IterableElementError_tooFew());
- if (0 < start)
- for (i = $length - 1; i >= 0; --i)
- receiver[start + i] = t1.$index(iterable, i);
- else
- for (i = 0; i < $length; ++i)
- receiver[start + i] = t1.$index(iterable, i);
+ get$last: function(receiver) {
+ var t1 = receiver.length;
+ if (t1 > 0)
+ return receiver[t1 - 1];
+ throw H.wrapException(H.IterableElementError_noElement());
},
get$isNotEmpty: function(receiver) {
return receiver.length !== 0;
@@ -3500,7 +4466,7 @@
return P.IterableBase_iterableToFullString(receiver, "[", "]");
},
get$iterator: function(receiver) {
- return new J.ArrayIterator(receiver, receiver.length, [H.getTypeArgumentByIndex(receiver, 0)]);
+ return new J.ArrayIterator(receiver, receiver.length, H._arrayInstanceType(receiver)._eval$1("ArrayIterator<1>"));
},
get$hashCode: function(receiver) {
return H.Primitives_objectHashCode(receiver);
@@ -3508,40 +4474,33 @@
get$length: function(receiver) {
return receiver.length;
},
- set$length: function(receiver, newLength) {
- if (!!receiver.fixed$length)
- H.throwExpression(P.UnsupportedError$("set length"));
- if (newLength < 0)
- throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null));
- receiver.length = newLength;
- },
$index: function(receiver, index) {
- if (typeof index !== "number" || Math.floor(index) !== index)
+ if (!H._isInt(index))
throw H.wrapException(H.diagnoseIndexError(receiver, index));
if (index >= receiver.length || index < 0)
throw H.wrapException(H.diagnoseIndexError(receiver, index));
return receiver[index];
},
$indexSet: function(receiver, index, value) {
- H.intTypeCheck(index);
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(receiver, 0));
+ H._asIntS(index);
+ H._arrayInstanceType(receiver)._precomputed1._as(value);
if (!!receiver.immutable$list)
H.throwExpression(P.UnsupportedError$("indexed set"));
- if (typeof index !== "number" || Math.floor(index) !== index)
+ if (!H._isInt(index))
throw H.wrapException(H.diagnoseIndexError(receiver, index));
if (index >= receiver.length || index < 0)
throw H.wrapException(H.diagnoseIndexError(receiver, index));
receiver[index] = value;
},
$add: function(receiver, other) {
- var totalLength,
- t1 = [H.getTypeArgumentByIndex(receiver, 0)];
- H.assertSubtype(other, "$isList", t1, "$asList");
- totalLength = C.JSInt_methods.$add(receiver.length, other.get$length(other));
+ var t2, _i,
+ t1 = H._arrayInstanceType(receiver);
+ t1._eval$1("List<1>")._as(other);
t1 = H.setRuntimeTypeInfo([], t1);
- this.set$length(t1, totalLength);
- this.setRange$3(t1, 0, receiver.length, receiver);
- this.setRange$3(t1, receiver.length, totalLength, other);
+ for (t2 = receiver.length, _i = 0; _i < receiver.length; receiver.length === t2 || (0, H.throwConcurrentModificationError)(receiver), ++_i)
+ this.add$1(t1, receiver[_i]);
+ for (t2 = other.get$iterator(other); t2.moveNext$0();)
+ this.add$1(t1, t2.get$current());
return t1;
},
$isIterable: 1,
@@ -3568,7 +4527,7 @@
return true;
},
set$_current: function(_current) {
- this._current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0));
+ this._current = this.$ti._eval$1("1?")._as(_current);
}
};
J.JSNumber.prototype = {
@@ -3638,7 +4597,7 @@
return 536870911 & ((scaled * 9007199254740992 | 0) + (scaled * 3542243181176521 | 0)) * 599197 + floorLog2 * 1259;
},
$add: function(receiver, other) {
- H.numTypeCheck(other);
+ H._asNumS(other);
return receiver + other;
},
$sub: function(receiver, other) {
@@ -3706,23 +4665,19 @@
return (receiver & other) >>> 0;
},
$or: function(receiver, other) {
- H.numTypeCheck(other);
- if (typeof other !== "number")
+ H._asNumS(other);
+ if (typeof other != "number")
throw H.wrapException(H.argumentErrorValue(other));
return (receiver | other) >>> 0;
},
$lt: function(receiver, other) {
- if (typeof other !== "number")
- throw H.wrapException(H.argumentErrorValue(other));
return receiver < other;
},
$gt: function(receiver, other) {
- if (typeof other !== "number")
- throw H.wrapException(H.argumentErrorValue(other));
return receiver > other;
},
$ge: function(receiver, other) {
- if (typeof other !== "number")
+ if (typeof other != "number")
throw H.wrapException(H.argumentErrorValue(other));
return receiver >= other;
},
@@ -3745,8 +4700,8 @@
return receiver.charCodeAt(index);
},
$add: function(receiver, other) {
- H.stringTypeCheck(other);
- if (typeof other !== "string")
+ H._asStringS(other);
+ if (typeof other != "string")
throw H.wrapException(P.ArgumentError$value(other, null, null));
return receiver + other;
},
@@ -3820,19 +4775,27 @@
$isPattern: 1,
$isString: 1
};
+ H.LateInitializationErrorImpl.prototype = {
+ toString$0: function(_) {
+ var message = this._message;
+ return message != null ? "LateInitializationError: " + message : "LateInitializationError";
+ }
+ };
H.EfficientLengthIterable.prototype = {};
H.ListIterable.prototype = {
get$iterator: function(_) {
var _this = this;
- return new H.ListIterator(_this, _this.get$length(_this), [H.getRuntimeTypeArgument(_this, "ListIterable", 0)]);
+ return new H.ListIterator(_this, _this.get$length(_this), H._instanceType(_this)._eval$1("ListIterator<ListIterable.E>"));
},
get$isEmpty: function(_) {
- return this.get$length(this) === 0;
+ var t1 = this._parent;
+ return t1.get$length(t1) === 0;
}
};
H.ListIterator.prototype = {
get$current: function() {
- return this.__internal$_current;
+ var cur = this.__internal$_current;
+ return cur;
},
moveNext$0: function() {
var t3, _this = this,
@@ -3851,11 +4814,11 @@
return true;
},
set$__internal$_current: function(_current) {
- this.__internal$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0));
+ this.__internal$_current = this.$ti._eval$1("1?")._as(_current);
}
};
H.FixedLengthListMixin.prototype = {};
- H.Symbol0.prototype = {
+ H.Symbol.prototype = {
get$hashCode: function(_) {
var hash = this._hashCode;
if (hash != null)
@@ -3870,9 +4833,9 @@
$eq: function(_, other) {
if (other == null)
return false;
- return other instanceof H.Symbol0 && this.__internal$_name == other.__internal$_name;
+ return other instanceof H.Symbol && this.__internal$_name == other.__internal$_name;
},
- $isSymbol: 1
+ $isSymbol0: 1
};
H.ConstantMapView.prototype = {};
H.ConstantMap.prototype = {
@@ -3893,20 +4856,20 @@
},
$index: function(_, key) {
if (!this.containsKey$1(key))
- return;
+ return null;
return this._fetch$1(key);
},
_fetch$1: function(key) {
- return this._jsObject[H.stringTypeCheck(key)];
+ return this._jsObject[H._asStringS(key)];
},
forEach$1: function(_, f) {
- var keys, t2, i, key, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 1);
- H.functionTypeCheck(f, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), t1]});
- keys = _this._keys;
- for (t2 = keys.length, i = 0; i < t2; ++i) {
+ var keys, t2, i, key,
+ t1 = H._instanceType(this);
+ t1._eval$1("~(1,2)")._as(f);
+ keys = this._keys;
+ for (t2 = keys.length, t1 = t1._rest[1], i = 0; i < t2; ++i) {
key = keys[i];
- f.call$2(key, H.assertSubtypeOfRuntimeType(_this._fetch$1(key), t1));
+ f.call$2(key, t1._as(this._fetch$1(key)));
}
}
};
@@ -3917,7 +4880,7 @@
},
get$positionalArguments: function() {
var t1, argumentCount, list, index, _this = this;
- if (_this._kind === 1)
+ if (_this.__js_helper$_kind === 1)
return C.List_empty;
t1 = _this._arguments;
argumentCount = t1.length - _this._namedArgumentNames.length - _this._typeArgumentCount;
@@ -3934,8 +4897,8 @@
return list;
},
get$namedArguments: function() {
- var t1, namedArgumentCount, t2, namedArgumentsStartIndex, t3, map, i, t4, t5, _this = this;
- if (_this._kind !== 0)
+ var t1, namedArgumentCount, t2, namedArgumentsStartIndex, map, i, t3, t4, _this = this;
+ if (_this.__js_helper$_kind !== 0)
return C.Map_empty;
t1 = _this._namedArgumentNames;
namedArgumentCount = t1.length;
@@ -3943,25 +4906,24 @@
namedArgumentsStartIndex = t2.length - namedArgumentCount - _this._typeArgumentCount;
if (namedArgumentCount === 0)
return C.Map_empty;
- t3 = P.Symbol;
- map = new H.JsLinkedHashMap([t3, null]);
+ map = new H.JsLinkedHashMap(type$.JsLinkedHashMap_Symbol_dynamic);
for (i = 0; i < namedArgumentCount; ++i) {
if (i >= t1.length)
return H.ioore(t1, i);
- t4 = t1[i];
- t5 = namedArgumentsStartIndex + i;
- if (t5 < 0 || t5 >= t2.length)
- return H.ioore(t2, t5);
- map.$indexSet(0, new H.Symbol0(t4), t2[t5]);
+ t3 = t1[i];
+ t4 = namedArgumentsStartIndex + i;
+ if (t4 < 0 || t4 >= t2.length)
+ return H.ioore(t2, t4);
+ map.$indexSet(0, new H.Symbol(t3), t2[t4]);
}
- return new H.ConstantMapView(map, [t3, null]);
+ return new H.ConstantMapView(map, type$.ConstantMapView_Symbol_dynamic);
},
$isInvocation: 1
};
H.Primitives_functionNoSuchMethod_closure.prototype = {
call$2: function($name, argument) {
var t1;
- H.stringTypeCheck($name);
+ H._asStringS($name);
t1 = this._box_0;
t1.names = t1.names + "$" + H.S($name);
C.JSArray_methods.add$1(this.namedArgumentList, $name);
@@ -3975,7 +4937,7 @@
var result, t1, _this = this,
match = new RegExp(_this._pattern).exec(message);
if (match == null)
- return;
+ return null;
result = Object.create(null);
t1 = _this._arguments;
if (t1 !== -1)
@@ -3999,7 +4961,7 @@
toString$0: function(_) {
var t1 = this._method;
if (t1 == null)
- return "NoSuchMethodError: " + H.S(this._message);
+ return "NoSuchMethodError: " + H.S(this.__js_helper$_message);
return "NoSuchMethodError: method not found: '" + t1 + "' on null";
}
};
@@ -4009,29 +4971,25 @@
_s38_ = "NoSuchMethodError: method not found: '",
t1 = _this._method;
if (t1 == null)
- return "NoSuchMethodError: " + H.S(_this._message);
+ return "NoSuchMethodError: " + H.S(_this.__js_helper$_message);
t2 = _this._receiver;
if (t2 == null)
- return _s38_ + t1 + "' (" + H.S(_this._message) + ")";
- return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this._message) + ")";
+ return _s38_ + t1 + "' (" + H.S(_this.__js_helper$_message) + ")";
+ return _s38_ + t1 + "' on '" + t2 + "' (" + H.S(_this.__js_helper$_message) + ")";
}
};
H.UnknownJsTypeError.prototype = {
toString$0: function(_) {
- var t1 = this._message;
+ var t1 = this.__js_helper$_message;
return t1.length === 0 ? "Error" : "Error: " + t1;
}
};
- H.ExceptionAndStackTrace.prototype = {};
- H.unwrapException_saveStackTrace.prototype = {
- call$1: function(error) {
- if (!!J.getInterceptor$(error).$isError)
- if (error.$thrownJsError == null)
- error.$thrownJsError = this.ex;
- return error;
- },
- $signature: 4
+ H.NullThrownFromJavaScriptException.prototype = {
+ toString$0: function(_) {
+ return "Throw of null ('" + (this._irritant === null ? "null" : "undefined") + "' from JavaScript)";
+ }
};
+ H.ExceptionAndStackTrace.prototype = {};
H._StackTrace.prototype = {
toString$0: function(_) {
var trace,
@@ -4094,19 +5052,9 @@
return "Closure '" + H.S(this._name) + "' of " + ("Instance of '" + H.S(H.Primitives_objectTypeName(receiver)) + "'");
}
};
- H.TypeErrorImplementation.prototype = {
- toString$0: function(_) {
- return this.message;
- }
- };
- H.CastErrorImplementation.prototype = {
- toString$0: function(_) {
- return this.message;
- }
- };
H.RuntimeError.prototype = {
toString$0: function(_) {
- return "RuntimeError: " + H.S(this.message);
+ return "RuntimeError: " + this.message;
}
};
H._AssertionError.prototype = {
@@ -4114,6 +5062,7 @@
return "Assertion failed: " + P.Error_safeToString(this.message);
}
};
+ H._Required.prototype = {};
H.JsLinkedHashMap.prototype = {
get$length: function(_) {
return this.__js_helper$_length;
@@ -4122,11 +5071,11 @@
return this.__js_helper$_length === 0;
},
get$keys: function() {
- return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]);
+ return new H.LinkedHashMapKeyIterable(this, H._instanceType(this)._eval$1("LinkedHashMapKeyIterable<1>"));
},
containsKey$1: function(key) {
var strings, t1;
- if (typeof key === "string") {
+ if (typeof key == "string") {
strings = this._strings;
if (strings == null)
return false;
@@ -4137,55 +5086,56 @@
}
},
internalContainsKey$1: function(key) {
- var rest = this._rest;
+ var rest = this.__js_helper$_rest;
if (rest == null)
return false;
return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff), key) >= 0;
},
$index: function(_, key) {
- var strings, cell, t1, nums, _this = this;
- if (typeof key === "string") {
+ var strings, cell, t1, nums, _this = this, _null = null;
+ if (typeof key == "string") {
strings = _this._strings;
if (strings == null)
- return;
+ return _null;
cell = _this._getTableCell$2(strings, key);
- t1 = cell == null ? null : cell.hashMapCellValue;
+ t1 = cell == null ? _null : cell.hashMapCellValue;
return t1;
- } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
+ } else if (typeof key == "number" && (key & 0x3ffffff) === key) {
nums = _this._nums;
if (nums == null)
- return;
+ return _null;
cell = _this._getTableCell$2(nums, key);
- t1 = cell == null ? null : cell.hashMapCellValue;
+ t1 = cell == null ? _null : cell.hashMapCellValue;
return t1;
} else
return _this.internalGet$1(key);
},
internalGet$1: function(key) {
var bucket, index,
- rest = this._rest;
+ rest = this.__js_helper$_rest;
if (rest == null)
- return;
+ return null;
bucket = this._getTableBucket$2(rest, J.get$hashCode$(key) & 0x3ffffff);
index = this.internalFindBucketIndex$2(bucket, key);
if (index < 0)
- return;
+ return null;
return bucket[index].hashMapCellValue;
},
$indexSet: function(_, key, value) {
- var strings, nums, rest, hash, bucket, index, _this = this;
- H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0));
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1));
- if (typeof key === "string") {
+ var strings, nums, rest, hash, bucket, index, _this = this,
+ t1 = H._instanceType(_this);
+ t1._precomputed1._as(key);
+ t1._rest[1]._as(value);
+ if (typeof key == "string") {
strings = _this._strings;
_this._addHashTableEntry$3(strings == null ? _this._strings = _this._newHashTable$0() : strings, key, value);
- } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
+ } else if (typeof key == "number" && (key & 0x3ffffff) === key) {
nums = _this._nums;
_this._addHashTableEntry$3(nums == null ? _this._nums = _this._newHashTable$0() : nums, key, value);
} else {
- rest = _this._rest;
+ rest = _this.__js_helper$_rest;
if (rest == null)
- rest = _this._rest = _this._newHashTable$0();
+ rest = _this.__js_helper$_rest = _this._newHashTable$0();
hash = J.get$hashCode$(key) & 0x3ffffff;
bucket = _this._getTableBucket$2(rest, hash);
if (bucket == null)
@@ -4200,9 +5150,10 @@
}
},
putIfAbsent$2: function(key, ifAbsent) {
- var value, _this = this;
- H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0));
- H.functionTypeCheck(ifAbsent, {func: 1, ret: H.getTypeArgumentByIndex(_this, 1)});
+ var value, _this = this,
+ t1 = H._instanceType(_this);
+ t1._precomputed1._as(key);
+ t1._eval$1("2()")._as(ifAbsent);
if (_this.containsKey$1(key))
return _this.$index(0, key);
value = ifAbsent.call$0();
@@ -4211,7 +5162,7 @@
},
forEach$1: function(_, action) {
var cell, modifications, _this = this;
- H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(_this, 0), H.getTypeArgumentByIndex(_this, 1)]});
+ H._instanceType(_this)._eval$1("~(1,2)")._as(action);
cell = _this._first;
modifications = _this._modifications;
for (; cell != null;) {
@@ -4222,9 +5173,10 @@
}
},
_addHashTableEntry$3: function(table, key, value) {
- var cell, _this = this;
- H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0));
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1));
+ var cell, _this = this,
+ t1 = H._instanceType(_this);
+ t1._precomputed1._as(key);
+ t1._rest[1]._as(value);
cell = _this._getTableCell$2(table, key);
if (cell == null)
_this._setTableEntry$3(table, key, _this._newLinkedCell$2(key, value));
@@ -4233,7 +5185,8 @@
},
_newLinkedCell$2: function(key, value) {
var _this = this,
- cell = new H.LinkedHashMapCell(H.assertSubtypeOfRuntimeType(key, H.getTypeArgumentByIndex(_this, 0)), H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 1)));
+ t1 = H._instanceType(_this),
+ cell = new H.LinkedHashMapCell(t1._precomputed1._as(key), t1._rest[1]._as(value));
if (_this._first == null)
_this._first = _this._last = cell;
else
@@ -4289,7 +5242,7 @@
},
get$iterator: function(_) {
var t1 = this._map,
- t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti);
+ t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, this.$ti._eval$1("LinkedHashMapKeyIterator<1>"));
t2._cell = t1._first;
return t2;
}
@@ -4299,24 +5252,22 @@
return this.__js_helper$_current;
},
moveNext$0: function() {
- var _this = this,
+ var cell, _this = this,
t1 = _this._map;
if (_this._modifications !== t1._modifications)
throw H.wrapException(P.ConcurrentModificationError$(t1));
- else {
- t1 = _this._cell;
- if (t1 == null) {
- _this.set$__js_helper$_current(null);
- return false;
- } else {
- _this.set$__js_helper$_current(t1.hashMapCellKey);
- _this._cell = _this._cell._next;
- return true;
- }
+ cell = _this._cell;
+ if (cell == null) {
+ _this.set$__js_helper$_current(null);
+ return false;
+ } else {
+ _this.set$__js_helper$_current(cell.hashMapCellKey);
+ _this._cell = cell._next;
+ return true;
}
},
set$__js_helper$_current: function(_current) {
- this.__js_helper$_current = H.assertSubtypeOfRuntimeType(_current, H.getTypeArgumentByIndex(this, 0));
+ this.__js_helper$_current = this.$ti._eval$1("1?")._as(_current);
}
};
H.initHooks_closure.prototype = {
@@ -4333,7 +5284,7 @@
};
H.initHooks_closure1.prototype = {
call$1: function(tag) {
- return this.prototypeForTag(H.stringTypeCheck(tag));
+ return this.prototypeForTag(H._asStringS(tag));
},
$signature: 14
};
@@ -4342,9 +5293,7 @@
get$length: function(receiver) {
return receiver.length;
},
- $isJavaScriptIndexingBehavior: 1,
- $asJavaScriptIndexingBehavior: function() {
- }
+ $isJavaScriptIndexingBehavior: 1
};
H.NativeTypedArrayOfDouble.prototype = {
$index: function(receiver, index) {
@@ -4352,47 +5301,23 @@
return receiver[index];
},
$indexSet: function(receiver, index, value) {
- H.intTypeCheck(index);
- H.doubleTypeCheck(value);
+ H._asIntS(index);
+ H._asDoubleS(value);
H._checkValidIndex(index, receiver, receiver.length);
receiver[index] = value;
},
- $asFixedLengthListMixin: function() {
- return [P.double];
- },
- $asListMixin: function() {
- return [P.double];
- },
$isIterable: 1,
- $asIterable: function() {
- return [P.double];
- },
- $isList: 1,
- $asList: function() {
- return [P.double];
- }
+ $isList: 1
};
H.NativeTypedArrayOfInt.prototype = {
$indexSet: function(receiver, index, value) {
- H.intTypeCheck(index);
- H.intTypeCheck(value);
+ H._asIntS(index);
+ H._asIntS(value);
H._checkValidIndex(index, receiver, receiver.length);
receiver[index] = value;
},
- $asFixedLengthListMixin: function() {
- return [P.int];
- },
- $asListMixin: function() {
- return [P.int];
- },
$isIterable: 1,
- $asIterable: function() {
- return [P.int];
- },
- $isList: 1,
- $asList: function() {
- return [P.int];
- }
+ $isList: 1
};
H.NativeInt16List.prototype = {
$index: function(receiver, index) {
@@ -4446,6 +5371,21 @@
H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {};
H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin.prototype = {};
H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin.prototype = {};
+ H.Rti.prototype = {
+ _eval$1: function(recipe) {
+ return H._Universe_evalInEnvironment(init.typeUniverse, this, recipe);
+ },
+ _bind$1: function(typeOrTuple) {
+ return H._Universe_bind(init.typeUniverse, this, typeOrTuple);
+ }
+ };
+ H._FunctionParameters.prototype = {};
+ H._Error.prototype = {
+ toString$0: function(_) {
+ return this.__rti$_message;
+ }
+ };
+ H._TypeError.prototype = {};
P._AsyncRun__initializeScheduleImmediate_internalCallback.prototype = {
call$1: function(_) {
var t1 = this._box_0,
@@ -4453,12 +5393,12 @@
t1.storedCallback = null;
f.call$0();
},
- $signature: 7
+ $signature: 5
};
P._AsyncRun__initializeScheduleImmediate_closure.prototype = {
call$1: function(callback) {
var t1, t2;
- this._box_0.storedCallback = H.functionTypeCheck(callback, {func: 1, ret: -1});
+ this._box_0.storedCallback = type$.void_Function._as(callback);
t1 = this.div;
t2 = this.span;
t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2);
@@ -4471,7 +5411,7 @@
},
"call*": "call$0",
$requiredArgCount: 0,
- $signature: 1
+ $signature: 0
};
P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback.prototype = {
call$0: function() {
@@ -4479,7 +5419,7 @@
},
"call*": "call$0",
$requiredArgCount: 0,
- $signature: 1
+ $signature: 0
};
P._TimerImpl.prototype = {
_TimerImpl$2: function(milliseconds, callback) {
@@ -4507,22 +5447,28 @@
},
"call*": "call$0",
$requiredArgCount: 0,
- $signature: 0
+ $signature: 1
};
P._AsyncAwaitCompleter.prototype = {
complete$1: function(_, value) {
- var t2, t3, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 0);
- H.futureOrCheck(value, {futureOr: 1, type: t1});
- t2 = !_this.isSync || H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture");
- t3 = _this._future;
- if (t2)
- t3._asyncComplete$1(value);
- else
- t3._completeWithValue$1(H.assertSubtypeOfRuntimeType(value, t1));
+ var t2, _this = this,
+ t1 = _this.$ti;
+ t1._eval$1("1/?")._as(value);
+ if (!_this.isSync)
+ _this._future._asyncComplete$1(value);
+ else {
+ t2 = _this._future;
+ if (t1._eval$1("Future<1>")._is(value))
+ t2._chainFuture$1(value);
+ else
+ t2._completeWithValue$1(t1._precomputed1._as(value));
+ }
},
completeError$2: function(e, st) {
- var t1 = this._future;
+ var t1;
+ if (st == null)
+ st = P.AsyncError_defaultStackTrace(e);
+ t1 = this._future;
if (this.isSync)
t1._completeError$2(e, st);
else
@@ -4537,7 +5483,7 @@
};
P._awaitOnObject_closure0.prototype = {
call$2: function(error, stackTrace) {
- this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, H.interceptedTypeCheck(stackTrace, "$isStackTrace")));
+ this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace)));
},
"call*": "call$2",
$requiredArgCount: 2,
@@ -4545,18 +5491,19 @@
};
P._wrapJsFunctionForAsync_closure.prototype = {
call$2: function(errorCode, result) {
- this.$protected(H.intTypeCheck(errorCode), result);
+ this.$protected(H._asIntS(errorCode), result);
},
$signature: 17
};
P._Completer.prototype = {
completeError$2: function(error, stackTrace) {
var t1;
- if (error == null)
- error = new P.NullThrownError();
+ P.ArgumentError_checkNotNull(error, "error", type$.Object);
t1 = this.future;
if (t1._state !== 0)
throw H.wrapException(P.StateError$("Future already completed"));
+ if (stackTrace == null)
+ stackTrace = P.AsyncError_defaultStackTrace(error);
t1._asyncCompleteError$2(error, stackTrace);
},
completeError$1: function(error) {
@@ -4565,45 +5512,47 @@
};
P._AsyncCompleter.prototype = {
complete$1: function(_, value) {
- var t1;
- H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(this, 0)});
- t1 = this.future;
- if (t1._state !== 0)
+ var t2,
+ t1 = this.$ti;
+ t1._eval$1("1/?")._as(value);
+ t2 = this.future;
+ if (t2._state !== 0)
throw H.wrapException(P.StateError$("Future already completed"));
- t1._asyncComplete$1(value);
+ t2._asyncComplete$1(t1._eval$1("1/")._as(value));
}
};
P._FutureListener.prototype = {
matchesErrorTest$1: function(asyncError) {
if ((this.state & 15) !== 6)
return true;
- return this.result._zone.runUnary$2$2(H.functionTypeCheck(this.callback, {func: 1, ret: P.bool, args: [P.Object]}), asyncError.error, P.bool, P.Object);
+ return this.result._zone.runUnary$2$2(type$.bool_Function_Object._as(this.callback), asyncError.error, type$.bool, type$.Object);
},
handleError$1: function(asyncError) {
var errorCallback = this.errorCallback,
- t1 = P.Object,
- t2 = {futureOr: 1, type: H.getTypeArgumentByIndex(this, 1)},
- t3 = this.result._zone;
- if (H.functionTypeTest(errorCallback, {func: 1, args: [P.Object, P.StackTrace]}))
- return H.futureOrCheck(t3.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, null, t1, P.StackTrace), t2);
+ t1 = type$.dynamic,
+ t2 = type$.Object,
+ t3 = this.$ti._eval$1("2/"),
+ t4 = this.result._zone;
+ if (type$.dynamic_Function_Object_StackTrace._is(errorCallback))
+ return t3._as(t4.runBinary$3$3(errorCallback, asyncError.error, asyncError.stackTrace, t1, t2, type$.StackTrace));
else
- return H.futureOrCheck(t3.runUnary$2$2(H.functionTypeCheck(errorCallback, {func: 1, args: [P.Object]}), asyncError.error, null, t1), t2);
+ return t3._as(t4.runUnary$2$2(type$.dynamic_Function_Object._as(errorCallback), asyncError.error, t1, t2));
}
};
P._Future.prototype = {
then$1$2$onError: function(f, onError, $R) {
var currentZone, result, t2,
- t1 = H.getTypeArgumentByIndex(this, 0);
- H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]});
+ t1 = this.$ti;
+ t1._bind$1($R)._eval$1("1/(2)")._as(f);
currentZone = $.Zone__current;
if (currentZone !== C.C__RootZone) {
- H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $R}, args: [t1]});
+ $R._eval$1("@<0/>")._bind$1(t1._precomputed1)._eval$1("1(2)")._as(f);
if (onError != null)
onError = P._registerErrorHandler(onError, currentZone);
}
- result = new P._Future($.Zone__current, [$R]);
+ result = new P._Future(currentZone, $R._eval$1("_Future<0>"));
t2 = onError == null ? 1 : 3;
- this._addListener$1(new P._FutureListener(result, t2, f, onError, [t1, $R]));
+ this._addListener$1(new P._FutureListener(result, t2, f, onError, t1._eval$1("@<1>")._bind$1($R)._eval$1("_FutureListener<1,2>")));
return result;
},
then$1$1: function(f, $R) {
@@ -4611,32 +5560,34 @@
},
_thenAwait$1$2: function(f, onError, $E) {
var result,
- t1 = H.getTypeArgumentByIndex(this, 0);
- H.functionTypeCheck(f, {func: 1, ret: {futureOr: 1, type: $E}, args: [t1]});
- result = new P._Future($.Zone__current, [$E]);
- this._addListener$1(new P._FutureListener(result, (onError == null ? 1 : 3) | 16, f, onError, [t1, $E]));
+ t1 = this.$ti;
+ t1._bind$1($E)._eval$1("1/(2)")._as(f);
+ result = new P._Future($.Zone__current, $E._eval$1("_Future<0>"));
+ this._addListener$1(new P._FutureListener(result, 19, f, onError, t1._eval$1("@<1>")._bind$1($E)._eval$1("_FutureListener<1,2>")));
return result;
},
whenComplete$1: function(action) {
var t1, result;
- H.functionTypeCheck(action, {func: 1});
- t1 = $.Zone__current;
- result = new P._Future(t1, this.$ti);
- if (t1 !== C.C__RootZone)
- action = H.functionTypeCheck(action, {func: 1, ret: null});
- t1 = H.getTypeArgumentByIndex(this, 0);
- this._addListener$1(new P._FutureListener(result, 8, action, null, [t1, t1]));
+ type$.dynamic_Function._as(action);
+ t1 = this.$ti;
+ result = new P._Future($.Zone__current, t1);
+ this._addListener$1(new P._FutureListener(result, 8, action, null, t1._eval$1("@<1>")._bind$1(t1._precomputed1)._eval$1("_FutureListener<1,2>")));
return result;
},
+ _setValue$1: function(value) {
+ this.$ti._precomputed1._as(value);
+ this._state = 4;
+ this._resultOrListeners = value;
+ },
_addListener$1: function(listener) {
var source, _this = this,
t1 = _this._state;
if (t1 <= 1) {
- listener._nextListener = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener");
+ listener._nextListener = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners);
_this._resultOrListeners = listener;
} else {
if (t1 === 2) {
- source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future");
+ source = type$._Future_dynamic._as(_this._resultOrListeners);
t1 = source._state;
if (t1 < 4) {
source._addListener$1(listener);
@@ -4645,26 +5596,27 @@
_this._state = t1;
_this._resultOrListeners = source._resultOrListeners;
}
- P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__addListener_closure(_this, listener), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__addListener_closure(_this, listener)));
}
},
_prependListeners$1: function(listeners) {
- var t1, existingListeners, cursor, cursor0, source, _this = this, _box_0 = {};
+ var t1, existingListeners, next, cursor, next0, source, _this = this, _box_0 = {};
_box_0.listeners = listeners;
if (listeners == null)
return;
t1 = _this._state;
if (t1 <= 1) {
- existingListeners = H.interceptedTypeCheck(_this._resultOrListeners, "$is_FutureListener");
- cursor = _this._resultOrListeners = listeners;
+ existingListeners = type$.nullable__FutureListener_dynamic_dynamic._as(_this._resultOrListeners);
+ _this._resultOrListeners = listeners;
if (existingListeners != null) {
- for (; cursor0 = cursor._nextListener, cursor0 != null; cursor = cursor0)
- ;
+ next = listeners._nextListener;
+ for (cursor = listeners; next != null; cursor = next, next = next0)
+ next0 = next._nextListener;
cursor._nextListener = existingListeners;
}
} else {
if (t1 === 2) {
- source = H.interceptedTypeCheck(_this._resultOrListeners, "$is_Future");
+ source = type$._Future_dynamic._as(_this._resultOrListeners);
t1 = source._state;
if (t1 < 4) {
source._prependListeners$1(listeners);
@@ -4674,11 +5626,11 @@
_this._resultOrListeners = source._resultOrListeners;
}
_box_0.listeners = _this._reverseListeners$1(listeners);
- P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__prependListeners_closure(_box_0, _this), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__prependListeners_closure(_box_0, _this)));
}
},
_removeListeners$0: function() {
- var current = H.interceptedTypeCheck(this._resultOrListeners, "$is_FutureListener");
+ var current = type$.nullable__FutureListener_dynamic_dynamic._as(this._resultOrListeners);
this._resultOrListeners = null;
return this._reverseListeners$1(current);
},
@@ -4691,18 +5643,17 @@
return prev;
},
_complete$1: function(value) {
- var t2, listeners, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 0);
- H.futureOrCheck(value, {futureOr: 1, type: t1});
- t2 = _this.$ti;
- if (H.checkSubtype(value, "$isFuture", t2, "$asFuture"))
- if (H.checkSubtype(value, "$is_Future", t2, null))
+ var listeners, _this = this,
+ t1 = _this.$ti;
+ t1._eval$1("1/")._as(value);
+ if (t1._eval$1("Future<1>")._is(value))
+ if (t1._is(value))
P._Future__chainCoreFuture(value, _this);
else
P._Future__chainForeignFuture(value, _this);
else {
listeners = _this._removeListeners$0();
- H.assertSubtypeOfRuntimeType(value, t1);
+ t1._precomputed1._as(value);
_this._state = 4;
_this._resultOrListeners = value;
P._Future__propagateToListeners(_this, listeners);
@@ -4710,41 +5661,44 @@
},
_completeWithValue$1: function(value) {
var listeners, _this = this;
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0));
+ _this.$ti._precomputed1._as(value);
listeners = _this._removeListeners$0();
_this._state = 4;
_this._resultOrListeners = value;
P._Future__propagateToListeners(_this, listeners);
},
_completeError$2: function(error, stackTrace) {
- var listeners, _this = this;
- H.interceptedTypeCheck(stackTrace, "$isStackTrace");
+ var listeners, t1, _this = this;
+ type$.StackTrace._as(stackTrace);
listeners = _this._removeListeners$0();
+ t1 = P.AsyncError$(error, stackTrace);
_this._state = 8;
- _this._resultOrListeners = new P.AsyncError(error, stackTrace);
+ _this._resultOrListeners = t1;
P._Future__propagateToListeners(_this, listeners);
},
- _completeError$1: function(error) {
- return this._completeError$2(error, null);
- },
_asyncComplete$1: function(value) {
- var _this = this;
- H.futureOrCheck(value, {futureOr: 1, type: H.getTypeArgumentByIndex(_this, 0)});
- if (H.checkSubtype(value, "$isFuture", _this.$ti, "$asFuture")) {
- _this._chainFuture$1(value);
+ var t1 = this.$ti;
+ t1._eval$1("1/")._as(value);
+ if (t1._eval$1("Future<1>")._is(value)) {
+ this._chainFuture$1(value);
return;
}
+ this._asyncCompleteWithValue$1(t1._precomputed1._as(value));
+ },
+ _asyncCompleteWithValue$1: function(value) {
+ var _this = this;
+ _this.$ti._precomputed1._as(value);
_this._state = 1;
- P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__asyncComplete_closure(_this, value), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__asyncCompleteWithValue_closure(_this, value)));
},
_chainFuture$1: function(value) {
var _this = this,
t1 = _this.$ti;
- H.assertSubtype(value, "$isFuture", t1, "$asFuture");
- if (H.checkSubtype(value, "$is_Future", t1, null)) {
+ t1._eval$1("Future<1>")._as(value);
+ if (t1._is(value)) {
if (value._state === 8) {
_this._state = 1;
- P._rootScheduleMicrotask(null, null, _this._zone, H.functionTypeCheck(new P._Future__chainFuture_closure(_this, value), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(null, null, _this._zone, type$.void_Function._as(new P._Future__chainFuture_closure(_this, value)));
} else
P._Future__chainCoreFuture(value, _this);
return;
@@ -4752,9 +5706,9 @@
P._Future__chainForeignFuture(value, _this);
},
_asyncCompleteError$2: function(error, stackTrace) {
- H.interceptedTypeCheck(stackTrace, "$isStackTrace");
+ type$.StackTrace._as(stackTrace);
this._state = 1;
- P._rootScheduleMicrotask(null, null, this._zone, H.functionTypeCheck(new P._Future__asyncCompleteError_closure(this, error, stackTrace), {func: 1, ret: -1}));
+ P._rootScheduleMicrotask(null, null, this._zone, type$.void_Function._as(new P._Future__asyncCompleteError_closure(this, error, stackTrace)));
},
$isFuture: 1
};
@@ -4762,13 +5716,13 @@
call$0: function() {
P._Future__propagateToListeners(this.$this, this.listener);
},
- $signature: 1
+ $signature: 0
};
P._Future__prependListeners_closure.prototype = {
call$0: function() {
P._Future__propagateToListeners(this.$this, this._box_0.listeners);
},
- $signature: 1
+ $signature: 0
};
P._Future__chainForeignFuture_closure.prototype = {
call$1: function(value) {
@@ -4776,58 +5730,51 @@
t1._state = 0;
t1._complete$1(value);
},
- $signature: 7
+ $signature: 5
};
P._Future__chainForeignFuture_closure0.prototype = {
call$2: function(error, stackTrace) {
- H.interceptedTypeCheck(stackTrace, "$isStackTrace");
- this.target._completeError$2(error, stackTrace);
- },
- call$1: function(error) {
- return this.call$2(error, null);
+ this.target._completeError$2(error, type$.StackTrace._as(stackTrace));
},
"call*": "call$2",
- $defaultValues: function() {
- return [null];
- },
- $signature: 18
+ $requiredArgCount: 2,
+ $signature: 19
};
P._Future__chainForeignFuture_closure1.prototype = {
call$0: function() {
this.target._completeError$2(this.e, this.s);
},
- $signature: 1
+ $signature: 0
};
- P._Future__asyncComplete_closure.prototype = {
+ P._Future__asyncCompleteWithValue_closure.prototype = {
call$0: function() {
- var t1 = this.$this;
- t1._completeWithValue$1(H.assertSubtypeOfRuntimeType(this.value, H.getTypeArgumentByIndex(t1, 0)));
+ this.$this._completeWithValue$1(this.value);
},
- $signature: 1
+ $signature: 0
};
P._Future__chainFuture_closure.prototype = {
call$0: function() {
P._Future__chainCoreFuture(this.value, this.$this);
},
- $signature: 1
+ $signature: 0
};
P._Future__asyncCompleteError_closure.prototype = {
call$0: function() {
this.$this._completeError$2(this.error, this.stackTrace);
},
- $signature: 1
+ $signature: 0
};
P._Future__propagateToListeners_handleWhenCompleteCallback.prototype = {
call$0: function() {
var e, s, t1, exception, t2, originalSource, _this = this, completeResult = null;
try {
- t1 = _this.listener;
- completeResult = t1.result._zone.run$1$1(H.functionTypeCheck(t1.callback, {func: 1}), null);
+ t1 = _this._box_0.listener;
+ completeResult = t1.result._zone.run$1$1(type$.dynamic_Function._as(t1.callback), type$.dynamic);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
if (_this.hasError) {
- t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError").error;
+ t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners).error;
t2 = e;
t2 = t1 == null ? t2 == null : t1 === t2;
t1 = t2;
@@ -4835,86 +5782,86 @@
t1 = false;
t2 = _this._box_0;
if (t1)
- t2.listenerValueOrError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError");
+ t2.listenerValueOrError = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
else
- t2.listenerValueOrError = new P.AsyncError(e, s);
+ t2.listenerValueOrError = P.AsyncError$(e, s);
t2.listenerHasError = true;
return;
}
- if (!!J.getInterceptor$(completeResult).$isFuture) {
- if (completeResult instanceof P._Future && completeResult._state >= 4) {
- if (completeResult._state === 8) {
- t1 = _this._box_0;
- t1.listenerValueOrError = H.interceptedTypeCheck(completeResult._resultOrListeners, "$isAsyncError");
- t1.listenerHasError = true;
- }
- return;
+ if (completeResult instanceof P._Future && completeResult._state >= 4) {
+ if (completeResult._state === 8) {
+ t1 = _this._box_0;
+ t1.listenerValueOrError = type$.AsyncError._as(completeResult._resultOrListeners);
+ t1.listenerHasError = true;
}
+ return;
+ }
+ if (type$.Future_dynamic._is(completeResult)) {
originalSource = _this._box_1.source;
t1 = _this._box_0;
- t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), null);
+ t1.listenerValueOrError = completeResult.then$1$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource), type$.dynamic);
t1.listenerHasError = false;
}
},
- $signature: 0
+ $signature: 1
};
P._Future__propagateToListeners_handleWhenCompleteCallback_closure.prototype = {
call$1: function(_) {
return this.originalSource;
},
- $signature: 19
+ $signature: 20
};
P._Future__propagateToListeners_handleValueCallback.prototype = {
call$0: function() {
- var e, s, t1, t2, t3, t4, exception, _this = this;
+ var e, s, t1, t2, t3, t4, t5, exception;
try {
- t1 = _this.listener;
- t2 = H.getTypeArgumentByIndex(t1, 0);
- t3 = H.assertSubtypeOfRuntimeType(_this.sourceResult, t2);
- t4 = H.getTypeArgumentByIndex(t1, 1);
- _this._box_0.listenerValueOrError = t1.result._zone.runUnary$2$2(H.functionTypeCheck(t1.callback, {func: 1, ret: {futureOr: 1, type: t4}, args: [t2]}), t3, {futureOr: 1, type: t4}, t2);
+ t1 = this._box_0;
+ t2 = t1.listener;
+ t3 = t2.$ti;
+ t4 = t3._precomputed1;
+ t5 = t4._as(this.sourceResult);
+ t1.listenerValueOrError = t2.result._zone.runUnary$2$2(t3._eval$1("2/(1)")._as(t2.callback), t5, t3._eval$1("2/"), t4);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
- t1 = _this._box_0;
- t1.listenerValueOrError = new P.AsyncError(e, s);
+ t1 = this._box_0;
+ t1.listenerValueOrError = P.AsyncError$(e, s);
t1.listenerHasError = true;
}
},
- $signature: 0
+ $signature: 1
};
P._Future__propagateToListeners_handleError.prototype = {
call$0: function() {
- var asyncError, e, s, t1, t2, exception, t3, t4, _this = this;
+ var asyncError, e, s, t1, exception, t2, t3, t4, _this = this;
try {
- asyncError = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError");
- t1 = _this.listener;
- if (H.boolConversionCheck(t1.matchesErrorTest$1(asyncError)) && t1.errorCallback != null) {
- t2 = _this._box_0;
- t2.listenerValueOrError = t1.handleError$1(asyncError);
- t2.listenerHasError = false;
+ asyncError = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
+ t1 = _this._box_0;
+ if (H.boolConversionCheck(t1.listener.matchesErrorTest$1(asyncError)) && t1.listener.errorCallback != null) {
+ t1.listenerValueOrError = t1.listener.handleError$1(asyncError);
+ t1.listenerHasError = false;
}
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
- t1 = H.interceptedTypeCheck(_this._box_1.source._resultOrListeners, "$isAsyncError");
+ t1 = type$.AsyncError._as(_this._box_1.source._resultOrListeners);
t2 = t1.error;
t3 = e;
t4 = _this._box_0;
if (t2 == null ? t3 == null : t2 === t3)
t4.listenerValueOrError = t1;
else
- t4.listenerValueOrError = new P.AsyncError(e, s);
+ t4.listenerValueOrError = P.AsyncError$(e, s);
t4.listenerHasError = true;
}
},
- $signature: 0
+ $signature: 1
};
P._AsyncCallbackEntry.prototype = {};
P.Stream.prototype = {
get$length: function(_) {
var t1 = {},
- future = new P._Future($.Zone__current, [P.int]);
+ future = new P._Future($.Zone__current, type$._Future_int);
t1.count = 0;
this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1, this), true, new P.Stream_length_closure0(t1, future), future.get$_completeError());
return future;
@@ -4922,18 +5869,18 @@
};
P.Stream_length_closure.prototype = {
call$1: function(_) {
- H.assertSubtypeOfRuntimeType(_, H.getTypeArgumentByIndex(this.$this, 0));
+ H._instanceType(this.$this)._precomputed1._as(_);
++this._box_0.count;
},
$signature: function() {
- return {func: 1, ret: P.Null, args: [H.getTypeArgumentByIndex(this.$this, 0)]};
+ return H._instanceType(this.$this)._eval$1("Null(1)");
}
};
P.Stream_length_closure0.prototype = {
call$0: function() {
this.future._complete$1(this._box_0.count);
},
- $signature: 1
+ $signature: 0
};
P.StreamSubscription.prototype = {};
P.StreamTransformerBase.prototype = {};
@@ -4941,30 +5888,27 @@
get$_pendingEvents: function() {
var t1, _this = this;
if ((_this._state & 8) === 0)
- return H.assertSubtype(_this._varData, "$is_PendingEvents", _this.$ti, "$as_PendingEvents");
- t1 = _this.$ti;
- return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_PendingEvents", t1, "$as_PendingEvents");
+ return H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(_this._varData);
+ t1 = H._instanceType(_this);
+ return t1._eval$1("_PendingEvents<1>?")._as(t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData());
},
_ensurePendingEvents$0: function() {
- var t1, state, _this = this;
+ var events, t1, _this = this;
if ((_this._state & 8) === 0) {
- t1 = _this._varData;
- if (t1 == null)
- t1 = _this._varData = new P._StreamImplEvents(_this.$ti);
- return H.assertSubtype(t1, "$is_StreamImplEvents", _this.$ti, "$as_StreamImplEvents");
+ events = _this._varData;
+ if (events == null)
+ events = _this._varData = new P._StreamImplEvents(H._instanceType(_this)._eval$1("_StreamImplEvents<1>"));
+ return H._instanceType(_this)._eval$1("_StreamImplEvents<1>")._as(events);
}
- t1 = _this.$ti;
- state = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState");
- state.get$varData();
- return H.assertSubtype(state.get$varData(), "$is_StreamImplEvents", t1, "$as_StreamImplEvents");
+ t1 = H._instanceType(_this);
+ events = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).get$varData();
+ return t1._eval$1("_StreamImplEvents<1>")._as(events);
},
get$_subscription: function() {
- var t1, _this = this;
- if ((_this._state & 8) !== 0) {
- t1 = _this.$ti;
- return H.assertSubtype(H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").get$varData(), "$is_ControllerSubscription", t1, "$as_ControllerSubscription");
- }
- return H.assertSubtype(_this._varData, "$is_ControllerSubscription", _this.$ti, "$as_ControllerSubscription");
+ var varData = this._varData;
+ if ((this._state & 8) !== 0)
+ varData = type$._StreamControllerAddStreamState_nullable_Object._as(varData).get$varData();
+ return H._instanceType(this)._eval$1("_ControllerSubscription<1>")._as(varData);
},
_badEventState$0: function() {
if ((this._state & 4) !== 0)
@@ -4974,19 +5918,20 @@
_ensureDoneFuture$0: function() {
var t1 = this._doneFuture;
if (t1 == null)
- t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, [null]);
+ t1 = this._doneFuture = (this._state & 2) !== 0 ? $.$get$Future__nullFuture() : new P._Future($.Zone__current, type$._Future_void);
return t1;
},
add$1: function(_, value) {
- var t1, _this = this;
- H.assertSubtypeOfRuntimeType(value, H.getTypeArgumentByIndex(_this, 0));
- t1 = _this._state;
- if (t1 >= 4)
+ var t2, _this = this,
+ t1 = H._instanceType(_this);
+ t1._precomputed1._as(value);
+ t2 = _this._state;
+ if (t2 >= 4)
throw H.wrapException(_this._badEventState$0());
- if ((t1 & 1) !== 0)
+ if ((t2 & 1) !== 0)
_this._sendData$1(value);
- else if ((t1 & 3) === 0)
- _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, _this.$ti));
+ else if ((t2 & 3) === 0)
+ _this._ensurePendingEvents$0().add$1(0, new P._DelayedData(value, t1._eval$1("_DelayedData<1>")));
},
close$0: function(_) {
var _this = this,
@@ -5003,38 +5948,61 @@
return _this._ensureDoneFuture$0();
},
_subscribe$4: function(onData, onError, onDone, cancelOnError) {
- var t2, t3, t4, subscription, pendingEvents, addState, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 0);
- H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]});
- H.functionTypeCheck(onDone, {func: 1, ret: -1});
+ var t2, t3, t4, t5, t6, subscription, pendingEvents, addState, _this = this,
+ t1 = H._instanceType(_this);
+ t1._eval$1("~(1)?")._as(onData);
+ type$.nullable_void_Function._as(onDone);
if ((_this._state & 3) !== 0)
throw H.wrapException(P.StateError$("Stream has already been listened to."));
t2 = $.Zone__current;
t3 = cancelOnError ? 1 : 0;
- t4 = _this.$ti;
- subscription = new P._ControllerSubscription(_this, t2, t3, t4);
- subscription._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, t1);
+ type$.$env_1_1_void._bind$1(t1._precomputed1)._eval$1("1(2)")._as(onData);
+ t4 = P._BufferingStreamSubscription__registerErrorHandler(t2, onError);
+ t5 = onDone == null ? P.async___nullDoneHandler$closure() : onDone;
+ t6 = type$.void_Function;
+ subscription = new P._ControllerSubscription(_this, onData, t4, t6._as(t5), t2, t3, t1._eval$1("_ControllerSubscription<1>"));
pendingEvents = _this.get$_pendingEvents();
- t1 = _this._state |= 1;
- if ((t1 & 8) !== 0) {
- addState = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t4, "$as_StreamControllerAddStreamState");
+ t3 = _this._state |= 1;
+ if ((t3 & 8) !== 0) {
+ addState = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData);
addState.set$varData(subscription);
addState.resume$0();
} else
_this._varData = subscription;
subscription._setPendingEvents$1(pendingEvents);
- subscription._guardCallback$1(new P._StreamController__subscribe_closure(_this));
+ t1 = t6._as(new P._StreamController__subscribe_closure(_this));
+ t2 = subscription._state;
+ subscription._state = t2 | 32;
+ t1.call$0();
+ subscription._state &= 4294967263;
+ subscription._checkState$1((t2 & 4) !== 0);
return subscription;
},
_recordCancel$1: function(subscription) {
- var result, _this = this,
- t1 = _this.$ti;
- H.assertSubtype(subscription, "$isStreamSubscription", t1, "$asStreamSubscription");
+ var result, onCancel, cancelResult, e, s, exception, result0, _this = this,
+ t1 = H._instanceType(_this);
+ t1._eval$1("StreamSubscription<1>")._as(subscription);
result = null;
if ((_this._state & 8) !== 0)
- result = H.assertSubtype(_this._varData, "$is_StreamControllerAddStreamState", t1, "$as_StreamControllerAddStreamState").cancel$0();
+ result = t1._eval$1("_StreamControllerAddStreamState<1>")._as(_this._varData).cancel$0();
_this._varData = null;
_this._state = _this._state & 4294967286 | 2;
+ onCancel = _this.onCancel;
+ if (onCancel != null)
+ if (result == null)
+ try {
+ cancelResult = onCancel.call$0();
+ if (type$.Future_void._is(cancelResult))
+ result = cancelResult;
+ } catch (exception) {
+ e = H.unwrapException(exception);
+ s = H.getTraceFromException(exception);
+ result0 = new P._Future($.Zone__current, type$._Future_void);
+ result0._asyncCompleteError$2(e, s);
+ result = result0;
+ }
+ else
+ result = result.whenComplete$1(onCancel);
t1 = new P._StreamController__recordCancel_complete(_this);
if (result != null)
result = result.whenComplete$1(t1);
@@ -5050,21 +6018,21 @@
call$0: function() {
P._runGuarded(this.$this.onListen);
},
- $signature: 1
+ $signature: 0
};
P._StreamController__recordCancel_complete.prototype = {
call$0: function() {
- var t1 = this.$this._doneFuture;
- if (t1 != null && t1._state === 0)
- t1._asyncComplete$1(null);
+ var doneFuture = this.$this._doneFuture;
+ if (doneFuture != null && doneFuture._state === 0)
+ doneFuture._asyncComplete$1(null);
},
- $signature: 0
+ $signature: 1
};
P._AsyncStreamControllerDispatch.prototype = {
_sendData$1: function(data) {
- var t1 = H.getTypeArgumentByIndex(this, 0);
- H.assertSubtypeOfRuntimeType(data, t1);
- this.get$_subscription()._addPending$1(new P._DelayedData(data, [t1]));
+ var t1 = this.$ti;
+ t1._precomputed1._as(data);
+ this.get$_subscription()._addPending$1(new P._DelayedData(data, t1._eval$1("_DelayedData<1>")));
},
_sendError$2: function(error, stackTrace) {
this.get$_subscription()._addPending$1(new P._DelayedError(error, stackTrace));
@@ -5092,95 +6060,37 @@
},
_onPause$0: function() {
var t1 = this._controller,
- t2 = H.getTypeArgumentByIndex(t1, 0);
- H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription");
+ t2 = H._instanceType(t1);
+ t2._eval$1("StreamSubscription<1>")._as(this);
if ((t1._state & 8) !== 0)
- C.JSNull_methods.pause$0(H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState"));
+ t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).pause$0(0);
P._runGuarded(t1.onPause);
},
_onResume$0: function() {
var t1 = this._controller,
- t2 = H.getTypeArgumentByIndex(t1, 0);
- H.assertSubtype(this, "$isStreamSubscription", [t2], "$asStreamSubscription");
+ t2 = H._instanceType(t1);
+ t2._eval$1("StreamSubscription<1>")._as(this);
if ((t1._state & 8) !== 0)
- H.assertSubtype(t1._varData, "$is_StreamControllerAddStreamState", [t2], "$as_StreamControllerAddStreamState").resume$0();
+ t2._eval$1("_StreamControllerAddStreamState<1>")._as(t1._varData).resume$0();
P._runGuarded(t1.onResume);
}
};
P._StreamSinkWrapper.prototype = {};
P._BufferingStreamSubscription.prototype = {
- _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) {
- var handleError, handleDone, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 0);
- H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]});
- _this.set$_onData(H.functionTypeCheck(onData, {func: 1, ret: null, args: [t1]}));
- handleError = onError == null ? P.async___nullErrorHandler$closure() : onError;
- if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]}))
- _this._onError = _this._zone.registerBinaryCallback$3$1(handleError, null, P.Object, P.StackTrace);
- else if (H.functionTypeTest(handleError, {func: 1, ret: -1, args: [P.Object]}))
- _this._onError = H.functionTypeCheck(handleError, {func: 1, ret: null, args: [P.Object]});
- else
- H.throwExpression(P.ArgumentError$("handleError callback must take either an Object (the error), or both an Object (the error) and a StackTrace."));
- H.functionTypeCheck(onDone, {func: 1, ret: -1});
- handleDone = onDone == null ? P.async___nullDoneHandler$closure() : onDone;
- _this.set$_onDone(H.functionTypeCheck(handleDone, {func: 1, ret: -1}));
- },
_setPendingEvents$1: function(pendingEvents) {
var _this = this;
- H.assertSubtype(pendingEvents, "$is_PendingEvents", _this.$ti, "$as_PendingEvents");
+ H._instanceType(_this)._eval$1("_PendingEvents<1>?")._as(pendingEvents);
if (pendingEvents == null)
return;
_this.set$_pending(pendingEvents);
if (pendingEvents.lastPendingEvent != null) {
- _this._state = (_this._state | 64) >>> 0;
- _this._pending.schedule$1(_this);
+ _this._state |= 64;
+ pendingEvents.schedule$1(_this);
}
},
- pause$0: function(_) {
- var t2, t3, _this = this,
- t1 = _this._state;
- if ((t1 & 8) !== 0)
- return;
- t2 = (t1 + 128 | 4) >>> 0;
- _this._state = t2;
- if (t1 < 128 && _this._pending != null) {
- t3 = _this._pending;
- if (t3._state === 1)
- t3._state = 3;
- }
- if ((t1 & 4) === 0 && (t2 & 32) === 0)
- _this._guardCallback$1(_this.get$_onPause());
- },
- resume$0: function() {
- var _this = this,
- t1 = _this._state;
- if ((t1 & 8) !== 0)
- return;
- if (t1 >= 128) {
- t1 = _this._state = t1 - 128;
- if (t1 < 128)
- if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent != null)
- _this._pending.schedule$1(_this);
- else {
- t1 = (t1 & 4294967291) >>> 0;
- _this._state = t1;
- if ((t1 & 32) === 0)
- _this._guardCallback$1(_this.get$_onResume());
- }
- }
- },
- cancel$0: function() {
- var _this = this,
- t1 = (_this._state & 4294967279) >>> 0;
- _this._state = t1;
- if ((t1 & 8) === 0)
- _this._cancel$0();
- t1 = _this._cancelFuture;
- return t1 == null ? $.$get$Future__nullFuture() : t1;
- },
_cancel$0: function() {
var t2, _this = this,
- t1 = _this._state = (_this._state | 8) >>> 0;
+ t1 = _this._state |= 8;
if ((t1 & 64) !== 0) {
t2 = _this._pending;
if (t2._state === 1)
@@ -5195,45 +6105,44 @@
_onResume$0: function() {
},
_onCancel$0: function() {
- return;
+ return null;
},
_addPending$1: function($event) {
var _this = this,
- t1 = _this.$ti,
- pending = H.assertSubtype(_this._pending, "$is_StreamImplEvents", t1, "$as_StreamImplEvents");
- if (pending == null) {
- pending = new P._StreamImplEvents(t1);
- _this.set$_pending(pending);
- }
+ t1 = H._instanceType(_this),
+ pending = t1._eval$1("_StreamImplEvents<1>?")._as(_this._pending);
+ if (pending == null)
+ pending = new P._StreamImplEvents(t1._eval$1("_StreamImplEvents<1>"));
+ _this.set$_pending(pending);
pending.add$1(0, $event);
t1 = _this._state;
if ((t1 & 64) === 0) {
- t1 = (t1 | 64) >>> 0;
+ t1 |= 64;
_this._state = t1;
if (t1 < 128)
- _this._pending.schedule$1(_this);
+ pending.schedule$1(_this);
}
},
_sendData$1: function(data) {
var t2, _this = this,
- t1 = H.getTypeArgumentByIndex(_this, 0);
- H.assertSubtypeOfRuntimeType(data, t1);
+ t1 = H._instanceType(_this)._precomputed1;
+ t1._as(data);
t2 = _this._state;
- _this._state = (t2 | 32) >>> 0;
+ _this._state = t2 | 32;
_this._zone.runUnaryGuarded$1$2(_this._onData, data, t1);
- _this._state = (_this._state & 4294967263) >>> 0;
+ _this._state &= 4294967263;
_this._checkState$1((t2 & 4) !== 0);
},
_sendError$2: function(error, stackTrace) {
- var _this = this,
+ var cancelFuture, _this = this,
t1 = _this._state,
t2 = new P._BufferingStreamSubscription__sendError_sendError(_this, error, stackTrace);
if ((t1 & 1) !== 0) {
- _this._state = (t1 | 16) >>> 0;
+ _this._state = t1 | 16;
_this._cancel$0();
- t1 = _this._cancelFuture;
- if (t1 != null && t1 !== $.$get$Future__nullFuture())
- t1.whenComplete$1(t2);
+ cancelFuture = _this._cancelFuture;
+ if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+ cancelFuture.whenComplete$1(t2);
else
t2.call$0();
} else {
@@ -5242,40 +6151,32 @@
}
},
_sendDone$0: function() {
- var t2, _this = this,
+ var cancelFuture, _this = this,
t1 = new P._BufferingStreamSubscription__sendDone_sendDone(_this);
_this._cancel$0();
- _this._state = (_this._state | 16) >>> 0;
- t2 = _this._cancelFuture;
- if (t2 != null && t2 !== $.$get$Future__nullFuture())
- t2.whenComplete$1(t1);
+ _this._state |= 16;
+ cancelFuture = _this._cancelFuture;
+ if (cancelFuture != null && cancelFuture !== $.$get$Future__nullFuture())
+ cancelFuture.whenComplete$1(t1);
else
t1.call$0();
},
- _guardCallback$1: function(callback) {
- var t1, _this = this;
- H.functionTypeCheck(callback, {func: 1, ret: -1});
- t1 = _this._state;
- _this._state = (t1 | 32) >>> 0;
- callback.call$0();
- _this._state = (_this._state & 4294967263) >>> 0;
- _this._checkState$1((t1 & 4) !== 0);
- },
_checkState$1: function(wasInputPaused) {
var t2, isInputPaused, _this = this,
t1 = _this._state;
if ((t1 & 64) !== 0 && _this._pending.lastPendingEvent == null) {
- t1 = _this._state = (t1 & 4294967231) >>> 0;
+ t1 = _this._state = t1 & 4294967231;
if ((t1 & 4) !== 0)
if (t1 < 128) {
t2 = _this._pending;
- t2 = t2 == null || t2.lastPendingEvent == null;
+ t2 = t2 == null ? null : t2.lastPendingEvent == null;
+ t2 = t2 !== false;
} else
t2 = false;
else
t2 = false;
if (t2) {
- t1 = (t1 & 4294967291) >>> 0;
+ t1 &= 4294967291;
_this._state = t1;
}
}
@@ -5287,25 +6188,18 @@
isInputPaused = (t1 & 4) !== 0;
if (wasInputPaused === isInputPaused)
break;
- _this._state = (t1 ^ 32) >>> 0;
+ _this._state = t1 ^ 32;
if (isInputPaused)
_this._onPause$0();
else
_this._onResume$0();
- t1 = (_this._state & 4294967263) >>> 0;
- _this._state = t1;
+ t1 = _this._state &= 4294967263;
}
if ((t1 & 64) !== 0 && t1 < 128)
_this._pending.schedule$1(_this);
},
- set$_onData: function(_onData) {
- this._onData = H.functionTypeCheck(_onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]});
- },
- set$_onDone: function(_onDone) {
- this._onDone = H.functionTypeCheck(_onDone, {func: 1, ret: -1});
- },
set$_pending: function(_pending) {
- this._pending = H.assertSubtype(_pending, "$is_PendingEvents", this.$ti, "$as_PendingEvents");
+ this._pending = H._instanceType(this)._eval$1("_PendingEvents<1>?")._as(_pending);
},
$isStreamSubscription: 1,
$is_EventDispatch: 1
@@ -5317,18 +6211,18 @@
t2 = t1._state;
if ((t2 & 8) !== 0 && (t2 & 16) === 0)
return;
- t1._state = (t2 | 32) >>> 0;
+ t1._state = t2 | 32;
onError = t1._onError;
t2 = this.error;
- t3 = P.Object;
+ t3 = type$.Object;
t4 = t1._zone;
- if (H.functionTypeTest(onError, {func: 1, ret: -1, args: [P.Object, P.StackTrace]}))
- t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, P.StackTrace);
+ if (type$.void_Function_Object_StackTrace._is(onError))
+ t4.runBinaryGuarded$2$3(onError, t2, this.stackTrace, t3, type$.StackTrace);
else
- t4.runUnaryGuarded$1$2(H.functionTypeCheck(t1._onError, {func: 1, ret: -1, args: [P.Object]}), t2, t3);
- t1._state = (t1._state & 4294967263) >>> 0;
+ t4.runUnaryGuarded$1$2(type$.void_Function_Object._as(onError), t2, t3);
+ t1._state &= 4294967263;
},
- $signature: 0
+ $signature: 1
};
P._BufferingStreamSubscription__sendDone_sendDone.prototype = {
call$0: function() {
@@ -5336,17 +6230,18 @@
t2 = t1._state;
if ((t2 & 16) === 0)
return;
- t1._state = (t2 | 42) >>> 0;
+ t1._state = t2 | 42;
t1._zone.runGuarded$1(t1._onDone);
- t1._state = (t1._state & 4294967263) >>> 0;
+ t1._state &= 4294967263;
},
- $signature: 0
+ $signature: 1
};
P._StreamImpl.prototype = {
listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
- H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]});
- H.functionTypeCheck(onDone, {func: 1, ret: -1});
- return this._controller._subscribe$4(H.functionTypeCheck(onData, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0)]}), onError, onDone, true === cancelOnError);
+ var t1 = this.$ti;
+ t1._eval$1("~(1)?")._as(onData);
+ type$.nullable_void_Function._as(onDone);
+ return this._controller._subscribe$4(t1._eval$1("~(1)?")._as(onData), onError, onDone, cancelOnError === true);
},
listen$1: function(onData) {
return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null);
@@ -5357,7 +6252,7 @@
};
P._DelayedEvent.prototype = {
set$next: function(next) {
- this.next = H.interceptedTypeCheck(next, "$is_DelayedEvent");
+ this.next = type$.nullable__DelayedEvent_dynamic._as(next);
},
get$next: function() {
return this.next;
@@ -5365,14 +6260,12 @@
};
P._DelayedData.prototype = {
perform$1: function(dispatch) {
- H.assertSubtype(dispatch, "$is_EventDispatch", this.$ti, "$as_EventDispatch")._sendData$1(this.value);
+ this.$ti._eval$1("_EventDispatch<1>")._as(dispatch)._sendData$1(this.value);
}
};
P._DelayedError.prototype = {
perform$1: function(dispatch) {
dispatch._sendError$2(this.error, this.stackTrace);
- },
- $as_DelayedEvent: function() {
}
};
P._DelayedDone.prototype = {
@@ -5380,19 +6273,17 @@
dispatch._sendDone$0();
},
get$next: function() {
- return;
+ return null;
},
set$next: function(_) {
throw H.wrapException(P.StateError$("No events after a done."));
},
- $is_DelayedEvent: 1,
- $as_DelayedEvent: function() {
- }
+ $is_DelayedEvent: 1
};
P._PendingEvents.prototype = {
schedule$1: function(dispatch) {
var t1, _this = this;
- H.assertSubtype(dispatch, "$is_EventDispatch", _this.$ti, "$as_EventDispatch");
+ _this.$ti._eval$1("_EventDispatch<1>")._as(dispatch);
t1 = _this._state;
if (t1 === 1)
return;
@@ -5406,211 +6297,137 @@
};
P._PendingEvents_schedule_closure.prototype = {
call$0: function() {
- var t2, $event, t3,
+ var t2, $event, nextEvent,
t1 = this.$this,
oldState = t1._state;
t1._state = 0;
if (oldState === 3)
return;
- t2 = H.assertSubtype(this.dispatch, "$is_EventDispatch", [H.getTypeArgumentByIndex(t1, 0)], "$as_EventDispatch");
+ t2 = t1.$ti._eval$1("_EventDispatch<1>")._as(this.dispatch);
$event = t1.firstPendingEvent;
- t3 = $event.get$next();
- t1.firstPendingEvent = t3;
- if (t3 == null)
+ nextEvent = $event.get$next();
+ t1.firstPendingEvent = nextEvent;
+ if (nextEvent == null)
t1.lastPendingEvent = null;
$event.perform$1(t2);
},
- $signature: 1
+ $signature: 0
};
P._StreamImplEvents.prototype = {
add$1: function(_, $event) {
var _this = this,
- t1 = _this.lastPendingEvent;
- if (t1 == null)
+ lastEvent = _this.lastPendingEvent;
+ if (lastEvent == null)
_this.firstPendingEvent = _this.lastPendingEvent = $event;
else {
- t1.set$next($event);
+ lastEvent.set$next($event);
_this.lastPendingEvent = $event;
}
}
};
- P._StreamIterator.prototype = {
- get$current: function() {
- var _this = this;
- if (_this._subscription != null && _this._isPaused)
- return H.assertSubtypeOfRuntimeType(_this._stateData, H.getTypeArgumentByIndex(_this, 0));
- return;
- },
- moveNext$0: function() {
- var future, _this = this,
- t1 = _this._subscription;
- if (t1 != null) {
- if (_this._isPaused) {
- future = new P._Future($.Zone__current, [P.bool]);
- _this._stateData = future;
- _this._isPaused = false;
- t1.resume$0();
- return future;
- }
- throw H.wrapException(P.StateError$("Already waiting for next."));
- }
- return _this._initializeOrDone$0();
- },
- _initializeOrDone$0: function() {
- var _this = this,
- stateData = _this._stateData;
- if (stateData != null) {
- _this._subscription = H.assertSubtype(stateData, "$isStream", _this.$ti, "$asStream").listen$4$cancelOnError$onDone$onError(_this.get$_onData(), true, _this.get$_onDone(), _this.get$_onError());
- return _this._stateData = new P._Future($.Zone__current, [P.bool]);
- }
- return $.$get$Future__falseFuture();
- },
- cancel$0: function() {
- var _this = this,
- subscription = H.assertSubtype(_this._subscription, "$isStreamSubscription", _this.$ti, "$asStreamSubscription"),
- stateData = _this._stateData;
- _this._stateData = null;
- if (subscription != null) {
- _this._subscription = null;
- if (!_this._isPaused)
- H.assertSubtype(stateData, "$is_Future", [P.bool], "$as_Future")._asyncComplete$1(false);
- return subscription.cancel$0();
- }
- return $.$get$Future__nullFuture();
- },
- _onData$1: function(data) {
- var moveNextFuture, t1, _this = this;
- H.assertSubtypeOfRuntimeType(data, H.getTypeArgumentByIndex(_this, 0));
- moveNextFuture = H.assertSubtype(_this._stateData, "$is_Future", [P.bool], "$as_Future");
- _this._stateData = data;
- _this._isPaused = true;
- moveNextFuture._complete$1(true);
- t1 = _this._subscription;
- if (t1 != null && _this._isPaused)
- t1.pause$0(0);
- },
- _onError$2: function(error, stackTrace) {
- var moveNextFuture;
- H.interceptedTypeCheck(stackTrace, "$isStackTrace");
- moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future");
- this._stateData = this._subscription = null;
- moveNextFuture._completeError$2(error, stackTrace);
- },
- _onError$1: function(error) {
- return this._onError$2(error, null);
- },
- _onDone$0: function() {
- var moveNextFuture = H.assertSubtype(this._stateData, "$is_Future", [P.bool], "$as_Future");
- this._stateData = this._subscription = null;
- moveNextFuture._complete$1(false);
- }
- };
+ P._StreamIterator.prototype = {};
P.AsyncError.prototype = {
toString$0: function(_) {
return H.S(this.error);
},
- $isError: 1
+ $isError: 1,
+ get$stackTrace: function() {
+ return this.stackTrace;
+ }
};
P._Zone.prototype = {$isZone: 1};
P._rootHandleUncaughtError_closure.prototype = {
call$0: function() {
- var error,
- t1 = this._box_0,
- t2 = t1.error;
- t1 = t2 == null ? t1.error = new P.NullThrownError() : t2;
- t2 = this.stackTrace;
- if (t2 == null)
- throw H.wrapException(t1);
- error = H.wrapException(t1);
- error.stack = t2.toString$0(0);
+ var error = H.wrapException(this.error);
+ error.stack = J.toString$0$(this.stackTrace);
throw error;
},
- $signature: 1
+ $signature: 0
};
P._RootZone.prototype = {
runGuarded$1: function(f) {
var e, s, exception, _null = null;
- H.functionTypeCheck(f, {func: 1, ret: -1});
+ type$.void_Function._as(f);
try {
if (C.C__RootZone === $.Zone__current) {
f.call$0();
return;
}
- P._rootRun(_null, _null, this, f, -1);
+ P._rootRun(_null, _null, this, f, type$.void);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
- P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace"));
+ P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
}
},
runUnaryGuarded$1$2: function(f, arg, $T) {
var e, s, exception, _null = null;
- H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]});
- H.assertSubtypeOfRuntimeType(arg, $T);
+ $T._eval$1("~(0)")._as(f);
+ $T._as(arg);
try {
if (C.C__RootZone === $.Zone__current) {
f.call$1(arg);
return;
}
- P._rootRunUnary(_null, _null, this, f, arg, -1, $T);
+ P._rootRunUnary(_null, _null, this, f, arg, type$.void, $T);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
- P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace"));
+ P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
}
},
runBinaryGuarded$2$3: function(f, arg1, arg2, T1, T2) {
var e, s, exception, _null = null;
- H.functionTypeCheck(f, {func: 1, ret: -1, args: [T1, T2]});
- H.assertSubtypeOfRuntimeType(arg1, T1);
- H.assertSubtypeOfRuntimeType(arg2, T2);
+ T1._eval$1("@<0>")._bind$1(T2)._eval$1("~(1,2)")._as(f);
+ T1._as(arg1);
+ T2._as(arg2);
try {
if (C.C__RootZone === $.Zone__current) {
f.call$2(arg1, arg2);
return;
}
- P._rootRunBinary(_null, _null, this, f, arg1, arg2, -1, T1, T2);
+ P._rootRunBinary(_null, _null, this, f, arg1, arg2, type$.void, T1, T2);
} catch (exception) {
e = H.unwrapException(exception);
s = H.getTraceFromException(exception);
- P._rootHandleUncaughtError(_null, _null, this, e, H.interceptedTypeCheck(s, "$isStackTrace"));
+ P._rootHandleUncaughtError(_null, _null, this, e, type$.StackTrace._as(s));
}
},
bindCallback$1$1: function(f, $R) {
- return new P._RootZone_bindCallback_closure(this, H.functionTypeCheck(f, {func: 1, ret: $R}), $R);
+ return new P._RootZone_bindCallback_closure(this, $R._eval$1("0()")._as(f), $R);
},
bindCallbackGuarded$1: function(f) {
- return new P._RootZone_bindCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1}));
+ return new P._RootZone_bindCallbackGuarded_closure(this, type$.void_Function._as(f));
},
bindUnaryCallbackGuarded$1$1: function(f, $T) {
- return new P._RootZone_bindUnaryCallbackGuarded_closure(this, H.functionTypeCheck(f, {func: 1, ret: -1, args: [$T]}), $T);
+ return new P._RootZone_bindUnaryCallbackGuarded_closure(this, $T._eval$1("~(0)")._as(f), $T);
},
$index: function(_, key) {
- return;
+ return null;
},
run$1$1: function(f, $R) {
- H.functionTypeCheck(f, {func: 1, ret: $R});
+ $R._eval$1("0()")._as(f);
if ($.Zone__current === C.C__RootZone)
return f.call$0();
return P._rootRun(null, null, this, f, $R);
},
runUnary$2$2: function(f, arg, $R, $T) {
- H.functionTypeCheck(f, {func: 1, ret: $R, args: [$T]});
- H.assertSubtypeOfRuntimeType(arg, $T);
+ $R._eval$1("@<0>")._bind$1($T)._eval$1("1(2)")._as(f);
+ $T._as(arg);
if ($.Zone__current === C.C__RootZone)
return f.call$1(arg);
return P._rootRunUnary(null, null, this, f, arg, $R, $T);
},
runBinary$3$3: function(f, arg1, arg2, $R, T1, T2) {
- H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]});
- H.assertSubtypeOfRuntimeType(arg1, T1);
- H.assertSubtypeOfRuntimeType(arg2, T2);
+ $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f);
+ T1._as(arg1);
+ T2._as(arg2);
if ($.Zone__current === C.C__RootZone)
return f.call$2(arg1, arg2);
return P._rootRunBinary(null, null, this, f, arg1, arg2, $R, T1, T2);
},
registerBinaryCallback$3$1: function(f, $R, T1, T2) {
- return H.functionTypeCheck(f, {func: 1, ret: $R, args: [T1, T2]});
+ return $R._eval$1("@<0>")._bind$1(T1)._bind$1(T2)._eval$1("1(2,3)")._as(f);
}
};
P._RootZone_bindCallback_closure.prototype = {
@@ -5618,27 +6435,27 @@
return this.$this.run$1$1(this.f, this.R);
},
$signature: function() {
- return {func: 1, ret: this.R};
+ return this.R._eval$1("0()");
}
};
P._RootZone_bindCallbackGuarded_closure.prototype = {
call$0: function() {
return this.$this.runGuarded$1(this.f);
},
- $signature: 0
+ $signature: 1
};
P._RootZone_bindUnaryCallbackGuarded_closure.prototype = {
call$1: function(arg) {
var t1 = this.T;
- return this.$this.runUnaryGuarded$1$2(this.f, H.assertSubtypeOfRuntimeType(arg, t1), t1);
+ return this.$this.runUnaryGuarded$1$2(this.f, t1._as(arg), t1);
},
$signature: function() {
- return {func: 1, ret: -1, args: [this.T]};
+ return this.T._eval$1("~(0)");
}
};
P.ListMixin.prototype = {
get$iterator: function(receiver) {
- return new H.ListIterator(receiver, this.get$length(receiver), [H.getRuntimeTypeArgumentIntercepted(this, receiver, "ListMixin", 0)]);
+ return new H.ListIterator(receiver, this.get$length(receiver), H.instanceType(receiver)._eval$1("ListIterator<ListMixin.E>"));
},
elementAt$1: function(receiver, index) {
return this.$index(receiver, index);
@@ -5647,14 +6464,17 @@
return this.get$length(receiver) !== 0;
},
$add: function(receiver, other) {
- var result, _this = this,
- t1 = [H.getRuntimeTypeArgumentIntercepted(_this, receiver, "ListMixin", 0)];
- H.assertSubtype(other, "$isList", t1, "$asList");
- result = H.setRuntimeTypeInfo([], t1);
- C.JSArray_methods.set$length(result, C.JSInt_methods.$add(_this.get$length(receiver), other.get$length(other)));
- C.JSArray_methods.setRange$3(result, 0, _this.get$length(receiver), receiver);
- C.JSArray_methods.setRange$3(result, _this.get$length(receiver), result.length, other);
- return result;
+ var t2, cur,
+ t1 = H.instanceType(receiver);
+ t1._eval$1("List<ListMixin.E>")._as(other);
+ t2 = H.setRuntimeTypeInfo([], t1._eval$1("JSArray<ListMixin.E>"));
+ for (t1 = new H.ListIterator(receiver, this.get$length(receiver), t1._eval$1("ListIterator<ListMixin.E>")); t1.moveNext$0();) {
+ cur = t1.__internal$_current;
+ C.JSArray_methods.add$1(t2, cur);
+ }
+ for (t1 = other.get$iterator(other); t1.moveNext$0();)
+ C.JSArray_methods.add$1(t2, t1.get$current());
+ return t2;
},
toString$0: function(receiver) {
return P.IterableBase_iterableToFullString(receiver, "[", "]");
@@ -5673,15 +6493,15 @@
t1._contents = t2 + ": ";
t1._contents += H.S(v);
},
- $signature: 5
+ $signature: 7
};
P.MapMixin.prototype = {
forEach$1: function(_, action) {
- var t1, key, _this = this;
- H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getRuntimeTypeArgument(_this, "MapMixin", 0), H.getRuntimeTypeArgument(_this, "MapMixin", 1)]});
- for (t1 = _this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
+ var t1, key;
+ H._instanceType(this)._eval$1("~(MapMixin.K,MapMixin.V)")._as(action);
+ for (t1 = this.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
key = t1.get$current();
- action.call$2(key, _this.$index(0, key));
+ action.call$2(key, this.$index(0, key));
}
},
get$length: function(_) {
@@ -5703,7 +6523,7 @@
return this._collection$_map.$index(0, key);
},
forEach$1: function(_, action) {
- this._collection$_map.forEach$1(0, H.functionTypeCheck(action, {func: 1, ret: -1, args: [H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)]}));
+ this._collection$_map.forEach$1(0, H._instanceType(this)._eval$1("~(1,2)")._as(action));
},
get$isEmpty: function(_) {
return this._collection$_map.__js_helper$_length === 0;
@@ -5724,8 +6544,8 @@
t1 = this._processed;
if (t1 == null)
return this._data.$index(0, key);
- else if (typeof key !== "string")
- return;
+ else if (typeof key != "string")
+ return null;
else {
result = t1[key];
return typeof result == "undefined" ? this._process$1(key) : result;
@@ -5740,13 +6560,13 @@
get$keys: function() {
if (this._processed == null) {
var t1 = this._data;
- return new H.LinkedHashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]);
+ return new H.LinkedHashMapKeyIterable(t1, H._instanceType(t1)._eval$1("LinkedHashMapKeyIterable<1>"));
}
return new P._JsonMapKeyIterable(this);
},
forEach$1: function(_, f) {
var keys, i, key, value, _this = this;
- H.functionTypeCheck(f, {func: 1, ret: -1, args: [P.String,,]});
+ type$.void_Function_String_dynamic._as(f);
if (_this._processed == null)
return _this._data.forEach$1(0, f);
keys = _this._computeKeys$0();
@@ -5763,23 +6583,17 @@
}
},
_computeKeys$0: function() {
- var keys = H.listTypeCheck(this._data);
+ var keys = type$.nullable_List_dynamic._as(this._data);
if (keys == null)
- keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), [P.String]);
+ keys = this._data = H.setRuntimeTypeInfo(Object.keys(this._original), type$.JSArray_String);
return keys;
},
_process$1: function(key) {
var result;
if (!Object.prototype.hasOwnProperty.call(this._original, key))
- return;
+ return null;
result = P._convertJsonToDartLazy(this._original[key]);
return this._processed[key] = result;
- },
- $asMapMixin: function() {
- return [P.String, null];
- },
- $asMap: function() {
- return [P.String, null];
}
};
P._JsonMapKeyIterable.prototype = {
@@ -5793,7 +6607,7 @@
t1 = t1.get$keys().elementAt$1(0, index);
else {
t1 = t1._computeKeys$0();
- if (index < 0 || index >= t1.length)
+ if (index >= t1.length)
return H.ioore(t1, index);
t1 = t1[index];
}
@@ -5806,15 +6620,9 @@
t1 = t1.get$iterator(t1);
} else {
t1 = t1._computeKeys$0();
- t1 = new J.ArrayIterator(t1, t1.length, [H.getTypeArgumentByIndex(t1, 0)]);
+ t1 = new J.ArrayIterator(t1, t1.length, H._arrayInstanceType(t1)._eval$1("ArrayIterator<1>"));
}
return t1;
- },
- $asListIterable: function() {
- return [P.String];
- },
- $asIterable: function() {
- return [P.String];
}
};
P.Codec.prototype = {};
@@ -5832,11 +6640,15 @@
};
P.JsonCodec.prototype = {
decode$2$reviver: function(_, source, reviver) {
- var t1 = P._parseJson(source, this.get$decoder()._reviver);
+ var t1;
+ type$.nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object._as(reviver);
+ t1 = P._parseJson(source, this.get$decoder()._reviver);
return t1;
},
encode$2$toEncodable: function(value, toEncodable) {
- var t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null);
+ var t1;
+ type$.nullable_nullable_Object_Function_dynamic._as(toEncodable);
+ t1 = P._JsonStringStringifier_stringify(value, this.get$encoder()._toEncodable, null);
return t1;
},
get$encoder: function() {
@@ -5844,29 +6656,49 @@
},
get$decoder: function() {
return C.JsonDecoder_null;
- },
- $asCodec: function() {
- return [P.Object, P.String];
}
};
- P.JsonEncoder.prototype = {
- $asConverter: function() {
- return [P.Object, P.String];
- }
- };
- P.JsonDecoder.prototype = {
- $asConverter: function() {
- return [P.String, P.Object];
- }
- };
+ P.JsonEncoder.prototype = {};
+ P.JsonDecoder.prototype = {};
P._JsonStringifier.prototype = {
writeStringContent$1: function(s) {
- var t1, t2, offset, i, charCode, t3,
+ var t1, t2, offset, i, charCode, t3, t4,
$length = s.length;
for (t1 = J.getInterceptor$s(s), t2 = this._sink, offset = 0, i = 0; i < $length; ++i) {
charCode = t1._codeUnitAt$1(s, i);
- if (charCode > 92)
+ if (charCode > 92) {
+ if (charCode >= 55296) {
+ t3 = charCode & 64512;
+ if (t3 === 55296) {
+ t4 = i + 1;
+ t4 = !(t4 < $length && (C.JSString_methods._codeUnitAt$1(s, t4) & 64512) === 56320);
+ } else
+ t4 = false;
+ if (!t4)
+ if (t3 === 56320) {
+ t3 = i - 1;
+ t3 = !(t3 >= 0 && (C.JSString_methods.codeUnitAt$1(s, t3) & 64512) === 55296);
+ } else
+ t3 = false;
+ else
+ t3 = true;
+ if (t3) {
+ if (i > offset)
+ t2._contents += C.JSString_methods.substring$2(s, offset, i);
+ offset = i + 1;
+ t2._contents += H.Primitives_stringFromCharCode(92);
+ t2._contents += H.Primitives_stringFromCharCode(117);
+ t2._contents += H.Primitives_stringFromCharCode(100);
+ t3 = charCode >>> 8 & 15;
+ t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+ t3 = charCode >>> 4 & 15;
+ t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+ t3 = charCode & 15;
+ t2._contents += H.Primitives_stringFromCharCode(t3 < 10 ? 48 + t3 : 87 + t3);
+ }
+ }
continue;
+ }
if (charCode < 32) {
if (i > offset)
t2._contents += C.JSString_methods.substring$2(s, offset, i);
@@ -5943,7 +6775,7 @@
},
writeJsonValue$1: function(object) {
var t1, success, _this = this;
- if (typeof object === "number") {
+ if (typeof object == "number") {
if (!isFinite(object))
return false;
_this._sink._contents += C.JSNumber_methods.toString$0(object);
@@ -5957,33 +6789,30 @@
} else if (object == null) {
_this._sink._contents += "null";
return true;
- } else if (typeof object === "string") {
+ } else if (typeof object == "string") {
t1 = _this._sink;
t1._contents += '"';
_this.writeStringContent$1(object);
t1._contents += '"';
return true;
- } else {
- t1 = J.getInterceptor$(object);
- if (!!t1.$isList) {
- _this._checkCycle$1(object);
- _this.writeList$1(object);
- t1 = _this._seen;
- if (0 >= t1.length)
- return H.ioore(t1, -1);
- t1.pop();
- return true;
- } else if (!!t1.$isMap) {
- _this._checkCycle$1(object);
- success = _this.writeMap$1(object);
- t1 = _this._seen;
- if (0 >= t1.length)
- return H.ioore(t1, -1);
- t1.pop();
- return success;
- } else
- return false;
- }
+ } else if (type$.List_dynamic._is(object)) {
+ _this._checkCycle$1(object);
+ _this.writeList$1(object);
+ t1 = _this._seen;
+ if (0 >= t1.length)
+ return H.ioore(t1, -1);
+ t1.pop();
+ return true;
+ } else if (type$.Map_dynamic_dynamic._is(object)) {
+ _this._checkCycle$1(object);
+ success = _this.writeMap$1(object);
+ t1 = _this._seen;
+ if (0 >= t1.length)
+ return H.ioore(t1, -1);
+ t1.pop();
+ return success;
+ } else
+ return false;
},
writeList$1: function(list) {
var t2, i,
@@ -6000,45 +6829,43 @@
t1._contents += "]";
},
writeMap$1: function(map) {
- var t1, keyValueList, i, t2, separator, t3, _this = this, _box_0 = {};
+ var keyValueList, i, t1, separator, t2, _this = this, _box_0 = {};
if (map.get$isEmpty(map)) {
_this._sink._contents += "{}";
return true;
}
- t1 = map.get$length(map) * 2;
- keyValueList = new Array(t1);
- keyValueList.fixed$length = Array;
+ keyValueList = P.List_List$filled(map.get$length(map) * 2, null, type$.nullable_Object);
i = _box_0.i = 0;
_box_0.allStringKeys = true;
map.forEach$1(0, new P._JsonStringifier_writeMap_closure(_box_0, keyValueList));
if (!_box_0.allStringKeys)
return false;
- t2 = _this._sink;
- t2._contents += "{";
- for (separator = '"'; i < t1; i += 2, separator = ',"') {
- t2._contents += separator;
- _this.writeStringContent$1(H.stringTypeCheck(keyValueList[i]));
- t2._contents += '":';
- t3 = i + 1;
- if (t3 >= t1)
- return H.ioore(keyValueList, t3);
- _this.writeObject$1(keyValueList[t3]);
+ t1 = _this._sink;
+ t1._contents += "{";
+ for (separator = '"'; i < keyValueList.length; i += 2, separator = ',"') {
+ t1._contents += separator;
+ _this.writeStringContent$1(H._asStringS(keyValueList[i]));
+ t1._contents += '":';
+ t2 = i + 1;
+ if (t2 >= keyValueList.length)
+ return H.ioore(keyValueList, t2);
+ _this.writeObject$1(keyValueList[t2]);
}
- t2._contents += "}";
+ t1._contents += "}";
return true;
}
};
P._JsonStringifier_writeMap_closure.prototype = {
call$2: function(key, value) {
var t1, t2;
- if (typeof key !== "string")
+ if (typeof key != "string")
this._box_0.allStringKeys = false;
t1 = this.keyValueList;
t2 = this._box_0;
C.JSArray_methods.$indexSet(t1, t2.i++, key);
C.JSArray_methods.$indexSet(t1, t2.i++, value);
},
- $signature: 5
+ $signature: 7
};
P._JsonStringStringifier.prototype = {
get$_partialResult: function() {
@@ -6048,14 +6875,14 @@
};
P._symbolMapToStringMap_closure.prototype = {
call$2: function(key, value) {
- this.result.$indexSet(0, H.interceptedTypeCheck(key, "$isSymbol").__internal$_name, value);
+ this.result.$indexSet(0, type$.Symbol._as(key).__internal$_name, value);
},
$signature: 8
};
P.NoSuchMethodError_toString_closure.prototype = {
call$2: function(key, value) {
var t1, t2, t3;
- H.interceptedTypeCheck(key, "$isSymbol");
+ type$.Symbol._as(key);
t1 = this.sb;
t2 = this._box_0;
t1._contents += t2.comma;
@@ -6066,7 +6893,6 @@
},
$signature: 8
};
- P.bool.prototype = {};
P.DateTime.prototype = {
$eq: function(_, other) {
if (other == null)
@@ -6092,22 +6918,21 @@
return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms;
}
};
- P.double.prototype = {};
P.Duration.prototype = {
$add: function(_, other) {
- return new P.Duration(C.JSInt_methods.$add(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration));
+ return new P.Duration(C.JSInt_methods.$add(this._duration, type$.Duration._as(other).get$_duration()));
},
$sub: function(_, other) {
- return new P.Duration(C.JSInt_methods.$sub(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration));
+ return new P.Duration(C.JSInt_methods.$sub(this._duration, type$.Duration._as(other).get$_duration()));
},
$lt: function(_, other) {
- return C.JSInt_methods.$lt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration);
+ return C.JSInt_methods.$lt(this._duration, type$.Duration._as(other).get$_duration());
},
$gt: function(_, other) {
- return C.JSInt_methods.$gt(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration);
+ return C.JSInt_methods.$gt(this._duration, type$.Duration._as(other).get$_duration());
},
$ge: function(_, other) {
- return C.JSInt_methods.$ge(this._duration, H.interceptedTypeCheck(other, "$isDuration")._duration);
+ return C.JSInt_methods.$ge(this._duration, type$.Duration._as(other).get$_duration());
},
$eq: function(_, other) {
if (other == null)
@@ -6153,12 +6978,20 @@
},
$signature: 9
};
- P.Error.prototype = {};
+ P.Error.prototype = {
+ get$stackTrace: function() {
+ return H.getTraceFromException(this.$thrownJsError);
+ }
+ };
P.AssertionError.prototype = {
toString$0: function(_) {
+ var t1 = this.message;
+ if (t1 != null)
+ return "Assertion failed: " + P.Error_safeToString(t1);
return "Assertion failed";
}
};
+ P.TypeError.prototype = {};
P.NullThrownError.prototype = {
toString$0: function(_) {
return "Throw of null.";
@@ -6172,12 +7005,12 @@
return "";
},
toString$0: function(_) {
- var message, prefix, explanation, errorValue, _this = this,
- t1 = _this.name,
- nameString = t1 != null ? " (" + t1 + ")" : "";
- t1 = _this.message;
- message = t1 == null ? "" : ": " + t1;
- prefix = _this.get$_errorName() + nameString + message;
+ var explanation, errorValue, _this = this,
+ $name = _this.name,
+ nameString = $name == null ? "" : " (" + $name + ")",
+ message = _this.message,
+ messageString = message == null ? "" : ": " + message,
+ prefix = _this.get$_errorName() + nameString + messageString;
if (!_this._hasValue)
return prefix;
explanation = _this.get$_errorExplanation();
@@ -6190,20 +7023,17 @@
return "RangeError";
},
get$_errorExplanation: function() {
- var explanation, t2,
- t1 = this.start;
- if (t1 == null) {
- t1 = this.end;
- explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : "";
- } else {
- t2 = this.end;
- if (t2 == null)
- explanation = ": Not greater than or equal to " + H.S(t1);
- else if (t2 > t1)
- explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", inclusive";
- else
- explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + H.S(t1);
- }
+ var explanation,
+ start = this.start,
+ end = this.end;
+ if (start == null)
+ explanation = end != null ? ": Not less than or equal to " + H.S(end) : "";
+ else if (end == null)
+ explanation = ": Not greater than or equal to " + H.S(start);
+ else if (end > start)
+ explanation = ": Not in inclusive range " + H.S(start) + ".." + H.S(end);
+ else
+ explanation = end < start ? ": Valid value range is empty" : ": Only valid value is " + H.S(start);
return explanation;
}
};
@@ -6213,7 +7043,7 @@
},
get$_errorExplanation: function() {
var t1,
- invalidValue = H.intTypeCheck(this.invalidValue);
+ invalidValue = H._asIntS(this.invalidValue);
if (typeof invalidValue !== "number")
return invalidValue.$lt();
if (invalidValue < 0)
@@ -6229,13 +7059,14 @@
};
P.NoSuchMethodError.prototype = {
toString$0: function(_) {
- var t1, t2, _i, t3, t4, argument, receiverText, actualParameters, _this = this, _box_0 = {},
+ var $arguments, t1, _i, t2, t3, argument, receiverText, actualParameters, _this = this, _box_0 = {},
sb = new P.StringBuffer("");
_box_0.comma = "";
- for (t1 = _this._core$_arguments, t2 = t1.length, _i = 0, t3 = "", t4 = ""; _i < t2; ++_i, t4 = ", ") {
- argument = t1[_i];
- sb._contents = t3 + t4;
- t3 = sb._contents += P.Error_safeToString(argument);
+ $arguments = _this._core$_arguments;
+ for (t1 = $arguments.length, _i = 0, t2 = "", t3 = ""; _i < t1; ++_i, t3 = ", ") {
+ argument = $arguments[_i];
+ sb._contents = t2 + t3;
+ t2 = sb._contents += P.Error_safeToString(argument);
_box_0.comma = ", ";
}
_this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(_box_0, sb));
@@ -6252,8 +7083,8 @@
};
P.UnimplementedError.prototype = {
toString$0: function(_) {
- var t1 = this.message;
- return t1 != null ? "UnimplementedError: " + t1 : "UnimplementedError";
+ var message = this.message;
+ return message != null ? "UnimplementedError: " + message : "UnimplementedError";
}
};
P.StateError.prototype = {
@@ -6273,18 +7104,24 @@
toString$0: function(_) {
return "Out of Memory";
},
+ get$stackTrace: function() {
+ return null;
+ },
$isError: 1
};
P.StackOverflowError.prototype = {
toString$0: function(_) {
return "Stack Overflow";
},
+ get$stackTrace: function() {
+ return null;
+ },
$isError: 1
};
P.CyclicInitializationError.prototype = {
toString$0: function(_) {
- var t1 = this.variableName;
- return t1 == null ? "Reading static variable during its initialization" : "Reading static variable '" + t1 + "' during its initialization";
+ var variableName = this.variableName;
+ return variableName == null ? "Reading static variable during its initialization" : "Reading static variable '" + variableName + "' during its initialization";
}
};
P._Exception.prototype = {
@@ -6294,13 +7131,12 @@
};
P.FormatException.prototype = {
toString$0: function(_) {
- var t1 = this.message,
- report = "" !== t1 ? "FormatException: " + t1 : "FormatException",
+ var message = this.message,
+ report = message != null && "" !== message ? "FormatException: " + H.S(message) : "FormatException",
offset = this.offset;
return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report;
}
};
- P.int.prototype = {};
P.Iterable.prototype = {
get$length: function(_) {
var count,
@@ -6311,7 +7147,6 @@
},
elementAt$1: function(_, index) {
var t1, elementIndex, element;
- P.RangeError_checkNotNegative(index, "index");
for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) {
element = t1.get$current();
if (index === elementIndex)
@@ -6324,16 +7159,14 @@
return P.IterableBase_iterableToShortString(this, "(", ")");
}
};
- P.List.prototype = {$isIterable: 1};
P.Null.prototype = {
get$hashCode: function(_) {
- return P.Object.prototype.get$hashCode.call(this, this);
+ return P.Object.prototype.get$hashCode.call(C.JSNull_methods, this);
},
toString$0: function(_) {
return "null";
}
};
- P.num.prototype = {};
P.Object.prototype = {constructor: P.Object, $isObject: 1,
$eq: function(_, other) {
return this === other;
@@ -6345,15 +7178,19 @@
return "Instance of '" + H.S(H.Primitives_objectTypeName(this)) + "'";
},
noSuchMethod$1: function(_, invocation) {
- H.interceptedTypeCheck(invocation, "$isInvocation");
+ type$.Invocation._as(invocation);
throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments()));
},
toString: function() {
return this.toString$0(this);
}
};
- P.StackTrace.prototype = {};
- P.String.prototype = {$isPattern: 1};
+ P._StringStackTrace.prototype = {
+ toString$0: function(_) {
+ return "";
+ },
+ $isStackTrace: 1
+ };
P.StringBuffer.prototype = {
get$length: function(_) {
return this._contents.length;
@@ -6364,7 +7201,6 @@
},
$isStringSink: 1
};
- P.Symbol.prototype = {};
W.HtmlElement.prototype = {};
W.AnchorElement.prototype = {
toString$0: function(receiver) {
@@ -6386,7 +7222,7 @@
return receiver.localName;
},
get$onClick: function(receiver) {
- return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]);
+ return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent);
},
$isElement: 1
};
@@ -6394,7 +7230,7 @@
W.EventSource.prototype = {$isEventSource: 1};
W.EventTarget.prototype = {
addEventListener$3: function(receiver, type, listener, useCapture) {
- H.functionTypeCheck(listener, {func: 1, args: [W.Event]});
+ type$.nullable_dynamic_Function_Event._as(listener);
if (listener != null)
this._addEventListener$3(receiver, type, listener, useCapture);
},
@@ -6402,10 +7238,7 @@
return this.addEventListener$3($receiver, type, listener, null);
},
_addEventListener$3: function(receiver, type, listener, options) {
- return receiver.addEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), options);
- },
- _removeEventListener$3: function(receiver, type, listener, options) {
- return receiver.removeEventListener(type, H.convertDartClosureToJS(H.functionTypeCheck(listener, {func: 1, args: [W.Event]}), 1), false);
+ return receiver.addEventListener(type, H.convertDartClosureToJS(type$.nullable_dynamic_Function_Event._as(listener), 1), options);
},
$isEventTarget: 1
};
@@ -6418,16 +7251,18 @@
open$3$async: function(receiver, method, url, async) {
return receiver.open(method, url, true);
},
+ set$withCredentials: function(receiver, value) {
+ receiver.withCredentials = true;
+ },
$isHttpRequest: 1
};
W.HttpRequest_request_closure.prototype = {
call$1: function(e) {
var t1, t2, accepted, unknownRedirect, t3;
- H.interceptedTypeCheck(e, "$isProgressEvent");
+ type$.ProgressEvent._as(e);
t1 = this.xhr;
t2 = t1.status;
- if (typeof t2 !== "number")
- return t2.$ge();
+ t2.toString;
accepted = t2 >= 200 && t2 < 300;
unknownRedirect = t2 > 307 && t2 < 400;
t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect;
@@ -6455,63 +7290,20 @@
}
};
W.UIEvent.prototype = {};
+ W.EventStreamProvider.prototype = {};
W._EventStream.prototype = {
listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
- var t1 = H.getTypeArgumentByIndex(this, 0);
- H.functionTypeCheck(onData, {func: 1, ret: -1, args: [t1]});
- H.functionTypeCheck(onDone, {func: 1, ret: -1});
- return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1);
+ var t1 = H._instanceType(this);
+ t1._eval$1("~(1)?")._as(onData);
+ type$.nullable_void_Function._as(onDone);
+ return W._EventStreamSubscription$(this._target, this._eventType, onData, false, t1._precomputed1);
}
};
W._ElementEventStreamImpl.prototype = {};
- W._EventStreamSubscription.prototype = {
- cancel$0: function() {
- var _this = this;
- if (_this._target == null)
- return;
- _this._unlisten$0();
- _this._target = null;
- _this.set$_html$_onData(null);
- return;
- },
- pause$0: function(_) {
- if (this._target == null)
- return;
- ++this._pauseCount;
- this._unlisten$0();
- },
- resume$0: function() {
- var _this = this;
- if (_this._target == null || _this._pauseCount <= 0)
- return;
- --_this._pauseCount;
- _this._tryResume$0();
- },
- _tryResume$0: function() {
- var _this = this,
- t1 = _this._html$_onData;
- if (t1 != null && _this._pauseCount <= 0)
- J.addEventListener$3$x(_this._target, _this._eventType, t1, false);
- },
- _unlisten$0: function() {
- var t3,
- t1 = this._html$_onData,
- t2 = t1 != null;
- if (t2) {
- t3 = this._target;
- t3.toString;
- H.functionTypeCheck(t1, {func: 1, args: [W.Event]});
- if (t2)
- J._removeEventListener$3$x(t3, this._eventType, t1, false);
- }
- },
- set$_html$_onData: function(_onData) {
- this._html$_onData = H.functionTypeCheck(_onData, {func: 1, args: [W.Event]});
- }
- };
+ W._EventStreamSubscription.prototype = {};
W._EventStreamSubscription_closure.prototype = {
call$1: function(e) {
- return this.onData.call$1(H.interceptedTypeCheck(e, "$isEvent"));
+ return this.onData.call$1(type$.Event._as(e));
},
$signature: 22
};
@@ -6528,14 +7320,14 @@
return $length;
},
walk$1: function(e) {
- var millisSinceEpoch, t1, proto, slot, copy, l, t2, $length, i, _this = this, _box_0 = {};
+ var millisSinceEpoch, t1, proto, slot, copy, t2, l, $length, i, _this = this, _box_0 = {};
if (e == null)
return e;
- if (typeof e === "boolean")
+ if (H._isBool(e))
return e;
- if (typeof e === "number")
+ if (typeof e == "number")
return e;
- if (typeof e === "string")
+ if (typeof e == "string")
return e;
if (e instanceof Date) {
millisSinceEpoch = e.getTime();
@@ -6545,12 +7337,13 @@
t1 = true;
if (t1)
H.throwExpression(P.ArgumentError$("DateTime is outside valid range: " + millisSinceEpoch));
+ P.ArgumentError_checkNotNull(true, "isUtc", type$.bool);
return new P.DateTime(millisSinceEpoch, true);
}
if (e instanceof RegExp)
throw H.wrapException(P.UnimplementedError$("structured clone of RegExp"));
if (typeof Promise != "undefined" && e instanceof Promise)
- return P.promiseToFuture(e, null);
+ return P.promiseToFuture(e, type$.dynamic);
proto = Object.getPrototypeOf(e);
if (proto === Object.prototype || proto === null) {
slot = _this.findSlot$1(e);
@@ -6560,7 +7353,8 @@
copy = _box_0.copy = t1[slot];
if (copy != null)
return copy;
- copy = P.LinkedHashMap__makeEmpty();
+ t2 = type$.dynamic;
+ copy = P.LinkedHashMap_LinkedHashMap$_empty(t2, t2);
_box_0.copy = copy;
C.JSArray_methods.$indexSet(t1, slot, copy);
_this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(_box_0, _this));
@@ -6603,12 +7397,12 @@
call$2: function(key, value) {
this.object[key] = value;
},
- $signature: 5
+ $signature: 24
};
P._AcceptStructuredCloneDart2Js.prototype = {
forEachJsField$2: function(object, action) {
var t1, t2, _i, key;
- H.functionTypeCheck(action, {func: 1, args: [,,]});
+ type$.dynamic_Function_dynamic_dynamic._as(action);
for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
key = t1[_i];
action.call$2(key, object[key]);
@@ -6617,7 +7411,7 @@
};
P.promiseToFuture_closure.prototype = {
call$1: function(r) {
- return this.completer.complete$1(0, H.futureOrCheck(r, {futureOr: 1, type: this.T}));
+ return this.completer.complete$1(0, this.T._eval$1("0/?")._as(r));
},
$signature: 2
};
@@ -6634,83 +7428,32 @@
};
P.SvgElement.prototype = {
get$onClick: function(receiver) {
- return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]);
+ return new W._ElementEventStreamImpl(receiver, "click", false, type$._ElementEventStreamImpl_legacy_MouseEvent);
}
};
N.HexCodec.prototype = {
get$encoder: function() {
return C.C_HexEncoder;
- },
- $asCodec: function() {
- return [[P.List, P.int], P.String];
}
};
R.HexEncoder.prototype = {
convert$1: function(bytes) {
- H.assertSubtype(bytes, "$isList", [P.int], "$asList");
+ type$.legacy_List_legacy_int._as(bytes);
return R._convert(bytes, 0, bytes.length);
- },
- $asConverter: function() {
- return [[P.List, P.int], P.String];
}
};
- N.Logger.prototype = {
- get$fullName: function() {
- var t1 = this.parent,
- t2 = t1 == null || t1.name === "",
- t3 = this.name;
- return t2 ? t3 : t1.get$fullName() + "." + t3;
- },
- get$level: function() {
- return C.Level_INFO_800;
- },
- log$4: function(logLevel, message, error, stackTrace) {
- var t1 = logLevel.value;
- if (t1 >= this.get$level().value) {
- if (t1 >= 2000) {
- P.StackTrace_current();
- logLevel.toString$0(0);
- }
- t1 = this.get$fullName();
- Date.now();
- $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1;
- $.$get$Logger_root()._publish$1(new N.LogRecord(logLevel, message, t1));
- }
- },
- _publish$1: function(record) {
- }
- };
- N.Logger_Logger_closure.prototype = {
- call$0: function() {
- var dot, $parent, t1,
- thisName = this.name;
- if (C.JSString_methods.startsWith$1(thisName, "."))
- H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'"));
- dot = C.JSString_methods.lastIndexOf$1(thisName, ".");
- if (dot === -1)
- $parent = thisName !== "" ? N.Logger_Logger("") : null;
- else {
- $parent = N.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot));
- thisName = C.JSString_methods.substring$1(thisName, dot + 1);
- }
- t1 = new N.Logger(thisName, $parent, new H.JsLinkedHashMap([P.String, N.Logger]));
- if ($parent != null)
- $parent._children.$indexSet(0, thisName, t1);
- return t1;
- },
- $signature: 24
- };
- N.Level.prototype = {
+ Y.Level.prototype = {
$eq: function(_, other) {
if (other == null)
return false;
- return other instanceof N.Level && this.value === other.value;
+ return other instanceof Y.Level && this.value === other.value;
},
$gt: function(_, other) {
- return C.JSInt_methods.$gt(this.value, H.interceptedTypeCheck(other, "$isLevel").value);
+ type$.legacy_Level._as(other);
+ return C.JSInt_methods.$gt(this.value, other.get$value(other));
},
$ge: function(_, other) {
- return this.value >= H.interceptedTypeCheck(other, "$isLevel").value;
+ return this.value >= type$.legacy_Level._as(other).value;
},
get$hashCode: function(_) {
return this.value;
@@ -6719,26 +7462,88 @@
return this.name;
}
};
- N.LogRecord.prototype = {
+ L.LogRecord.prototype = {
toString$0: function(_) {
- return "[" + this.level.name + "] " + this.loggerName + ": " + H.S(this.message);
+ return "[" + this.level.name + "] " + this.loggerName + ": " + this.message;
}
};
+ F.Logger.prototype = {
+ get$fullName: function() {
+ var t1 = this.parent,
+ t2 = t1 == null || t1.name === "",
+ t3 = this.name;
+ return t2 ? t3 : t1.get$fullName() + "." + t3;
+ },
+ get$level: function() {
+ var effectiveLevel, t1;
+ if (this.parent == null)
+ effectiveLevel = this._level;
+ else {
+ t1 = $.$get$Logger_root();
+ effectiveLevel = t1._level;
+ }
+ return effectiveLevel;
+ },
+ log$4: function(logLevel, message, error, stackTrace) {
+ var record, _this = this,
+ t1 = logLevel.value;
+ if (t1 >= _this.get$level().value) {
+ if (t1 >= 2000) {
+ P.StackTrace_current();
+ logLevel.toString$0(0);
+ }
+ t1 = _this.get$fullName();
+ Date.now();
+ $.LogRecord__nextNumber = $.LogRecord__nextNumber + 1;
+ record = new L.LogRecord(logLevel, message, t1);
+ if (_this.parent == null)
+ _this._publish$1(record);
+ else
+ $.$get$Logger_root()._publish$1(record);
+ }
+ },
+ _publish$1: function(record) {
+ }
+ };
+ F.Logger_Logger_closure.prototype = {
+ call$0: function() {
+ var dot, $parent, t1,
+ thisName = this.name;
+ if (C.JSString_methods.startsWith$1(thisName, "."))
+ H.throwExpression(P.ArgumentError$("name shouldn't start with a '.'"));
+ dot = C.JSString_methods.lastIndexOf$1(thisName, ".");
+ if (dot === -1)
+ $parent = thisName !== "" ? F.Logger_Logger("") : null;
+ else {
+ $parent = F.Logger_Logger(C.JSString_methods.substring$2(thisName, 0, dot));
+ thisName = C.JSString_methods.substring$1(thisName, dot + 1);
+ }
+ t1 = new F.Logger(thisName, $parent, P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger));
+ if ($parent == null)
+ t1._level = C.Level_INFO_800;
+ else
+ $parent._children.$indexSet(0, thisName, t1);
+ return t1;
+ },
+ $signature: 25
+ };
M.SseClient.prototype = {
SseClient$1: function(serverUrl) {
- var t1, t2, _this = this,
- clientId = F.Uuid$().v1$0();
- _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], P.String, null));
+ var t1, t2, t3, t4, _this = this,
+ clientId = K.Uuid$().v1$0();
+ _this._eventSource = W.EventSource__factoryEventSource(serverUrl + "?sseClientId=" + clientId, P.LinkedHashMap_LinkedHashMap$_literal(["withCredentials", true], type$.String, type$.dynamic));
_this._serverUrl = serverUrl + "?sseClientId=" + clientId;
t1 = _this._outgoingController;
- new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone());
+ new P._ControllerStream(t1, H._instanceType(t1)._eval$1("_ControllerStream<1>")).listen$2$onDone(_this.get$_onOutgoingMessage(), _this.get$_onOutgoingDone());
C.EventSource_methods.addEventListener$2(_this._eventSource, "message", _this.get$_onIncomingMessage());
C.EventSource_methods.addEventListener$2(_this._eventSource, "control", _this.get$_onIncomingControlMessage());
- t1 = W.Event;
- t2 = {func: 1, ret: -1, args: [t1]};
- W._EventStreamSubscription$(_this._eventSource, "open", H.functionTypeCheck(new M.SseClient_closure(_this), t2), false, t1);
- W._EventStreamSubscription$(_this._eventSource, "error", H.functionTypeCheck(new M.SseClient_closure0(_this), t2), false, t1);
- _this._startPostingMessages$0();
+ t1 = _this._eventSource;
+ t2 = type$.nullable_void_Function_legacy_Event;
+ t3 = t2._as(new M.SseClient_closure(_this));
+ type$.nullable_void_Function._as(null);
+ t4 = type$.legacy_Event;
+ W._EventStreamSubscription$(t1, "open", t3, false, t4);
+ W._EventStreamSubscription$(_this._eventSource, "error", t2._as(new M.SseClient_closure0(_this)), false, t4);
},
close$0: function(_) {
this._eventSource.close();
@@ -6746,41 +7551,26 @@
this._outgoingController.close$0(0);
},
_onIncomingControlMessage$1: function(message) {
- var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true);
+ var data = new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true);
if (J.$eq$(data, "close"))
this.close$0(0);
else
throw H.wrapException(P.UnsupportedError$('Illegal Control Message "' + H.S(data) + '"'));
},
_onIncomingMessage$1: function(message) {
- this._incomingController.add$1(0, H.stringTypeCast(C.C_JsonCodec.decode$2$reviver(0, H.stringTypeCast(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(H.interceptedTypeCast(H.interceptedTypeCheck(message, "$isEvent"), "$isMessageEvent").data, true)), null)));
+ this._incomingController.add$1(0, H._asStringS(C.C_JsonCodec.decode$2$reviver(0, H._asStringS(new P._AcceptStructuredCloneDart2Js([], []).convertNativeToDart_AcceptStructuredClone$2$mustCopy(type$.legacy_MessageEvent._as(type$.legacy_Event._as(message)).data, true)), null)));
},
_onOutgoingDone$0: function() {
this.close$0(0);
},
_onOutgoingMessage$1: function(message) {
- var $async$goto = 0,
- $async$completer = P._makeAsyncAwaitCompleter(null),
- $async$self = this;
- var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
- if ($async$errorCode === 1)
- return P._asyncRethrow($async$result, $async$completer);
- while (true)
- switch ($async$goto) {
- case 0:
- // Function start
- $async$self._messages.add$1(0, message);
- // implicit return
- return P._asyncReturn(null, $async$completer);
- }
- });
- return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer);
+ return this._onOutgoingMessage$body$SseClient(H._asStringS(message));
},
- _startPostingMessages$0: function() {
+ _onOutgoingMessage$body$SseClient: function(message) {
var $async$goto = 0,
- $async$completer = P._makeAsyncAwaitCompleter(null),
- $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, message, e, e0, t2, exception, t3, t4, t1, $async$exception, $async$temp1;
- var $async$_startPostingMessages$0 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
+ $async$completer = P._makeAsyncAwaitCompleter(type$.dynamic),
+ $async$handler = 1, $async$currentError, $async$next = [], $async$self = this, e, e0, e1, exception, t1, encodedMessage, $async$exception;
+ var $async$_onOutgoingMessage$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
if ($async$errorCode === 1) {
$async$currentError = $async$result;
$async$goto = $async$handler;
@@ -6789,79 +7579,46 @@
switch ($async$goto) {
case 0:
// Function start
- t1 = $async$self._messages;
- t1 = new P._StreamIterator(new P._ControllerStream(t1, [H.getTypeArgumentByIndex(t1, 0)]), [null]);
- $async$handler = 2;
- t2 = $async$self._logger;
- case 5:
- // for condition
- $async$temp1 = H;
- $async$goto = 7;
- return P._asyncAwait(t1.moveNext$0(), $async$_startPostingMessages$0);
- case 7:
- // returning from await.
- if (!$async$temp1.boolConversionCheck($async$result)) {
- // goto after for
- $async$goto = 6;
- break;
+ encodedMessage = null;
+ try {
+ encodedMessage = C.C_JsonCodec.encode$2$toEncodable(message, null);
+ } catch (exception) {
+ t1 = H.unwrapException(exception);
+ if (t1 instanceof P.JsonUnsupportedObjectError) {
+ e = t1;
+ $async$self._logger.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null);
+ } else if (t1 instanceof P.ArgumentError) {
+ e0 = t1;
+ $async$self._logger.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null);
+ } else
+ throw exception;
}
- message = t1.get$current();
- $async$handler = 9;
- $async$goto = 12;
- return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl, "POST", C.C_JsonCodec.encode$2$toEncodable(message, null), true), $async$_startPostingMessages$0);
- case 12:
+ $async$handler = 3;
+ $async$goto = 6;
+ return P._asyncAwait(W.HttpRequest_request($async$self._serverUrl + "&messageId=" + ++$async$self._lastMessageId, "POST", encodedMessage, true), $async$_onOutgoingMessage$1);
+ case 6:
// returning from await.
- $async$handler = 2;
+ $async$handler = 1;
// goto after finally
- $async$goto = 11;
- break;
- case 9:
- // catch
- $async$handler = 8;
- $async$exception = $async$currentError;
- t3 = H.unwrapException($async$exception);
- t4 = J.getInterceptor$(t3);
- if (!!t4.$isJsonUnsupportedObjectError) {
- e = t3;
- t2.log$4(C.Level_WARNING_900, "Unable to encode outgoing message: " + H.S(e), null, null);
- } else if (!!t4.$isArgumentError) {
- e0 = t3;
- t2.log$4(C.Level_WARNING_900, "Invalid argument: " + H.S(e0), null, null);
- } else
- throw $async$exception;
- // goto after finally
- $async$goto = 11;
- break;
- case 8:
- // uncaught
- // goto uncaught
- $async$goto = 2;
- break;
- case 11:
- // after finally
- // goto for condition
$async$goto = 5;
break;
- case 6:
- // after for
- $async$next.push(4);
- // goto finally
- $async$goto = 3;
+ case 3:
+ // catch
+ $async$handler = 2;
+ $async$exception = $async$currentError;
+ e1 = H.unwrapException($async$exception);
+ t1 = "Failed to send " + H.S(message) + ":\n " + H.S(e1);
+ $async$self._logger.log$4(C.Level_SEVERE_1000, t1, null, null);
+ $async$self.close$0(0);
+ // goto after finally
+ $async$goto = 5;
break;
case 2:
// uncaught
- $async$next = [1];
- case 3:
- // finally
- $async$handler = 1;
- $async$goto = 13;
- return P._asyncAwait(t1.cancel$0(), $async$_startPostingMessages$0);
- case 13:
- // returning from await.
- // goto the next finally handler
- $async$goto = $async$next.pop();
+ // goto rethrow
+ $async$goto = 1;
break;
- case 4:
+ case 5:
// after finally
// implicit return
return P._asyncReturn(null, $async$completer);
@@ -6870,7 +7627,7 @@
return P._asyncRethrow($async$currentError, $async$completer);
}
});
- return P._asyncStartSync($async$_startPostingMessages$0, $async$completer);
+ return P._asyncStartSync($async$_onOutgoingMessage$1, $async$completer);
}
};
M.SseClient_closure.prototype = {
@@ -6893,25 +7650,25 @@
};
M.SseClient__closure.prototype = {
call$0: function() {
- var t3,
+ var stackTrace, t3,
t1 = this.$this,
t2 = t1._incomingController,
error = this.error;
+ P.ArgumentError_checkNotNull(error, "error", type$.Object);
if (t2._state >= 4)
H.throwExpression(t2._badEventState$0());
- if (error == null)
- error = new P.NullThrownError();
+ stackTrace = P.AsyncError_defaultStackTrace(error);
t3 = t2._state;
if ((t3 & 1) !== 0)
- t2._sendError$2(error, null);
+ t2._sendError$2(error, stackTrace);
else if ((t3 & 3) === 0)
- t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, null));
- t1._eventSource.close();
+ t2._ensurePendingEvents$0().add$1(0, new P._DelayedError(error, stackTrace));
+ t1.close$0(0);
},
- $signature: 1
+ $signature: 0
};
R.StreamChannelMixin.prototype = {};
- F.Uuid.prototype = {
+ K.Uuid.prototype = {
Uuid$1$options: function(_box_0) {
var t1, t2, i, hex, t3, v1PositionalArgs, v1NamedArgs, _this = this,
_s19_ = "v1rngPositionalArgs",
@@ -6920,29 +7677,27 @@
_s13_ = "grngNamedArgs",
options = _box_0.options;
if (!(options != null))
- options = new H.JsLinkedHashMap([P.String, null]);
+ options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic);
_box_0.options = options;
t1 = new Array(256);
t1.fixed$length = Array;
- t2 = P.String;
- _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, [t2]));
- t1 = P.int;
- _this.set$_hexToByte(new H.JsLinkedHashMap([t2, t1]));
- for (t1 = [t1], t2 = [P.List, P.int], i = 0; i < 256; ++i) {
+ _this.set$_byteToHex(H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_String));
+ _this.set$_hexToByte(new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_legacy_int));
+ for (t1 = type$.JSArray_legacy_int, t2 = type$.HexCodec._eval$1("Codec.S"), i = 0; i < 256; ++i) {
hex = H.setRuntimeTypeInfo([], t1);
C.JSArray_methods.add$1(hex, i);
t3 = _this._byteToHex;
- H.assertSubtypeOfRuntimeType(hex, t2);
+ t2._as(hex);
(t3 && C.JSArray_methods).$indexSet(t3, i, C.C_HexCodec.get$encoder().convert$1(hex));
_this._hexToByte.$indexSet(0, _this._byteToHex[i], i);
}
v1PositionalArgs = _box_0.options.$index(0, _s19_) != null ? _box_0.options.$index(0, _s19_) : [];
- v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? H.subtypeCast(_box_0.options.$index(0, _s14_), "$isMap", [P.Symbol, null], "$asMap") : C.Map_empty;
- _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(H.interceptedTypeCheck(_box_0.options.$index(0, "v1rng"), "$isFunction"), H.listTypeCheck(v1PositionalArgs), v1NamedArgs) : U.UuidUtil_mathRNG();
+ v1NamedArgs = _box_0.options.$index(0, _s14_) != null ? type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s14_)) : C.Map_empty;
+ _this._seedBytes = _box_0.options.$index(0, "v1rng") != null ? P.Function_apply(type$.Function._as(_box_0.options.$index(0, "v1rng")), type$.nullable_List_dynamic._as(v1PositionalArgs), v1NamedArgs) : T.UuidUtil_mathRNG();
if (_box_0.options.$index(0, _s18_) != null)
_box_0.options.$index(0, _s18_);
if (_box_0.options.$index(0, _s13_) != null)
- H.subtypeCast(_box_0.options.$index(0, _s13_), "$isMap", [P.Symbol, null], "$asMap");
+ type$.legacy_Map_of_legacy_Symbol_and_dynamic._as(_box_0.options.$index(0, _s13_));
_this._nodeId = [J.$or$bn(J.$index$asx(_this._seedBytes, 0), 1), J.$index$asx(_this._seedBytes, 1), J.$index$asx(_this._seedBytes, 2), J.$index$asx(_this._seedBytes, 3), J.$index$asx(_this._seedBytes, 4), J.$index$asx(_this._seedBytes, 5)];
t1 = J.$shl$n(J.$index$asx(_this._seedBytes, 6), 8);
t2 = J.$index$asx(_this._seedBytes, 7);
@@ -6951,29 +7706,28 @@
_this._clockSeq = (t1 | t2) & 262143;
},
v1$0: function() {
- var t2, buf, options, clockSeq, mSecs, nSecs, dt, t3, tl, tmh, node, n, _this = this,
+ var buf, options, clockSeq, mSecs, nSecs, dt, t2, tl, tmh, node, n, _this = this,
_s8_ = "clockSeq",
_s5_ = "nSecs",
t1 = new Array(16);
t1.fixed$length = Array;
- t2 = P.int;
- buf = H.setRuntimeTypeInfo(t1, [t2]);
- options = new H.JsLinkedHashMap([P.String, null]);
+ buf = H.setRuntimeTypeInfo(t1, type$.JSArray_legacy_int);
+ options = new H.JsLinkedHashMap(type$.JsLinkedHashMap_of_legacy_String_and_dynamic);
clockSeq = options.$index(0, _s8_) != null ? options.$index(0, _s8_) : _this._clockSeq;
mSecs = options.$index(0, "mSecs") != null ? options.$index(0, "mSecs") : Date.now();
nSecs = options.$index(0, _s5_) != null ? options.$index(0, _s5_) : _this._lastNSecs + 1;
t1 = J.getInterceptor$n(mSecs);
dt = J.$add$ansx(t1.$sub(mSecs, _this._lastMSecs), J.$div$n(J.$sub$n(nSecs, _this._lastNSecs), 10000));
- t3 = J.getInterceptor$n(dt);
- if (t3.$lt(dt, 0) && options.$index(0, _s8_) == null)
+ t2 = J.getInterceptor$n(dt);
+ if (t2.$lt(dt, 0) && options.$index(0, _s8_) == null)
clockSeq = J.$and$bn(J.$add$ansx(clockSeq, 1), 16383);
- if ((t3.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null)
+ if ((t2.$lt(dt, 0) || t1.$gt(mSecs, _this._lastMSecs)) && options.$index(0, _s5_) == null)
nSecs = 0;
if (J.$ge$n(nSecs, 10000))
throw H.wrapException(P.Exception_Exception("uuid.v1(): Can't create more than 10M uuids/sec"));
- H.intTypeCheck(mSecs);
+ H._asIntS(mSecs);
_this._lastMSecs = mSecs;
- H.intTypeCheck(nSecs);
+ H._asIntS(nSecs);
_this._lastNSecs = nSecs;
_this._clockSeq = clockSeq;
mSecs += 122192928e5;
@@ -6989,11 +7743,11 @@
C.JSArray_methods.$indexSet(buf, 7, tmh >>> 16 & 255);
t1 = J.getInterceptor$n(clockSeq);
C.JSArray_methods.$indexSet(buf, 8, (t1.$shr(clockSeq, 8) | 128) >>> 0);
- C.JSArray_methods.$indexSet(buf, 9, H.intTypeCheck(t1.$and(clockSeq, 255)));
+ C.JSArray_methods.$indexSet(buf, 9, H._asIntS(t1.$and(clockSeq, 255)));
node = options.$index(0, "node") != null ? options.$index(0, "node") : _this._nodeId;
for (t1 = J.getInterceptor$asx(node), n = 0; n < 6; ++n)
- C.JSArray_methods.$indexSet(buf, 10 + n, H.intTypeCheck(t1.$index(node, n)));
- H.assertSubtype(buf, "$isList", [t2], "$asList");
+ C.JSArray_methods.$indexSet(buf, 10 + n, H._asIntS(t1.$index(node, n)));
+ type$.legacy_List_legacy_int._as(buf);
t1 = _this._byteToHex;
t1 = H.S((t1 && C.JSArray_methods).$index(t1, buf[0]));
t2 = _this._byteToHex;
@@ -7028,25 +7782,50 @@
return t1 + H.S((t2 && C.JSArray_methods).$index(t2, buf[15]));
},
set$_byteToHex: function(_byteToHex) {
- this._byteToHex = H.assertSubtype(_byteToHex, "$isList", [P.String], "$asList");
+ this._byteToHex = type$.legacy_List_legacy_String._as(_byteToHex);
},
set$_hexToByte: function(_hexToByte) {
- this._hexToByte = H.assertSubtype(_hexToByte, "$isMap", [P.String, P.int], "$asMap");
+ this._hexToByte = type$.legacy_Map_of_legacy_String_and_legacy_int._as(_hexToByte);
}
};
E.main_closure.prototype = {
call$1: function(_) {
- H.interceptedTypeCheck(_, "$isMouseEvent");
+ type$.legacy_MouseEvent._as(_);
this.channel._outgoingController.close$0(0);
},
- $signature: 25
+ $signature: 27
};
E.main_closure0.prototype = {
call$1: function(s) {
- var t1 = this.channel._outgoingController;
- t1.add$1(0, H.assertSubtypeOfRuntimeType(H.stringTypeCheck(s), H.getTypeArgumentByIndex(t1, 0)));
+ var count, t1, t2, t3, i, t4, t5, lastEvent;
+ H._asStringS(s);
+ if (J.startsWith$1$s(s, "send ")) {
+ count = P.int_parse(C.JSArray_methods.get$last(s.split(" ")));
+ for (t1 = this.channel._outgoingController, t2 = H._instanceType(t1), t3 = t2._precomputed1, t2 = t2._eval$1("_DelayedData<1>"), i = 0; i < count; ++i) {
+ t4 = t3._as("" + i);
+ if (t1._state >= 4)
+ H.throwExpression(t1._badEventState$0());
+ t5 = t1._state;
+ if ((t5 & 1) !== 0)
+ t1._sendData$1(t4);
+ else if ((t5 & 3) === 0) {
+ t5 = t1._ensurePendingEvents$0();
+ t4 = new P._DelayedData(t4, t2);
+ lastEvent = t5.lastPendingEvent;
+ if (lastEvent == null)
+ t5.firstPendingEvent = t5.lastPendingEvent = t4;
+ else {
+ lastEvent.set$next(t4);
+ t5.lastPendingEvent = t4;
+ }
+ }
+ }
+ } else {
+ t1 = this.channel._outgoingController;
+ t1.add$1(0, H._instanceType(t1)._precomputed1._as(s));
+ }
},
- $signature: 26
+ $signature: 28
};
(function aliases() {
var _ = J.Interceptor.prototype;
@@ -7058,56 +7837,45 @@
(function installTearOffs() {
var _static_1 = hunkHelpers._static_1,
_static_0 = hunkHelpers._static_0,
- _static = hunkHelpers.installStaticTearOff,
+ _static_2 = hunkHelpers._static_2,
_instance = hunkHelpers.installInstanceTearOff,
- _instance_0_u = hunkHelpers._instance_0u,
- _instance_1_u = hunkHelpers._instance_1u;
- _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 6);
- _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 6);
- _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 6);
- _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0);
- _static(P, "async___nullErrorHandler$closure", 1, null, ["call$2", "call$1"], ["_nullErrorHandler", function(error) {
- return P._nullErrorHandler(error, null);
- }], 3, 0);
- _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 0);
- _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 3, 0);
- _instance(P._Future.prototype, "get$_completeError", 0, 1, function() {
- return [null];
- }, ["call$2", "call$1"], ["_completeError$2", "_completeError$1"], 3, 0);
- var _;
- _instance_0_u(_ = P._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0);
- _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
- _instance_0_u(_ = P._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0);
- _instance_0_u(_, "get$_onResume", "_onResume$0", 0);
- _instance_1_u(_ = P._StreamIterator.prototype, "get$_onData", "_onData$1", 20);
- _instance(_, "get$_onError", 0, 1, function() {
- return [null];
- }, ["call$2", "call$1"], ["_onError$2", "_onError$1"], 3, 0);
- _instance_0_u(_, "get$_onDone", "_onDone$0", 0);
+ _instance_2_u = hunkHelpers._instance_2u,
+ _instance_1_u = hunkHelpers._instance_1u,
+ _instance_0_u = hunkHelpers._instance_0u;
+ _static_1(P, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 3);
+ _static_1(P, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 3);
+ _static_1(P, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 3);
+ _static_0(P, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 1);
+ _static_2(P, "async___nullErrorHandler$closure", "_nullErrorHandler", 6);
+ _static_0(P, "async___nullDoneHandler$closure", "_nullDoneHandler", 1);
+ _instance(P._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 18, 0);
+ _instance_2_u(P._Future.prototype, "get$_completeError", "_completeError$2", 6);
_static_1(P, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4);
+ var _;
_instance_1_u(_ = M.SseClient.prototype, "get$_onIncomingControlMessage", "_onIncomingControlMessage$1", 10);
_instance_1_u(_, "get$_onIncomingMessage", "_onIncomingMessage$1", 10);
- _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 0);
- _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 2);
+ _instance_0_u(_, "get$_onOutgoingDone", "_onOutgoingDone$0", 1);
+ _instance_1_u(_, "get$_onOutgoingMessage", "_onOutgoingMessage$1", 26);
})();
(function inheritance() {
var _mixin = hunkHelpers.mixin,
_inherit = hunkHelpers.inherit,
_inheritMany = hunkHelpers.inheritMany;
_inherit(P.Object, null);
- _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol0, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, P.Error, H.ExceptionAndStackTrace, H._StackTrace, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.bool, P.DateTime, P.num, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.List, P.Null, P.StackTrace, P.String, P.StringBuffer, P.Symbol, P._AcceptStructuredClone, P._JSRandom, N.Logger, N.Level, N.LogRecord, R.StreamChannelMixin, F.Uuid]);
+ _inheritMany(P.Object, [H.JS_CONST, J.Interceptor, J.ArrayIterator, P.Error, P.Iterable, H.ListIterator, H.FixedLengthListMixin, H.Symbol, P.MapView, H.ConstantMap, H.JSInvocationMirror, H.Closure, H.TypeErrorDecoder, H.NullThrownFromJavaScriptException, H.ExceptionAndStackTrace, H._StackTrace, H._Required, P.MapMixin, H.LinkedHashMapCell, H.LinkedHashMapKeyIterator, H.Rti, H._FunctionParameters, P._TimerImpl, P._AsyncAwaitCompleter, P._Completer, P._FutureListener, P._Future, P._AsyncCallbackEntry, P.Stream, P.StreamSubscription, P.StreamTransformerBase, P._StreamController, P._AsyncStreamControllerDispatch, P._BufferingStreamSubscription, P._StreamSinkWrapper, P._DelayedEvent, P._DelayedDone, P._PendingEvents, P._StreamIterator, P.AsyncError, P._Zone, P.ListMixin, P._UnmodifiableMapMixin, P.Codec, P._JsonStringifier, P.DateTime, P.Duration, P.OutOfMemoryError, P.StackOverflowError, P._Exception, P.FormatException, P.Null, P._StringStackTrace, P.StringBuffer, W.EventStreamProvider, P._AcceptStructuredClone, P._JSRandom, Y.Level, L.LogRecord, F.Logger, R.StreamChannelMixin, K.Uuid]);
_inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JSArray, J.JSNumber, J.JSString, H.NativeTypedData, W.EventTarget, W.DomException, W.Event]);
_inheritMany(J.JavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]);
_inherit(J.JSUnmodifiableArray, J.JSArray);
_inheritMany(J.JSNumber, [J.JSInt, J.JSDouble]);
+ _inheritMany(P.Error, [H.LateInitializationErrorImpl, P.TypeError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.RuntimeError, P.AssertionError, H._Error, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]);
_inherit(H.EfficientLengthIterable, P.Iterable);
_inheritMany(H.EfficientLengthIterable, [H.ListIterable, H.LinkedHashMapKeyIterable]);
_inherit(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P.MapView);
_inherit(P.UnmodifiableMapView, P._UnmodifiableMapView_MapView__UnmodifiableMapMixin);
_inherit(H.ConstantMapView, P.UnmodifiableMapView);
_inherit(H.ConstantStringMap, H.ConstantMap);
- _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.unwrapException_saveStackTrace, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncComplete_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, N.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]);
- _inheritMany(P.Error, [H.NullError, H.JsNoSuchMethodError, H.UnknownJsTypeError, H.TypeErrorImplementation, H.CastErrorImplementation, H.RuntimeError, P.AssertionError, P.JsonUnsupportedObjectError, P.NullThrownError, P.ArgumentError, P.NoSuchMethodError, P.UnsupportedError, P.UnimplementedError, P.StateError, P.ConcurrentModificationError, P.CyclicInitializationError]);
+ _inheritMany(H.Closure, [H.Primitives_functionNoSuchMethod_closure, H.TearOffClosure, H.initHooks_closure, H.initHooks_closure0, H.initHooks_closure1, P._AsyncRun__initializeScheduleImmediate_internalCallback, P._AsyncRun__initializeScheduleImmediate_closure, P._AsyncRun__scheduleImmediateJsOverride_internalCallback, P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, P._TimerImpl_internalCallback, P._awaitOnObject_closure, P._awaitOnObject_closure0, P._wrapJsFunctionForAsync_closure, P._Future__addListener_closure, P._Future__prependListeners_closure, P._Future__chainForeignFuture_closure, P._Future__chainForeignFuture_closure0, P._Future__chainForeignFuture_closure1, P._Future__asyncCompleteWithValue_closure, P._Future__chainFuture_closure, P._Future__asyncCompleteError_closure, P._Future__propagateToListeners_handleWhenCompleteCallback, P._Future__propagateToListeners_handleWhenCompleteCallback_closure, P._Future__propagateToListeners_handleValueCallback, P._Future__propagateToListeners_handleError, P.Stream_length_closure, P.Stream_length_closure0, P._StreamController__subscribe_closure, P._StreamController__recordCancel_complete, P._BufferingStreamSubscription__sendError_sendError, P._BufferingStreamSubscription__sendDone_sendDone, P._PendingEvents_schedule_closure, P._rootHandleUncaughtError_closure, P._RootZone_bindCallback_closure, P._RootZone_bindCallbackGuarded_closure, P._RootZone_bindUnaryCallbackGuarded_closure, P.MapBase_mapToString_closure, P._JsonStringifier_writeMap_closure, P._symbolMapToStringMap_closure, P.NoSuchMethodError_toString_closure, P.Duration_toString_sixDigits, P.Duration_toString_twoDigits, W.HttpRequest_request_closure, W._EventStreamSubscription_closure, P._AcceptStructuredClone_walk_closure, P.convertDartToNative_Dictionary_closure, P.promiseToFuture_closure, P.promiseToFuture_closure0, F.Logger_Logger_closure, M.SseClient_closure, M.SseClient_closure0, M.SseClient__closure, E.main_closure, E.main_closure0]);
+ _inherit(H.NullError, P.TypeError);
_inheritMany(H.TearOffClosure, [H.StaticClosure, H.BoundClosure]);
_inherit(H._AssertionError, P.AssertionError);
_inherit(P.MapBase, P.MapMixin);
@@ -7119,6 +7887,7 @@
_inherit(H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin);
_inherit(H.NativeTypedArrayOfInt, H._NativeTypedArrayOfInt_NativeTypedArray_ListMixin_FixedLengthListMixin);
_inheritMany(H.NativeTypedArrayOfInt, [H.NativeInt16List, H.NativeInt32List, H.NativeInt8List, H.NativeUint16List, H.NativeUint32List, H.NativeUint8ClampedList, H.NativeUint8List]);
+ _inherit(H._TypeError, H._Error);
_inherit(P._AsyncCompleter, P._Completer);
_inherit(P._AsyncStreamController, P._StreamController);
_inheritMany(P.Stream, [P._StreamImpl, W._EventStream]);
@@ -7133,7 +7902,6 @@
_inheritMany(P.Codec, [P.JsonCodec, N.HexCodec]);
_inheritMany(P.Converter, [P.JsonEncoder, P.JsonDecoder, R.HexEncoder]);
_inherit(P._JsonStringStringifier, P._JsonStringifier);
- _inheritMany(P.num, [P.double, P.int]);
_inheritMany(P.ArgumentError, [P.RangeError, P.IndexError]);
_inheritMany(W.EventTarget, [W.Node, W.EventSource, W.HttpRequestEventTarget]);
_inherit(W.Element, W.Node);
@@ -7153,7 +7921,103 @@
_mixin(P._AsyncStreamController, P._AsyncStreamControllerDispatch);
_mixin(P._UnmodifiableMapView_MapView__UnmodifiableMapMixin, P._UnmodifiableMapMixin);
})();
- var init = {mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"}, mangledNames: {}, getTypeFromName: getGlobalFromName, metadata: [], types: [{func: 1, ret: -1}, {func: 1, ret: P.Null}, {func: 1, ret: -1, args: [,]}, {func: 1, ret: -1, args: [P.Object], opt: [P.StackTrace]}, {func: 1, args: [,]}, {func: 1, ret: P.Null, args: [,,]}, {func: 1, ret: -1, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [,]}, {func: 1, ret: P.Null, args: [P.Symbol,,]}, {func: 1, ret: P.String, args: [P.int]}, {func: 1, ret: -1, args: [W.Event]}, {func: 1, ret: P.Null, args: [W.Event]}, {func: 1, ret: P.Null, args: [P.String,,]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String]}, {func: 1, ret: P.Null, args: [{func: 1, ret: -1}]}, {func: 1, ret: P.Null, args: [, P.StackTrace]}, {func: 1, ret: P.Null, args: [P.int,,]}, {func: 1, ret: P.Null, args: [,], opt: [P.StackTrace]}, {func: 1, ret: [P._Future,,], args: [,]}, {func: 1, ret: -1, args: [P.Object]}, {func: 1, ret: P.Null, args: [W.ProgressEvent]}, {func: 1, args: [W.Event]}, {func: 1, args: [,,]}, {func: 1, ret: N.Logger}, {func: 1, ret: P.Null, args: [W.MouseEvent]}, {func: 1, ret: P.Null, args: [P.String]}], interceptorsByTag: null, leafTags: null};
+ var init = {
+ typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []},
+ mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List"},
+ mangledNames: {},
+ getTypeFromName: getGlobalFromName,
+ metadata: [],
+ types: ["Null()", "~()", "~(@)", "~(~())", "@(@)", "Null(@)", "~(Object,StackTrace)", "Null(Object?,Object?)", "Null(Symbol0,@)", "String(int)", "~(Event*)", "Null(Event*)", "Null(String,@)", "@(@,String)", "@(String)", "Null(~())", "Null(@,StackTrace)", "Null(int,@)", "~(Object[StackTrace?])", "Null(Object,StackTrace)", "_Future<@>(@)", "Null(ProgressEvent)", "@(Event)", "@(@,@)", "Null(@,@)", "Logger*()", "~(String*)", "Null(MouseEvent*)", "Null(String*)"],
+ interceptorsByTag: null,
+ leafTags: null,
+ arrayRti: typeof Symbol == "function" && typeof Symbol() == "symbol" ? Symbol("$ti") : "$ti"
+ };
+ H._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"JavaScriptObject","PlainJavaScriptObject":"JavaScriptObject","UnknownJavaScriptObject":"JavaScriptObject","AbortPaymentEvent":"Event","ExtendableEvent":"Event","AElement":"SvgElement","GraphicsElement":"SvgElement","_ResourceProgressEvent":"ProgressEvent","AudioElement":"HtmlElement","MediaElement":"HtmlElement","PointerEvent":"MouseEvent","CompositionEvent":"UIEvent","MessagePort":"EventTarget","HtmlDocument":"Node","Document":"Node","NativeFloat32List":"NativeTypedArrayOfDouble","JSBool":{"bool":[]},"JSNull":{"Null":[]},"JavaScriptObject":{"Function":[]},"JSArray":{"List":["1"],"Iterable":["1"]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"Iterable":["1"]},"JSNumber":{"double":[],"num":[]},"JSInt":{"double":[],"int":[],"num":[]},"JSDouble":{"double":[],"num":[]},"JSString":{"String":[],"Pattern":[]},"LateInitializationErrorImpl":{"Error":[]},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"Iterable":["1"]},"Symbol":{"Symbol0":[]},"ConstantMapView":{"UnmodifiableMapView":["1","2"],"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"JSInvocationMirror":{"Invocation":[]},"NullError":{"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"TearOffClosure":{"Function":[]},"StaticClosure":{"Function":[]},"BoundClosure":{"Function":[]},"RuntimeError":{"Error":[]},"_AssertionError":{"Error":[]},"JsLinkedHashMap":{"MapMixin":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapMixin.K":"1","MapMixin.V":"2"},"LinkedHashMapKeyIterable":{"Iterable":["1"]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"]},"NativeTypedArrayOfDouble":{"ListMixin":["double"],"JavaScriptIndexingBehavior":["double"],"List":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"ListMixin.E":"double"},"NativeTypedArrayOfInt":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeInt16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeInt8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint16List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint32List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8ClampedList":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"NativeUint8List":{"ListMixin":["int"],"JavaScriptIndexingBehavior":["int"],"List":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"ListMixin.E":"int"},"_Error":{"Error":[]},"_TypeError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncCompleter":{"_Completer":["1"]},"_Future":{"Future":["1"]},"_StreamController":{"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"_StreamControllerLifecycle":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"]},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventDispatch":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventDispatch":["1"]},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_StreamImplEvents":{"_PendingEvents":["1"]},"AsyncError":{"Error":[]},"_Zone":{"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"MapBase":{"MapMixin":["1","2"],"Map":["1","2"]},"MapMixin":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"_JsonMap":{"MapMixin":["String","@"],"Map":["String","@"],"MapMixin.K":"String","MapMixin.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"Iterable":["String"],"ListIterable.E":"String"},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"]},"double":{"num":[]},"int":{"num":[]},"List":{"Iterable":["1"]},"String":{"Pattern":[]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"NullThrownError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"NoSuchMethodError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"CyclicInitializationError":{"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"HtmlElement":{"Element":[],"EventTarget":[]},"AnchorElement":{"Element":[],"EventTarget":[]},"AreaElement":{"Element":[],"EventTarget":[]},"Element":{"EventTarget":[]},"EventSource":{"EventTarget":[]},"FormElement":{"Element":[],"EventTarget":[]},"HttpRequest":{"EventTarget":[]},"HttpRequestEventTarget":{"EventTarget":[]},"MessageEvent":{"Event":[]},"MouseEvent":{"Event":[]},"Node":{"EventTarget":[]},"ProgressEvent":{"Event":[]},"SelectElement":{"Element":[],"EventTarget":[]},"UIEvent":{"Event":[]},"_EventStream":{"Stream":["1"]},"_ElementEventStreamImpl":{"_EventStream":["1"],"Stream":["1"]},"_EventStreamSubscription":{"StreamSubscription":["1"]},"SvgElement":{"Element":[],"EventTarget":[]},"HexCodec":{"Codec":["List<int*>*","String*"],"Codec.S":"List<int*>*"},"HexEncoder":{"Converter":["List<int*>*","String*"]}}'));
+ H._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"EfficientLengthIterable":1,"NativeTypedArray":1,"StreamTransformerBase":2,"MapBase":2,"StreamChannelMixin":1}'));
+ 0;
+ var type$ = (function rtii() {
+ var findType = H.findType;
+ return {
+ $env_1_1_void: findType("@<~>"),
+ AsyncError: findType("AsyncError"),
+ ConstantMapView_Symbol_dynamic: findType("ConstantMapView<Symbol0,@>"),
+ Duration: findType("Duration"),
+ Error: findType("Error"),
+ Event: findType("Event"),
+ Function: findType("Function"),
+ Future_dynamic: findType("Future<@>"),
+ Future_void: findType("Future<~>"),
+ HexCodec: findType("HexCodec"),
+ Invocation: findType("Invocation"),
+ Iterable_dynamic: findType("Iterable<@>"),
+ JSArray_String: findType("JSArray<String>"),
+ JSArray_dynamic: findType("JSArray<@>"),
+ JSArray_legacy_String: findType("JSArray<String*>"),
+ JSArray_legacy_int: findType("JSArray<int*>"),
+ JSNull: findType("JSNull"),
+ JavaScriptFunction: findType("JavaScriptFunction"),
+ JavaScriptIndexingBehavior_dynamic: findType("JavaScriptIndexingBehavior<@>"),
+ JsLinkedHashMap_String_dynamic: findType("JsLinkedHashMap<String,@>"),
+ JsLinkedHashMap_Symbol_dynamic: findType("JsLinkedHashMap<Symbol0,@>"),
+ JsLinkedHashMap_of_legacy_String_and_dynamic: findType("JsLinkedHashMap<String*,@>"),
+ JsLinkedHashMap_of_legacy_String_and_legacy_int: findType("JsLinkedHashMap<String*,int*>"),
+ List_dynamic: findType("List<@>"),
+ Map_dynamic_dynamic: findType("Map<@,@>"),
+ Null: findType("Null"),
+ Object: findType("Object"),
+ ProgressEvent: findType("ProgressEvent"),
+ StackTrace: findType("StackTrace"),
+ String: findType("String"),
+ Symbol: findType("Symbol0"),
+ UnknownJavaScriptObject: findType("UnknownJavaScriptObject"),
+ _AsyncCompleter_HttpRequest: findType("_AsyncCompleter<HttpRequest>"),
+ _ElementEventStreamImpl_legacy_MouseEvent: findType("_ElementEventStreamImpl<MouseEvent*>"),
+ _Future_HttpRequest: findType("_Future<HttpRequest>"),
+ _Future_dynamic: findType("_Future<@>"),
+ _Future_int: findType("_Future<int>"),
+ _Future_void: findType("_Future<~>"),
+ _StreamControllerAddStreamState_nullable_Object: findType("_StreamControllerAddStreamState<Object?>"),
+ bool: findType("bool"),
+ bool_Function_Object: findType("bool(Object)"),
+ double: findType("double"),
+ dynamic: findType("@"),
+ dynamic_Function: findType("@()"),
+ dynamic_Function_Object: findType("@(Object)"),
+ dynamic_Function_Object_StackTrace: findType("@(Object,StackTrace)"),
+ dynamic_Function_dynamic_dynamic: findType("@(@,@)"),
+ int: findType("int"),
+ legacy_Event: findType("Event*"),
+ legacy_Level: findType("Level*"),
+ legacy_List_legacy_String: findType("List<String*>*"),
+ legacy_List_legacy_int: findType("List<int*>*"),
+ legacy_Logger: findType("Logger*"),
+ legacy_Map_of_legacy_String_and_legacy_int: findType("Map<String*,int*>*"),
+ legacy_Map_of_legacy_Symbol_and_dynamic: findType("Map<Symbol0*,@>*"),
+ legacy_MessageEvent: findType("MessageEvent*"),
+ legacy_MouseEvent: findType("MouseEvent*"),
+ legacy_Never: findType("0&*"),
+ legacy_Object: findType("Object*"),
+ legacy_ProgressEvent: findType("ProgressEvent*"),
+ legacy_String: findType("String*"),
+ nullable_Future_Null: findType("Future<Null>?"),
+ nullable_List_dynamic: findType("List<@>?"),
+ nullable_Object: findType("Object?"),
+ nullable__DelayedEvent_dynamic: findType("_DelayedEvent<@>?"),
+ nullable__FutureListener_dynamic_dynamic: findType("_FutureListener<@,@>?"),
+ nullable_dynamic_Function_Event: findType("@(Event)?"),
+ nullable_nullable_Object_Function_2_nullable_Object_and_nullable_Object: findType("Object?(Object?,Object?)?"),
+ nullable_nullable_Object_Function_dynamic: findType("Object?(@)?"),
+ nullable_void_Function: findType("~()?"),
+ nullable_void_Function_legacy_Event: findType("~(Event*)?"),
+ nullable_void_Function_legacy_ProgressEvent: findType("~(ProgressEvent*)?"),
+ num: findType("num"),
+ void: findType("~"),
+ void_Function: findType("~()"),
+ void_Function_Object: findType("~(Object)"),
+ void_Function_Object_StackTrace: findType("~(Object,StackTrace)"),
+ void_Function_String_dynamic: findType("~(String,@)")
+ };
+ })();
(function constants() {
var makeConstList = hunkHelpers.makeConstList;
C.EventSource_methods = W.EventSource.prototype;
@@ -7294,23 +8158,26 @@
C.C_OutOfMemoryError = new P.OutOfMemoryError();
C.C__DelayedDone = new P._DelayedDone();
C.C__JSRandom = new P._JSRandom();
+ C.C__Required = new H._Required();
C.C__RootZone = new P._RootZone();
+ C.C__StringStackTrace = new P._StringStackTrace();
C.Duration_0 = new P.Duration(0);
C.Duration_5000000 = new P.Duration(5000000);
C.JsonDecoder_null = new P.JsonDecoder(null);
C.JsonEncoder_null = new P.JsonEncoder(null);
- C.Level_INFO_800 = new N.Level("INFO", 800);
- C.Level_WARNING_900 = new N.Level("WARNING", 900);
- C.List_empty = makeConstList([]);
- C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), [P.Symbol]);
- C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, [P.Symbol, null]);
- C.Symbol_call = new H.Symbol0("call");
+ C.Level_INFO_800 = new Y.Level("INFO", 800);
+ C.Level_SEVERE_1000 = new Y.Level("SEVERE", 1000);
+ C.Level_WARNING_900 = new Y.Level("WARNING", 900);
+ C.List_empty = H.setRuntimeTypeInfo(makeConstList([]), type$.JSArray_dynamic);
+ C.List_empty0 = H.setRuntimeTypeInfo(makeConstList([]), H.findType("JSArray<Symbol0*>"));
+ C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, H.findType("ConstantStringMap<Symbol0*,@>"));
+ C.Symbol_call = new H.Symbol("call");
})();
(function staticFields() {
+ $._JS_INTEROP_INTERCEPTOR_TAG = null;
$.Closure_functionCounter = 0;
$.BoundClosure_selfFieldNameCache = null;
$.BoundClosure_receiverFieldNameCache = null;
- $._inTypeAssertion = false;
$.getTagFunction = null;
$.alternateTagFunction = null;
$.prototypeForTagFunction = null;
@@ -7322,36 +8189,35 @@
$._lastPriorityCallback = null;
$._isInCallbackLoop = false;
$.Zone__current = C.C__RootZone;
- $._toStringVisiting = [];
- $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(P.String, N.Logger);
+ $._toStringVisiting = H.setRuntimeTypeInfo([], H.findType("JSArray<Object>"));
$.LogRecord__nextNumber = 0;
+ $.Logger__loggers = P.LinkedHashMap_LinkedHashMap$_empty(type$.legacy_String, type$.legacy_Logger);
})();
(function lazyInitializers() {
- var _lazy = hunkHelpers.lazy;
- _lazy($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() {
+ var _lazyFinal = hunkHelpers.lazyFinal,
+ _lazy = hunkHelpers.lazy,
+ _lazyOld = hunkHelpers.lazyOld;
+ _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() {
return H.getIsolateAffinityTag("_$dart_dartClosure");
});
- _lazy($, "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() {
- return H.getIsolateAffinityTag("_$dart_js");
- });
- _lazy($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({
toString: function() {
return "$receiver$";
}
}));
});
- _lazy($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null,
toString: function() {
return "$receiver$";
}
}));
});
- _lazy($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null));
});
- _lazy($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
var $argumentsExpr$ = '$arguments$';
try {
@@ -7361,10 +8227,10 @@
}
}());
});
- _lazy($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0));
});
- _lazy($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
var $argumentsExpr$ = '$arguments$';
try {
@@ -7374,10 +8240,10 @@
}
}());
});
- _lazy($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null));
});
- _lazy($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
try {
null.$method$;
@@ -7386,10 +8252,10 @@
}
}());
});
- _lazy($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() {
return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0));
});
- _lazy($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() {
+ _lazyFinal($, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() {
return H.TypeErrorDecoder_extractPattern(function() {
try {
(void 0).$method$;
@@ -7398,20 +8264,19 @@
}
}());
});
- _lazy($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() {
+ _lazyFinal($, "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() {
return P._AsyncRun__initializeScheduleImmediate();
});
- _lazy($, "Future__nullFuture", "$get$Future__nullFuture", function() {
- return P._Future$zoneValue(null, C.C__RootZone, P.Null);
- });
- _lazy($, "Future__falseFuture", "$get$Future__falseFuture", function() {
- return P._Future$zoneValue(false, C.C__RootZone, P.bool);
+ _lazyFinal($, "Future__nullFuture", "$get$Future__nullFuture", function() {
+ var t1 = new P._Future(C.C__RootZone, H.findType("_Future<Null>"));
+ t1._setValue$1(null);
+ return t1;
});
_lazy($, "_hasErrorStackProperty", "$get$_hasErrorStackProperty", function() {
return new Error().stack != void 0;
});
- _lazy($, "Logger_root", "$get$Logger_root", function() {
- return N.Logger_Logger("");
+ _lazyOld($, "Logger_root", "$get$Logger_root", function() {
+ return F.Logger_Logger("");
});
})();
(function nativeSupport() {
@@ -7437,8 +8302,8 @@
}
init.dispatchPropertyName = init.getIsolateTag("dispatch_record");
}();
- hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement});
- hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true});
+ hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer: J.Interceptor, Blob: J.Interceptor, DOMError: J.Interceptor, File: J.Interceptor, MediaError: J.Interceptor, NavigatorUserMediaError: J.Interceptor, OverconstrainedError: J.Interceptor, PositionError: J.Interceptor, SQLError: J.Interceptor, DataView: H.NativeTypedData, ArrayBufferView: H.NativeTypedData, Float32Array: H.NativeTypedArrayOfDouble, Float64Array: H.NativeTypedArrayOfDouble, Int16Array: H.NativeInt16List, Int32Array: H.NativeInt32List, Int8Array: H.NativeInt8List, Uint16Array: H.NativeUint16List, Uint32Array: H.NativeUint32List, Uint8ClampedArray: H.NativeUint8ClampedList, CanvasPixelArray: H.NativeUint8ClampedList, Uint8Array: H.NativeUint8List, HTMLAudioElement: W.HtmlElement, HTMLBRElement: W.HtmlElement, HTMLBaseElement: W.HtmlElement, HTMLBodyElement: W.HtmlElement, HTMLButtonElement: W.HtmlElement, HTMLCanvasElement: W.HtmlElement, HTMLContentElement: W.HtmlElement, HTMLDListElement: W.HtmlElement, HTMLDataElement: W.HtmlElement, HTMLDataListElement: W.HtmlElement, HTMLDetailsElement: W.HtmlElement, HTMLDialogElement: W.HtmlElement, HTMLDivElement: W.HtmlElement, HTMLEmbedElement: W.HtmlElement, HTMLFieldSetElement: W.HtmlElement, HTMLHRElement: W.HtmlElement, HTMLHeadElement: W.HtmlElement, HTMLHeadingElement: W.HtmlElement, HTMLHtmlElement: W.HtmlElement, HTMLIFrameElement: W.HtmlElement, HTMLImageElement: W.HtmlElement, HTMLInputElement: W.HtmlElement, HTMLLIElement: W.HtmlElement, HTMLLabelElement: W.HtmlElement, HTMLLegendElement: W.HtmlElement, HTMLLinkElement: W.HtmlElement, HTMLMapElement: W.HtmlElement, HTMLMediaElement: W.HtmlElement, HTMLMenuElement: W.HtmlElement, HTMLMetaElement: W.HtmlElement, HTMLMeterElement: W.HtmlElement, HTMLModElement: W.HtmlElement, HTMLOListElement: W.HtmlElement, HTMLObjectElement: W.HtmlElement, HTMLOptGroupElement: W.HtmlElement, HTMLOptionElement: W.HtmlElement, HTMLOutputElement: W.HtmlElement, HTMLParagraphElement: W.HtmlElement, HTMLParamElement: W.HtmlElement, HTMLPictureElement: W.HtmlElement, HTMLPreElement: W.HtmlElement, HTMLProgressElement: W.HtmlElement, HTMLQuoteElement: W.HtmlElement, HTMLScriptElement: W.HtmlElement, HTMLShadowElement: W.HtmlElement, HTMLSlotElement: W.HtmlElement, HTMLSourceElement: W.HtmlElement, HTMLSpanElement: W.HtmlElement, HTMLStyleElement: W.HtmlElement, HTMLTableCaptionElement: W.HtmlElement, HTMLTableCellElement: W.HtmlElement, HTMLTableDataCellElement: W.HtmlElement, HTMLTableHeaderCellElement: W.HtmlElement, HTMLTableColElement: W.HtmlElement, HTMLTableElement: W.HtmlElement, HTMLTableRowElement: W.HtmlElement, HTMLTableSectionElement: W.HtmlElement, HTMLTemplateElement: W.HtmlElement, HTMLTextAreaElement: W.HtmlElement, HTMLTimeElement: W.HtmlElement, HTMLTitleElement: W.HtmlElement, HTMLTrackElement: W.HtmlElement, HTMLUListElement: W.HtmlElement, HTMLUnknownElement: W.HtmlElement, HTMLVideoElement: W.HtmlElement, HTMLDirectoryElement: W.HtmlElement, HTMLFontElement: W.HtmlElement, HTMLFrameElement: W.HtmlElement, HTMLFrameSetElement: W.HtmlElement, HTMLMarqueeElement: W.HtmlElement, HTMLElement: W.HtmlElement, HTMLAnchorElement: W.AnchorElement, HTMLAreaElement: W.AreaElement, DOMException: W.DomException, Element: W.Element, AbortPaymentEvent: W.Event, AnimationEvent: W.Event, AnimationPlaybackEvent: W.Event, ApplicationCacheErrorEvent: W.Event, BackgroundFetchClickEvent: W.Event, BackgroundFetchEvent: W.Event, BackgroundFetchFailEvent: W.Event, BackgroundFetchedEvent: W.Event, BeforeInstallPromptEvent: W.Event, BeforeUnloadEvent: W.Event, BlobEvent: W.Event, CanMakePaymentEvent: W.Event, ClipboardEvent: W.Event, CloseEvent: W.Event, CustomEvent: W.Event, DeviceMotionEvent: W.Event, DeviceOrientationEvent: W.Event, ErrorEvent: W.Event, ExtendableEvent: W.Event, ExtendableMessageEvent: W.Event, FetchEvent: W.Event, FontFaceSetLoadEvent: W.Event, ForeignFetchEvent: W.Event, GamepadEvent: W.Event, HashChangeEvent: W.Event, InstallEvent: W.Event, MediaEncryptedEvent: W.Event, MediaKeyMessageEvent: W.Event, MediaQueryListEvent: W.Event, MediaStreamEvent: W.Event, MediaStreamTrackEvent: W.Event, MIDIConnectionEvent: W.Event, MIDIMessageEvent: W.Event, MutationEvent: W.Event, NotificationEvent: W.Event, PageTransitionEvent: W.Event, PaymentRequestEvent: W.Event, PaymentRequestUpdateEvent: W.Event, PopStateEvent: W.Event, PresentationConnectionAvailableEvent: W.Event, PresentationConnectionCloseEvent: W.Event, PromiseRejectionEvent: W.Event, PushEvent: W.Event, RTCDataChannelEvent: W.Event, RTCDTMFToneChangeEvent: W.Event, RTCPeerConnectionIceEvent: W.Event, RTCTrackEvent: W.Event, SecurityPolicyViolationEvent: W.Event, SensorErrorEvent: W.Event, SpeechRecognitionError: W.Event, SpeechRecognitionEvent: W.Event, SpeechSynthesisEvent: W.Event, StorageEvent: W.Event, SyncEvent: W.Event, TrackEvent: W.Event, TransitionEvent: W.Event, WebKitTransitionEvent: W.Event, VRDeviceEvent: W.Event, VRDisplayEvent: W.Event, VRSessionEvent: W.Event, MojoInterfaceRequestEvent: W.Event, USBConnectionEvent: W.Event, IDBVersionChangeEvent: W.Event, AudioProcessingEvent: W.Event, OfflineAudioCompletionEvent: W.Event, WebGLContextEvent: W.Event, Event: W.Event, InputEvent: W.Event, SubmitEvent: W.Event, EventSource: W.EventSource, MessagePort: W.EventTarget, EventTarget: W.EventTarget, HTMLFormElement: W.FormElement, XMLHttpRequest: W.HttpRequest, XMLHttpRequestEventTarget: W.HttpRequestEventTarget, MessageEvent: W.MessageEvent, MouseEvent: W.MouseEvent, DragEvent: W.MouseEvent, PointerEvent: W.MouseEvent, WheelEvent: W.MouseEvent, Document: W.Node, HTMLDocument: W.Node, Node: W.Node, ProgressEvent: W.ProgressEvent, ResourceProgressEvent: W.ProgressEvent, HTMLSelectElement: W.SelectElement, CompositionEvent: W.UIEvent, FocusEvent: W.UIEvent, KeyboardEvent: W.UIEvent, TextEvent: W.UIEvent, TouchEvent: W.UIEvent, UIEvent: W.UIEvent, SVGAElement: P.SvgElement, SVGAnimateElement: P.SvgElement, SVGAnimateMotionElement: P.SvgElement, SVGAnimateTransformElement: P.SvgElement, SVGAnimationElement: P.SvgElement, SVGCircleElement: P.SvgElement, SVGClipPathElement: P.SvgElement, SVGDefsElement: P.SvgElement, SVGDescElement: P.SvgElement, SVGDiscardElement: P.SvgElement, SVGEllipseElement: P.SvgElement, SVGFEBlendElement: P.SvgElement, SVGFEColorMatrixElement: P.SvgElement, SVGFEComponentTransferElement: P.SvgElement, SVGFECompositeElement: P.SvgElement, SVGFEConvolveMatrixElement: P.SvgElement, SVGFEDiffuseLightingElement: P.SvgElement, SVGFEDisplacementMapElement: P.SvgElement, SVGFEDistantLightElement: P.SvgElement, SVGFEFloodElement: P.SvgElement, SVGFEFuncAElement: P.SvgElement, SVGFEFuncBElement: P.SvgElement, SVGFEFuncGElement: P.SvgElement, SVGFEFuncRElement: P.SvgElement, SVGFEGaussianBlurElement: P.SvgElement, SVGFEImageElement: P.SvgElement, SVGFEMergeElement: P.SvgElement, SVGFEMergeNodeElement: P.SvgElement, SVGFEMorphologyElement: P.SvgElement, SVGFEOffsetElement: P.SvgElement, SVGFEPointLightElement: P.SvgElement, SVGFESpecularLightingElement: P.SvgElement, SVGFESpotLightElement: P.SvgElement, SVGFETileElement: P.SvgElement, SVGFETurbulenceElement: P.SvgElement, SVGFilterElement: P.SvgElement, SVGForeignObjectElement: P.SvgElement, SVGGElement: P.SvgElement, SVGGeometryElement: P.SvgElement, SVGGraphicsElement: P.SvgElement, SVGImageElement: P.SvgElement, SVGLineElement: P.SvgElement, SVGLinearGradientElement: P.SvgElement, SVGMarkerElement: P.SvgElement, SVGMaskElement: P.SvgElement, SVGMetadataElement: P.SvgElement, SVGPathElement: P.SvgElement, SVGPatternElement: P.SvgElement, SVGPolygonElement: P.SvgElement, SVGPolylineElement: P.SvgElement, SVGRadialGradientElement: P.SvgElement, SVGRectElement: P.SvgElement, SVGScriptElement: P.SvgElement, SVGSetElement: P.SvgElement, SVGStopElement: P.SvgElement, SVGStyleElement: P.SvgElement, SVGElement: P.SvgElement, SVGSVGElement: P.SvgElement, SVGSwitchElement: P.SvgElement, SVGSymbolElement: P.SvgElement, SVGTSpanElement: P.SvgElement, SVGTextContentElement: P.SvgElement, SVGTextElement: P.SvgElement, SVGTextPathElement: P.SvgElement, SVGTextPositioningElement: P.SvgElement, SVGTitleElement: P.SvgElement, SVGUseElement: P.SvgElement, SVGViewElement: P.SvgElement, SVGGradientElement: P.SvgElement, SVGComponentTransferFunctionElement: P.SvgElement, SVGFEDropShadowElement: P.SvgElement, SVGMPathElement: P.SvgElement});
+ hunkHelpers.setOrUpdateLeafTags({ArrayBuffer: true, Blob: true, DOMError: true, File: true, MediaError: true, NavigatorUserMediaError: true, OverconstrainedError: true, PositionError: true, SQLError: true, DataView: true, ArrayBufferView: false, Float32Array: true, Float64Array: true, Int16Array: true, Int32Array: true, Int8Array: true, Uint16Array: true, Uint32Array: true, Uint8ClampedArray: true, CanvasPixelArray: true, Uint8Array: false, HTMLAudioElement: true, HTMLBRElement: true, HTMLBaseElement: true, HTMLBodyElement: true, HTMLButtonElement: true, HTMLCanvasElement: true, HTMLContentElement: true, HTMLDListElement: true, HTMLDataElement: true, HTMLDataListElement: true, HTMLDetailsElement: true, HTMLDialogElement: true, HTMLDivElement: true, HTMLEmbedElement: true, HTMLFieldSetElement: true, HTMLHRElement: true, HTMLHeadElement: true, HTMLHeadingElement: true, HTMLHtmlElement: true, HTMLIFrameElement: true, HTMLImageElement: true, HTMLInputElement: true, HTMLLIElement: true, HTMLLabelElement: true, HTMLLegendElement: true, HTMLLinkElement: true, HTMLMapElement: true, HTMLMediaElement: true, HTMLMenuElement: true, HTMLMetaElement: true, HTMLMeterElement: true, HTMLModElement: true, HTMLOListElement: true, HTMLObjectElement: true, HTMLOptGroupElement: true, HTMLOptionElement: true, HTMLOutputElement: true, HTMLParagraphElement: true, HTMLParamElement: true, HTMLPictureElement: true, HTMLPreElement: true, HTMLProgressElement: true, HTMLQuoteElement: true, HTMLScriptElement: true, HTMLShadowElement: true, HTMLSlotElement: true, HTMLSourceElement: true, HTMLSpanElement: true, HTMLStyleElement: true, HTMLTableCaptionElement: true, HTMLTableCellElement: true, HTMLTableDataCellElement: true, HTMLTableHeaderCellElement: true, HTMLTableColElement: true, HTMLTableElement: true, HTMLTableRowElement: true, HTMLTableSectionElement: true, HTMLTemplateElement: true, HTMLTextAreaElement: true, HTMLTimeElement: true, HTMLTitleElement: true, HTMLTrackElement: true, HTMLUListElement: true, HTMLUnknownElement: true, HTMLVideoElement: true, HTMLDirectoryElement: true, HTMLFontElement: true, HTMLFrameElement: true, HTMLFrameSetElement: true, HTMLMarqueeElement: true, HTMLElement: false, HTMLAnchorElement: true, HTMLAreaElement: true, DOMException: true, Element: false, AbortPaymentEvent: true, AnimationEvent: true, AnimationPlaybackEvent: true, ApplicationCacheErrorEvent: true, BackgroundFetchClickEvent: true, BackgroundFetchEvent: true, BackgroundFetchFailEvent: true, BackgroundFetchedEvent: true, BeforeInstallPromptEvent: true, BeforeUnloadEvent: true, BlobEvent: true, CanMakePaymentEvent: true, ClipboardEvent: true, CloseEvent: true, CustomEvent: true, DeviceMotionEvent: true, DeviceOrientationEvent: true, ErrorEvent: true, ExtendableEvent: true, ExtendableMessageEvent: true, FetchEvent: true, FontFaceSetLoadEvent: true, ForeignFetchEvent: true, GamepadEvent: true, HashChangeEvent: true, InstallEvent: true, MediaEncryptedEvent: true, MediaKeyMessageEvent: true, MediaQueryListEvent: true, MediaStreamEvent: true, MediaStreamTrackEvent: true, MIDIConnectionEvent: true, MIDIMessageEvent: true, MutationEvent: true, NotificationEvent: true, PageTransitionEvent: true, PaymentRequestEvent: true, PaymentRequestUpdateEvent: true, PopStateEvent: true, PresentationConnectionAvailableEvent: true, PresentationConnectionCloseEvent: true, PromiseRejectionEvent: true, PushEvent: true, RTCDataChannelEvent: true, RTCDTMFToneChangeEvent: true, RTCPeerConnectionIceEvent: true, RTCTrackEvent: true, SecurityPolicyViolationEvent: true, SensorErrorEvent: true, SpeechRecognitionError: true, SpeechRecognitionEvent: true, SpeechSynthesisEvent: true, StorageEvent: true, SyncEvent: true, TrackEvent: true, TransitionEvent: true, WebKitTransitionEvent: true, VRDeviceEvent: true, VRDisplayEvent: true, VRSessionEvent: true, MojoInterfaceRequestEvent: true, USBConnectionEvent: true, IDBVersionChangeEvent: true, AudioProcessingEvent: true, OfflineAudioCompletionEvent: true, WebGLContextEvent: true, Event: false, InputEvent: false, SubmitEvent: false, EventSource: true, MessagePort: true, EventTarget: false, HTMLFormElement: true, XMLHttpRequest: true, XMLHttpRequestEventTarget: false, MessageEvent: true, MouseEvent: true, DragEvent: true, PointerEvent: true, WheelEvent: true, Document: true, HTMLDocument: true, Node: false, ProgressEvent: true, ResourceProgressEvent: true, HTMLSelectElement: true, CompositionEvent: true, FocusEvent: true, KeyboardEvent: true, TextEvent: true, TouchEvent: true, UIEvent: false, SVGAElement: true, SVGAnimateElement: true, SVGAnimateMotionElement: true, SVGAnimateTransformElement: true, SVGAnimationElement: true, SVGCircleElement: true, SVGClipPathElement: true, SVGDefsElement: true, SVGDescElement: true, SVGDiscardElement: true, SVGEllipseElement: true, SVGFEBlendElement: true, SVGFEColorMatrixElement: true, SVGFEComponentTransferElement: true, SVGFECompositeElement: true, SVGFEConvolveMatrixElement: true, SVGFEDiffuseLightingElement: true, SVGFEDisplacementMapElement: true, SVGFEDistantLightElement: true, SVGFEFloodElement: true, SVGFEFuncAElement: true, SVGFEFuncBElement: true, SVGFEFuncGElement: true, SVGFEFuncRElement: true, SVGFEGaussianBlurElement: true, SVGFEImageElement: true, SVGFEMergeElement: true, SVGFEMergeNodeElement: true, SVGFEMorphologyElement: true, SVGFEOffsetElement: true, SVGFEPointLightElement: true, SVGFESpecularLightingElement: true, SVGFESpotLightElement: true, SVGFETileElement: true, SVGFETurbulenceElement: true, SVGFilterElement: true, SVGForeignObjectElement: true, SVGGElement: true, SVGGeometryElement: true, SVGGraphicsElement: true, SVGImageElement: true, SVGLineElement: true, SVGLinearGradientElement: true, SVGMarkerElement: true, SVGMaskElement: true, SVGMetadataElement: true, SVGPathElement: true, SVGPatternElement: true, SVGPolygonElement: true, SVGPolylineElement: true, SVGRadialGradientElement: true, SVGRectElement: true, SVGScriptElement: true, SVGSetElement: true, SVGStopElement: true, SVGStyleElement: true, SVGElement: true, SVGSVGElement: true, SVGSwitchElement: true, SVGSymbolElement: true, SVGTSpanElement: true, SVGTextContentElement: true, SVGTextElement: true, SVGTextPathElement: true, SVGTextPositioningElement: true, SVGTitleElement: true, SVGUseElement: true, SVGViewElement: true, SVGGradientElement: true, SVGComponentTransferFunctionElement: true, SVGFEDropShadowElement: true, SVGMPathElement: true});
H.NativeTypedArray.$nativeSuperclassTag = "ArrayBufferView";
H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin.$nativeSuperclassTag = "ArrayBufferView";
H._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin_FixedLengthListMixin.$nativeSuperclassTag = "ArrayBufferView";