diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index bfc3a334c..bdc733b8e 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,5 +1,7 @@ ## 24.4.0-wip +- Added support for breakpoint registering on a hot reload with the DDC library bundle format using PausePostRequests. + ## 24.3.11 - Changed DWDS to always inject the client and added `useDwdsWebSocketConnection` flag to control communication protocol: when true uses socket-based implementation, when false uses Chrome-based communication protocol. diff --git a/dwds/lib/src/debugging/inspector.dart b/dwds/lib/src/debugging/inspector.dart index 7128adde0..1e4932e38 100644 --- a/dwds/lib/src/debugging/inspector.dart +++ b/dwds/lib/src/debugging/inspector.dart @@ -32,7 +32,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; /// Provides information about currently loaded scripts and objects and support /// for eval. class AppInspector implements AppInspectorInterface { - final _scriptCacheMemoizer = AsyncMemoizer>(); + var _scriptCacheMemoizer = AsyncMemoizer>(); Future> get scriptRefs => _populateScriptCaches(); @@ -68,9 +68,9 @@ class AppInspector implements AppInspectorInterface { final ExecutionContext _executionContext; - late final LibraryHelper _libraryHelper; - late final ClassHelper _classHelper; - late final InstanceHelper _instanceHelper; + late LibraryHelper _libraryHelper; + late ClassHelper _classHelper; + late InstanceHelper _instanceHelper; final AssetReader _assetReader; final Locations _locations; @@ -99,15 +99,25 @@ class AppInspector implements AppInspectorInterface { this._locations, this._root, this._executionContext, - ) : _isolateRef = _toIsolateRef(_isolate) { + ) : _isolateRef = _toIsolateRef(_isolate); + + /// Reset all caches and recompute any mappings. + /// + /// Should be called across hot reloads. + Future initialize() async { + _scriptCacheMemoizer = AsyncMemoizer>(); + _scriptRefsById.clear(); + _serverPathToScriptRef.clear(); + _scriptIdToLibraryId.clear(); + _libraryIdToScriptRefs.clear(); + _libraryHelper = LibraryHelper(this); _classHelper = ClassHelper(this); _instanceHelper = InstanceHelper(this); - } - Future initialize() async { final libraries = await _libraryHelper.libraryRefs; isolate.rootLib = await _libraryHelper.rootLib; + isolate.libraries?.clear(); isolate.libraries?.addAll(libraries); final scripts = await scriptRefs; @@ -702,8 +712,7 @@ class AppInspector implements AppInspectorInterface { /// This populates [_scriptRefsById], [_scriptIdToLibraryId], /// [_libraryIdToScriptRefs] and [_serverPathToScriptRef]. /// - /// It is a one-time operation, because if we do a - /// reload the inspector will get re-created. + /// This will get repopulated on restarts and reloads. /// /// Returns the list of scripts refs cached. Future> _populateScriptCaches() { diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index 40bf2fd5d..488511c5c 100644 --- a/dwds/lib/src/injected/client.js +++ b/dwds/lib/src/injected/client.js @@ -1,4 +1,4 @@ -// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.9.0-edge. +// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.9.0-152.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -125,7 +125,9 @@ return finalValue; }; } - function makeConstList(list) { + function makeConstList(list, rti) { + if (rti != null) + A._setArrayType(list, rti); list.$flags = 7; return list; } @@ -386,22 +388,6 @@ return J.UnknownJavaScriptObject.prototype; return receiver; }, - getInterceptor$x(receiver) { - if (receiver == null) - return receiver; - if (typeof receiver != "object") { - if (typeof receiver == "function") - return J.JavaScriptFunction.prototype; - if (typeof receiver == "symbol") - return J.JavaScriptSymbol.prototype; - if (typeof receiver == "bigint") - return J.JavaScriptBigInt.prototype; - return receiver; - } - if (receiver instanceof A.Object) - return receiver; - return J.getNativeInterceptor(receiver); - }, set$length$asx(receiver, value) { return J.getInterceptor$asx(receiver).set$length(receiver, value); }, @@ -452,9 +438,6 @@ allMatches$2$s(receiver, a0, a1) { return J.getInterceptor$s(receiver).allMatches$2(receiver, a0, a1); }, - asUint8List$2$x(receiver, a0, a1) { - return J.getInterceptor$x(receiver).asUint8List$2(receiver, a0, a1); - }, cast$1$0$ax(receiver, $T1) { return J.getInterceptor$ax(receiver).cast$1$0(receiver, $T1); }, @@ -520,6 +503,8 @@ JSArray: function JSArray(t0) { this.$ti = t0; }, + JSArraySafeToStringHook: function JSArraySafeToStringHook() { + }, JSUnmodifiableArray: function JSUnmodifiableArray(t0) { this.$ti = t0; }, @@ -1121,6 +1106,7 @@ return A._rtiToString(A.instanceType(object), null); }, Primitives_safeToString(object) { + var hooks, i, hookResult; if (object == null || typeof object == "number" || A._isBool(object)) return J.toString$0$(object); if (typeof object == "string") @@ -1129,6 +1115,12 @@ return object.toString$0(0); if (object instanceof A._Record) return object._toString$1(true); + hooks = $.$get$_safeToStringHooks(); + for (i = 0; i < 1; ++i) { + hookResult = hooks[i].tryFormat$1(object); + if (hookResult != null) + return hookResult; + } return "Instance of '" + A.Primitives_objectTypeName(object) + "'"; }, Primitives_currentUri() { @@ -1969,8 +1961,7 @@ if (receiver === "") return replacement; $length = receiver.length; - t1 = "" + replacement; - for (i = 0; i < $length; ++i) + for (t1 = replacement, i = 0; i < $length; ++i) t1 = t1 + receiver[i] + replacement; return t1.charCodeAt(0) == 0 ? t1 : t1; } @@ -2017,10 +2008,6 @@ stringReplaceRangeUnchecked(receiver, start, end, replacement) { return receiver.substring(0, start) + replacement + receiver.substring(end); }, - _Record_2_libraries_sources: function _Record_2_libraries_sources(t0, t1) { - this._0 = t0; - this._1 = t1; - }, ConstantMap: function ConstantMap() { }, ConstantMap_map_closure: function ConstantMap_map_closure(t0, t1, t2) { @@ -2051,6 +2038,8 @@ this._genericClosure = t0; this.$ti = t1; }, + SafeToStringHook: function SafeToStringHook() { + }, TypeErrorDecoder: function TypeErrorDecoder(t0, t1, t2, t3, t4, t5) { var _ = this; _._pattern = t0; @@ -2168,8 +2157,6 @@ }, _Record: function _Record() { }, - _Record2: function _Record2() { - }, JSSyntaxRegExp: function JSSyntaxRegExp(t0, t1) { var _ = this; _.pattern = t0; @@ -2224,9 +2211,6 @@ this._name = t0; this.__late_helper$_value = null; }, - _checkLength($length) { - return $length; - }, _ensureNativeList(list) { var t1, result, i; if (type$.JSIndexable_dynamic._is(list)) @@ -2269,9 +2253,6 @@ }, NativeTypedData: function NativeTypedData() { }, - _UnmodifiableNativeByteBufferView: function _UnmodifiableNativeByteBufferView(t0) { - this.__native_typed_data$_data = t0; - }, NativeByteData: function NativeByteData() { }, NativeTypedArray: function NativeTypedArray() { @@ -2565,45 +2546,56 @@ return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); }, _installSpecializedIsTest(object) { - var kind, isFn, $name, predicate, testRti = this; - if (testRti === type$.Object) - return A._finishIsFn(testRti, object, A._isObject); + var testRti = this; + testRti._is = A._specializedIsTest(testRti); + return testRti._is(object); + }, + _specializedIsTest(testRti) { + var kind, simpleIsFn, $name, predicate, t2, + t1 = type$.Object; + if (testRti === t1) + return A._isObject; if (A.isTopType(testRti)) - return A._finishIsFn(testRti, object, A._isTop); + return A._isTop; kind = testRti._kind; if (kind === 6) - return A._finishIsFn(testRti, object, A._generalNullableIsTestImplementation); + return A._generalNullableIsTestImplementation; if (kind === 1) - return A._finishIsFn(testRti, object, A._isNever); + return A._isNever; if (kind === 7) - return A._finishIsFn(testRti, object, A._isFutureOr); - if (testRti === type$.int) - isFn = A._isInt; - else if (testRti === type$.double || testRti === type$.num) - isFn = A._isNum; - else if (testRti === type$.String) - isFn = A._isString; - else - isFn = testRti === type$.bool ? A._isBool : null; - if (isFn != null) - return A._finishIsFn(testRti, object, isFn); + return A._isFutureOr; + simpleIsFn = A._simpleSpecializedIsTest(testRti); + if (simpleIsFn != null) + return simpleIsFn; if (kind === 8) { $name = testRti._primary; if (testRti._rest.every(A.isTopType)) { testRti._specializedTestResource = "$is" + $name; if ($name === "List") - return A._finishIsFn(testRti, object, A._isListTestViaProperty); - return A._finishIsFn(testRti, object, A._isTestViaProperty); + return A._isListTestViaProperty; + if (testRti === type$.JSObject) + return A._isJSObject; + return A._isTestViaProperty; } } else if (kind === 10) { predicate = A.createRecordTypePredicate(testRti._primary, testRti._rest); - return A._finishIsFn(testRti, object, predicate == null ? A._isNever : predicate); + t2 = predicate == null ? A._isNever : predicate; + return t2 == null ? t1._as(t2) : t2; + } + return A._generalIsTestImplementation; + }, + _simpleSpecializedIsTest(testRti) { + if (testRti._kind === 8) { + if (testRti === type$.int) + return A._isInt; + if (testRti === type$.double || testRti === type$.num) + return A._isNum; + if (testRti === type$.String) + return A._isString; + if (testRti === type$.bool) + return A._isBool; } - return A._finishIsFn(testRti, object, A._generalIsTestImplementation); - }, - _finishIsFn(testRti, object, isFn) { - testRti._is = isFn; - return testRti._is(object); + return null; }, _installSpecializedAsCheck(object) { var testRti = this, @@ -2612,28 +2604,28 @@ asFn = A._asTop; else if (testRti === type$.Object) asFn = A._asObject; - else if (A.isNullable(testRti)) + else if (A.isNullable(testRti)) { asFn = A._generalNullableAsCheckImplementation; - if (testRti === type$.int) + if (testRti === type$.nullable_int) + asFn = A._asIntQ; + else if (testRti === type$.nullable_String) + asFn = A._asStringQ; + else if (testRti === type$.nullable_bool) + asFn = A._asBoolQ; + else if (testRti === type$.nullable_num) + asFn = A._asNumQ; + else if (testRti === type$.nullable_double) + asFn = A._asDoubleQ; + } else if (testRti === type$.int) asFn = A._asInt; - else if (testRti === type$.nullable_int) - asFn = A._asIntQ; else if (testRti === type$.String) asFn = A._asString; - else if (testRti === type$.nullable_String) - asFn = A._asStringQ; else if (testRti === type$.bool) asFn = A._asBool; - else if (testRti === type$.nullable_bool) - asFn = A._asBoolQ; else if (testRti === type$.num) asFn = A._asNum; - else if (testRti === type$.nullable_num) - asFn = A._asNumQ; else if (testRti === type$.double) asFn = A._asDouble; - else if (testRti === type$.nullable_double) - asFn = A._asDoubleQ; testRti._as = asFn; return testRti._as(object); }, @@ -2670,6 +2662,19 @@ return !!object[tag]; return !!J.getInterceptor$(object)[tag]; }, + _isJSObject(object) { + var t1 = this; + if (object == null) + return false; + if (typeof object == "object") { + if (object instanceof A.Object) + return !!object[t1._specializedTestResource]; + return true; + } + if (typeof object == "function") + return true; + return false; + }, _generalAsCheckImplementation(object) { var testRti = this; if (object == null) { @@ -2939,8 +2944,8 @@ }, _Universe_findErasedType(universe, cls) { var $length, erased, $arguments, i, $interface, - t1 = universe.eT, - probe = t1[cls]; + metadata = universe.eT, + probe = metadata[cls]; if (probe == null) return A._Universe_eval(universe, cls, false); else if (typeof probe == "number") { @@ -2950,7 +2955,7 @@ for (i = 0; i < $length; ++i) $arguments[i] = erased; $interface = A._Universe__lookupInterfaceRti(universe, cls, $arguments); - t1[cls] = $interface; + metadata[cls] = $interface; return $interface; } else return probe; @@ -2963,12 +2968,12 @@ }, _Universe_eval(universe, recipe, normalize) { var rti, - t1 = universe.eC, - probe = t1.get(recipe); + cache = universe.eC, + probe = cache.get(recipe); if (probe != null) return probe; rti = A._Parser_parse(A._Parser_create(universe, null, recipe, false)); - t1.set(recipe, rti); + cache.set(recipe, rti); return rti; }, _Universe_evalInEnvironment(universe, environment, recipe) { @@ -3227,97 +3232,97 @@ return {u: universe, e: environment, r: recipe, s: [], p: 0, n: normalize}; }, _Parser_parse(parser) { - var t2, i, ch, t3, array, end, item, + var t1, i, ch, u, array, end, item, source = parser.r, - t1 = parser.s; - for (t2 = source.length, i = 0; i < t2;) { + stack = parser.s; + for (t1 = source.length, i = 0; i < t1;) { ch = source.charCodeAt(i); if (ch >= 48 && ch <= 57) - i = A._Parser_handleDigit(i + 1, ch, source, t1); + i = A._Parser_handleDigit(i + 1, ch, source, stack); else if ((((ch | 32) >>> 0) - 97 & 65535) < 26 || ch === 95 || ch === 36 || ch === 124) - i = A._Parser_handleIdentifier(parser, i, source, t1, false); + i = A._Parser_handleIdentifier(parser, i, source, stack, false); else if (ch === 46) - i = A._Parser_handleIdentifier(parser, i, source, t1, true); + i = A._Parser_handleIdentifier(parser, i, source, stack, true); else { ++i; switch (ch) { case 44: break; case 58: - t1.push(false); + stack.push(false); break; case 33: - t1.push(true); + stack.push(true); break; case 59: - t1.push(A._Parser_toType(parser.u, parser.e, t1.pop())); + stack.push(A._Parser_toType(parser.u, parser.e, stack.pop())); break; case 94: - t1.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, t1.pop())); + stack.push(A._Universe__lookupGenericFunctionParameterRti(parser.u, stack.pop())); break; case 35: - t1.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 5, "#")); break; case 64: - t1.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 2, "@")); break; case 126: - t1.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); + stack.push(A._Universe__lookupTerminalRti(parser.u, 3, "~")); break; case 60: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 62: - A._Parser_handleTypeArguments(parser, t1); + A._Parser_handleTypeArguments(parser, stack); break; case 38: - A._Parser_handleExtendedOperations(parser, t1); + A._Parser_handleExtendedOperations(parser, stack); break; case 63: - t3 = parser.u; - t1.push(A._Universe__lookupQuestionRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + u = parser.u; + stack.push(A._Universe__lookupQuestionRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); break; case 47: - t3 = parser.u; - t1.push(A._Universe__lookupFutureOrRti(t3, A._Parser_toType(t3, parser.e, t1.pop()), parser.n)); + u = parser.u; + stack.push(A._Universe__lookupFutureOrRti(u, A._Parser_toType(u, parser.e, stack.pop()), parser.n)); break; case 40: - t1.push(-3); - t1.push(parser.p); - parser.p = t1.length; + stack.push(-3); + stack.push(parser.p); + parser.p = stack.length; break; case 41: - A._Parser_handleArguments(parser, t1); + A._Parser_handleArguments(parser, stack); break; case 91: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 93: - array = t1.splice(parser.p); + array = stack.splice(parser.p); A._Parser_toTypes(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-1); + parser.p = stack.pop(); + stack.push(array); + stack.push(-1); break; case 123: - t1.push(parser.p); - parser.p = t1.length; + stack.push(parser.p); + parser.p = stack.length; break; case 125: - array = t1.splice(parser.p); + array = stack.splice(parser.p); A._Parser_toTypesNamed(parser.u, parser.e, array); - parser.p = t1.pop(); - t1.push(array); - t1.push(-2); + parser.p = stack.pop(); + stack.push(array); + stack.push(-2); break; case 43: end = source.indexOf("(", i); - t1.push(source.substring(i, end)); - t1.push(-4); - t1.push(parser.p); - parser.p = t1.length; + stack.push(source.substring(i, end)); + stack.push(-4); + stack.push(parser.p); + parser.p = stack.length; i = end + 1; break; default: @@ -3325,7 +3330,7 @@ } } } - item = t1.pop(); + item = stack.pop(); return A._Parser_toType(parser.u, parser.e, item); }, _Parser_handleDigit(i, digit, source, stack) { @@ -3374,26 +3379,26 @@ }, _Parser_handleTypeArguments(parser, stack) { var base, - t1 = parser.u, + universe = parser.u, $arguments = A._Parser_collectArray(parser, stack), head = stack.pop(); if (typeof head == "string") - stack.push(A._Universe__lookupInterfaceRti(t1, head, $arguments)); + stack.push(A._Universe__lookupInterfaceRti(universe, head, $arguments)); else { - base = A._Parser_toType(t1, parser.e, head); + base = A._Parser_toType(universe, parser.e, head); switch (base._kind) { case 11: - stack.push(A._Universe__lookupGenericFunctionRti(t1, base, $arguments, parser.n)); + stack.push(A._Universe__lookupGenericFunctionRti(universe, base, $arguments, parser.n)); break; default: - stack.push(A._Universe__lookupBindingRti(t1, base, $arguments)); + stack.push(A._Universe__lookupBindingRti(universe, base, $arguments)); break; } } }, _Parser_handleArguments(parser, stack) { var requiredPositional, returnType, parameters, - t1 = parser.u, + universe = parser.u, head = stack.pop(), optionalPositional = null, named = null; if (typeof head == "number") @@ -3416,18 +3421,18 @@ case -3: head = stack.pop(); if (optionalPositional == null) - optionalPositional = t1.sEA; + optionalPositional = universe.sEA; if (named == null) - named = t1.sEA; - returnType = A._Parser_toType(t1, parser.e, head); + named = universe.sEA; + returnType = A._Parser_toType(universe, parser.e, head); parameters = new A._FunctionParameters(); parameters._requiredPositional = requiredPositional; parameters._optionalPositional = optionalPositional; parameters._named = named; - stack.push(A._Universe__lookupFunctionRti(t1, returnType, parameters)); + stack.push(A._Universe__lookupFunctionRti(universe, returnType, parameters)); return; case -4: - stack.push(A._Universe__lookupRecordRti(t1, stack.pop(), requiredPositional)); + stack.push(A._Universe__lookupRecordRti(universe, stack.pop(), requiredPositional)); return; default: throw A.wrapException(A.AssertionError$("Unexpected state under `()`: " + A.S(head))); @@ -3798,7 +3803,6 @@ return completer._future; }, _asyncAwait(object, bodyFunction) { - bodyFunction.toString; A._awaitOnObject(object, bodyFunction); }, _asyncReturn(object, completer) { @@ -7517,15 +7521,15 @@ _.___Uri_hashCode_FI = _.___Uri_pathSegments_FI = _.___Uri__text_FI = $; }, JSAnyUtilityExtension_instanceOfString(_this, constructorName) { - var parts, $constructor, t1, t2, _i, part; + var parts, $constructor, t1, t2, _i, t3; if (constructorName.length === 0) return false; parts = constructorName.split("."); $constructor = init.G; - for (t1 = parts.length, t2 = type$.nullable_JSObject, _i = 0; _i < t1; ++_i) { - part = parts[_i]; - $constructor = t2._as($constructor[part]); - if ($constructor == null) + for (t1 = parts.length, t2 = type$.nullable_JSObject, _i = 0; _i < t1; ++_i, $constructor = t3) { + t3 = $constructor[parts[_i]]; + t2._as(t3); + if (t3 == null) return false; } return _this instanceof type$.JavaScriptFunction._as($constructor); @@ -7676,10 +7680,10 @@ A.checkTypeBound($T, type$.num, "T", "max"); return Math.max($T._as(a), $T._as(b)); }, - _JSRandom: function _JSRandom() { + Random_Random(seed) { + return B.C__JSRandom; }, - _JSSecureRandom: function _JSSecureRandom(t0) { - this._math$_buffer = t0; + _JSRandom: function _JSRandom() { }, AsyncMemoizer: function AsyncMemoizer(t0, t1) { this._async_memoizer$_completer = t0; @@ -7974,7 +7978,10 @@ t2 = new A.BuiltJsonSerializersBuilder(A.MapBuilder_MapBuilder(t1, t2), A.MapBuilder_MapBuilder(t3, t2), A.MapBuilder_MapBuilder(t3, t2), A.MapBuilder_MapBuilder(type$.FullType, type$.Function), A.ListBuilder_ListBuilder(B.List_empty0, type$.SerializerPlugin)); t2.add$1(0, new A.BigIntSerializer(A.BuiltList_BuiltList$from([B.Type_BigInt_DZK, A.getRuntimeTypeOfDartObject($.$get$_BigIntImpl_zero())], t1))); t2.add$1(0, new A.BoolSerializer(A.BuiltList_BuiltList$from([B.Type_bool_wF1], t1))); + t2.add$1(0, new A.ListSerializer(A.BuiltList_BuiltList$from([B.Type_List_hc9, A.createRuntimeType(A._arrayInstanceType(A._setArrayType([], type$.JSArray_Object)))], t1))); t3 = type$.Object; + t2.add$1(0, new A.MapSerializer(A.BuiltList_BuiltList$from([B.Type_Map_9Aj, A.getRuntimeTypeOfDartObject(A.LinkedHashMap_LinkedHashMap$_empty(t3, t3))], t1))); + t2.add$1(0, new A.SetSerializer(A.BuiltSet_BuiltSet$from([B.Type_Set_tZi, A.getRuntimeTypeOfDartObject(A.LinkedHashSet_LinkedHashSet$_empty(t3))], t1))); t2.add$1(0, new A.BuiltListSerializer(A.BuiltList_BuiltList$from([B.Type_BuiltList_fj6, A.getRuntimeTypeOfDartObject(A.BuiltList_BuiltList$from(B.List_empty0, t3))], t1))); t2.add$1(0, new A.BuiltListMultimapSerializer(A.BuiltList_BuiltList$from([B.Type_BuiltListMultimap_HQW, A.getRuntimeTypeOfDartObject(A.BuiltListMultimap_BuiltListMultimap(t3, t3))], t1))); t2.add$1(0, new A.BuiltMapSerializer(A.BuiltList_BuiltList$from([B.Type_BuiltMap_TeX, A.getRuntimeTypeOfDartObject(A.BuiltMap_BuiltMap(t3, t3))], t1))); @@ -8133,6 +8140,16 @@ JsonObjectSerializer: function JsonObjectSerializer(t0) { this.types = t0; }, + ListSerializer: function ListSerializer(t0) { + this.types = t0; + }, + ListSerializer_serialize_closure: function ListSerializer_serialize_closure(t0, t1) { + this.serializers = t0; + this.elementType = t1; + }, + MapSerializer: function MapSerializer(t0) { + this.types = t0; + }, NullSerializer: function NullSerializer(t0) { this.types = t0; }, @@ -8142,6 +8159,13 @@ RegExpSerializer: function RegExpSerializer(t0) { this.types = t0; }, + SetSerializer: function SetSerializer(t0) { + this.types = t0; + }, + SetSerializer_serialize_closure: function SetSerializer_serialize_closure(t0, t1) { + this.serializers = t0; + this.elementType = t1; + }, StringSerializer: function StringSerializer(t0) { this.types = t0; }, @@ -8745,9 +8769,6 @@ _._finalized = false; }, Response_fromStream(response) { - return A.Response_fromStream$body(response); - }, - Response_fromStream$body(response) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.Response), $async$returnValue, body, t1, t2, t3, t4, t5, t6; @@ -8890,7 +8911,7 @@ break; } message = new A.StringBuffer(""); - t1 = "" + (method + "("); + t1 = method + "("; message._contents = t1; t2 = A._arrayInstanceType(args); t3 = t2._eval$1("SubListIterable<1>"); @@ -9411,7 +9432,8 @@ }, RNG: function RNG() { }, - CryptoRNG: function CryptoRNG() { + MathRNG: function MathRNG(t0) { + this._rnd = t0; }, UuidV1: function UuidV1(t0) { this.goptions = t0; @@ -9461,9 +9483,6 @@ this.handleData = t0; }, BrowserWebSocket_connect(url, protocols) { - return A.BrowserWebSocket_connect$body(url, protocols); - }, - BrowserWebSocket_connect$body(url, protocols) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.BrowserWebSocket), $async$returnValue, t1, t2, t3, t4, webSocket, browserSocket, webSocketConnected; @@ -9479,7 +9498,8 @@ t1 = init.G; t2 = t1.WebSocket; t3 = url.toString$0(0); - t1 = type$.JSArray_nullable_Object._as(new t1.Array()); + t1 = t1.Array; + t1 = type$.JSArray_nullable_Object._as(new t1()); t4 = type$.JSObject; webSocket = t4._as(new t2(t3, t1)); webSocket.binaryType = "arraybuffer"; @@ -9640,9 +9660,6 @@ } }, _authenticateUser(authUrl) { - return A._authenticateUser$body(authUrl); - }, - _authenticateUser$body(authUrl) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.bool), $async$returnValue, response, client; @@ -9693,11 +9710,11 @@ requestId = $event.id; $async$handler = 3; $async$goto = 6; - return A._asyncAwait(manager._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), $async$handleWebSocketHotReloadRequest); + return A._asyncAwait(manager._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), $async$handleWebSocketHotReloadRequest); case 6: // returning from await. $async$goto = 7; - return A._asyncAwait(manager.hotReload$0(), $async$handleWebSocketHotReloadRequest); + return A._asyncAwait(manager.hotReloadEnd$0(), $async$handleWebSocketHotReloadRequest); case 7: // returning from await. A._sendResponse(clientSink, A.hot_reload_response_HotReloadResponse___new_tearOff$closure(), requestId, null, true, type$.HotReloadResponse); @@ -9817,9 +9834,6 @@ this.errorMessage = t2; }, _Debugger_maybeInvokeFlutterDisassemble(_this) { - return A._Debugger_maybeInvokeFlutterDisassemble$body(_this); - }, - _Debugger_maybeInvokeFlutterDisassemble$body(_this) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void), t1; @@ -9848,16 +9862,19 @@ return A._asyncStartSync($async$_Debugger_maybeInvokeFlutterDisassemble, $async$completer); }, DdcLibraryBundleRestarter: function DdcLibraryBundleRestarter() { - this.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = $; + this._capturedHotReloadEndCallback = null; }, DdcLibraryBundleRestarter_restart_closure: function DdcLibraryBundleRestarter_restart_closure(t0, t1) { this.$this = t0; this.readyToRunMain = t1; }, - DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure: function DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure(t0, t1) { + DdcLibraryBundleRestarter_hotReloadStart_closure: function DdcLibraryBundleRestarter_hotReloadStart_closure(t0, t1) { this.xhr = t0; this.completer = t1; }, + DdcLibraryBundleRestarter_hotReloadStart_closure0: function DdcLibraryBundleRestarter_hotReloadStart_closure0(t0) { + this.$this = t0; + }, DdcRestarter: function DdcRestarter() { }, DdcRestarter_restart_closure0: function DdcRestarter_restart_closure0(t0) { @@ -9871,9 +9888,6 @@ this._restarter = t1; }, SdkDeveloperExtension_maybeInvokeFlutterDisassemble(_this) { - return A.SdkDeveloperExtension_maybeInvokeFlutterDisassemble$body(_this); - }, - SdkDeveloperExtension_maybeInvokeFlutterDisassemble$body(_this) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void); var $async$SdkDeveloperExtension_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { @@ -10010,8 +10024,7 @@ throw "Unable to print message: " + String(string); }, JSFunctionUnsafeUtilExtension_callAsConstructor(_this, arg1, $R) { - var t1 = [arg1]; - return $R._as(A.callConstructor(_this, t1, type$.JSObject)); + return $R._as(A.callConstructor(_this, [arg1], type$.JSObject)); }, groupBy(values, key, $S, $T) { var t1, _i, element, t2, t3, @@ -10372,7 +10385,6 @@ return new A.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(2)")._as(f), t1._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(receiver, f) { - f.toString; return this.map$1$1(receiver, f, type$.dynamic); }, join$1(receiver, separator) { @@ -10594,7 +10606,6 @@ return -1; }, indexWhere$1(receiver, test) { - test.toString; return this.indexWhere$2(receiver, test, 0); }, get$runtimeType(receiver) { @@ -10605,6 +10616,24 @@ $isIterable: 1, $isList: 1 }; + J.JSArraySafeToStringHook.prototype = { + tryFormat$1(array) { + var flags, info, base; + if (!Array.isArray(array)) + return null; + flags = array.$flags | 0; + if ((flags & 4) !== 0) + info = "const, "; + else if ((flags & 2) !== 0) + info = "unmodifiable, "; + else + info = (flags & 1) !== 0 ? "fixed, " : ""; + base = "Instance of '" + A.Primitives_objectTypeName(array) + "'"; + if (info === "") + return base; + return base + " (" + info + "length: " + array.length + ")"; + } + }; J.JSUnmodifiableArray.prototype = {}; J.ArrayIterator.prototype = { get$current() { @@ -11220,7 +11249,6 @@ return new A.MappedListIterable(this, t1._bind$1($T)._eval$1("1(ListIterable.E)")._as(toElement), t1._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, reduce$1(_, combine) { @@ -11416,7 +11444,6 @@ return new A.MappedIterable(this, t1._bind$1($T)._eval$1("1(2)")._as(toElement), t1._eval$1("@<1>")._bind$1($T)._eval$1("MappedIterable<1,2>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); } }; @@ -11554,7 +11581,6 @@ return new A.EmptyIterable($T._eval$1("EmptyIterable<0>")); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, skip$1(_, count) { @@ -11566,8 +11592,11 @@ return this; }, toList$1$growable(_, growable) { - var t1 = J.JSArray_JSArray$fixed(0, this.$ti._precomputed1); - return t1; + var t1 = this.$ti._precomputed1; + return growable ? J.JSArray_JSArray$growable(0, t1) : J.JSArray_JSArray$fixed(0, t1); + }, + toList$0(_) { + return this.toList$1$growable(0, true); } }; A.EmptyIterator.prototype = { @@ -11638,7 +11667,6 @@ } }; A.__CastListBase__CastIterableBase_ListMixin.prototype = {}; - A._Record_2_libraries_sources.prototype = {$recipe: "+libraries,sources(1,2)", $shape: 2}; A.ConstantMap.prototype = { cast$2$0(_, RK, RV) { var t1 = A._instanceType(this); @@ -11663,7 +11691,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, $isMap: 1 @@ -11772,6 +11799,7 @@ return A.instantiatedGenericFunctionType(A.closureFunctionType(this._genericClosure), this.$ti); } }; + A.SafeToStringHook.prototype = {}; A.TypeErrorDecoder.prototype = { matchTypeError$1(message) { var result, t1, _this = this, @@ -12261,7 +12289,7 @@ call$2(o, tag) { return this.getUnknownTag(o, tag); }, - $signature: 66 + $signature: 83 }; A.initHooks_closure1.prototype = { call$1(tag) { @@ -12269,82 +12297,7 @@ }, $signature: 90 }; - A._Record.prototype = { - get$runtimeType(_) { - return A.createRuntimeType(this._getRti$0()); - }, - _getRti$0() { - return A.evaluateRtiForRecord(this.$recipe, this._getFieldValues$0()); - }, - toString$0(_) { - return this._toString$1(false); - }, - _toString$1(safe) { - var t2, separator, i, key, value, - keys = this._fieldKeys$0(), - values = this._getFieldValues$0(), - t1 = (safe ? "" + "Record " : "") + "("; - for (t2 = keys.length, separator = "", i = 0; i < t2; ++i, separator = ", ") { - t1 += separator; - key = keys[i]; - if (typeof key == "string") - t1 = t1 + key + ": "; - if (!(i < values.length)) - return A.ioore(values, i); - value = values[i]; - t1 = safe ? t1 + A.Primitives_safeToString(value) : t1 + A.S(value); - } - t1 += ")"; - return t1.charCodeAt(0) == 0 ? t1 : t1; - }, - _fieldKeys$0() { - var t1, - shapeTag = this.$shape; - for (; $._Record__computedFieldKeys.length <= shapeTag;) - B.JSArray_methods.add$1($._Record__computedFieldKeys, null); - t1 = $._Record__computedFieldKeys[shapeTag]; - if (t1 == null) { - t1 = this._computeFieldKeys$0(); - B.JSArray_methods.$indexSet($._Record__computedFieldKeys, shapeTag, t1); - } - return t1; - }, - _computeFieldKeys$0() { - var i, names, last, - recipe = this.$recipe, - position = recipe.indexOf("("), - joinedNames = recipe.substring(1, position), - fields = recipe.substring(position), - arity = fields === "()" ? 0 : fields.replace(/[^,]/g, "").length + 1, - t1 = type$.Object, - result = J.JSArray_JSArray$allocateGrowable(arity, t1); - for (i = 0; i < arity; ++i) - result[i] = i; - if (joinedNames !== "") { - names = joinedNames.split(","); - i = names.length; - for (last = arity; i > 0;) { - --last; - --i; - B.JSArray_methods.$indexSet(result, last, names[i]); - } - } - return A.List_List$unmodifiable(result, t1); - } - }; - A._Record2.prototype = { - _getFieldValues$0() { - return [this._0, this._1]; - }, - $eq(_, other) { - if (other == null) - return false; - return other instanceof A._Record2 && this.$shape === other.$shape && J.$eq$(this._0, other._0) && J.$eq$(this._1, other._1); - }, - get$hashCode(_) { - return A.Object_hash(this.$shape, this._0, this._1, B.C_SentinelValue); - } - }; + A._Record.prototype = {}; A.JSSyntaxRegExp.prototype = { toString$0(_) { return "RegExp/" + this.pattern + "/" + this._nativeRegExp.flags; @@ -12561,20 +12514,11 @@ get$runtimeType(receiver) { return B.Type_ByteBuffer_rqD; }, - asUint8List$2(receiver, offsetInBytes, $length) { - return $length == null ? new Uint8Array(receiver, offsetInBytes) : new Uint8Array(receiver, offsetInBytes, $length); - }, $isTrustedGetRuntimeType: 1, $isNativeByteBuffer: 1, $isByteBuffer: 1 }; A.NativeTypedData.prototype = { - get$buffer(receiver) { - if (((receiver.$flags | 0) & 2) !== 0) - return new A._UnmodifiableNativeByteBufferView(receiver.buffer); - else - return receiver.buffer; - }, _invalidPosition$3(receiver, position, $length, $name) { var t1 = A.RangeError$range(position, 0, $length, $name, null); throw A.wrapException(t1); @@ -12584,14 +12528,6 @@ this._invalidPosition$3(receiver, position, $length, $name); } }; - A._UnmodifiableNativeByteBufferView.prototype = { - asUint8List$2(_, offsetInBytes, $length) { - var result = A.NativeUint8List_NativeUint8List$view(this.__native_typed_data$_data, offsetInBytes, $length); - result.$flags = 3; - return result; - }, - $isByteBuffer: 1 - }; A.NativeByteData.prototype = { get$runtimeType(receiver) { return B.Type_ByteData_9dB; @@ -12855,7 +12791,7 @@ t2 = this.span; t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); }, - $signature: 61 + $signature: 63 }; A._AsyncRun__scheduleImmediateJsOverride_internalCallback.prototype = { call$0() { @@ -12961,7 +12897,7 @@ call$2(error, stackTrace) { this.bodyFunction.call$2(1, new A.ExceptionAndStackTrace(error, type$.StackTrace._as(stackTrace))); }, - $signature: 52 + $signature: 53 }; A._wrapJsFunctionForAsync_closure.prototype = { call$2(errorCode, result) { @@ -13096,7 +13032,6 @@ return result; }, then$1$1(f, $R) { - f.toString; return this.then$1$2$onError(f, null, $R); }, _thenAwait$1$2(f, onError, $E) { @@ -13475,7 +13410,6 @@ return new A._MapStream(t1._bind$1($S)._eval$1("1(Stream.T)")._as(convert), this, t1._eval$1("@")._bind$1($S)._eval$1("_MapStream<1,2>")); }, map$1(_, convert) { - convert.toString; return this.map$1$1(0, convert, type$.dynamic); }, get$length(_) { @@ -14778,7 +14712,7 @@ t2._processUncaughtError$3(zone, type$.Object._as(e), t1._as(s)); } }, - $signature: 63 + $signature: 66 }; A._HashMap.prototype = { get$length(_) { @@ -15485,7 +15419,6 @@ return new A.MappedListIterable(receiver, t1._bind$1($T)._eval$1("1(ListBase.E)")._as(f), t1._eval$1("@")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(receiver, f) { - f.toString; return this.map$1$1(receiver, f, type$.dynamic); }, skip$1(receiver, count) { @@ -15611,7 +15544,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, containsKey$1(key) { @@ -15689,7 +15621,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, $isMap: 1 @@ -15848,7 +15779,6 @@ return new A.EfficientLengthMappedIterable(this, t1._bind$1($T)._eval$1("1(2)")._as(f), t1._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, toString$0(_) { @@ -17798,7 +17728,6 @@ return A.MappedIterable_MappedIterable(this, t1._bind$1($T)._eval$1("1(Iterable.E)")._as(toElement), t1._eval$1("Iterable.E"), $T); }, map$1(_, toElement) { - toElement.toString; return this.map$1$1(0, toElement, type$.dynamic); }, contains$1(_, element) { @@ -17920,13 +17849,13 @@ call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); }, - $signature: 56 + $signature: 61 }; A.Uri_parseIPv6Address_error.prototype = { call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - $signature: 53 + $signature: 56 }; A.Uri_parseIPv6Address_parseHex.prototype = { call$2(start, end) { @@ -17946,7 +17875,7 @@ value = _this.___Uri__text_FI; if (value === $) { t1 = _this.scheme; - t2 = t1.length !== 0 ? "" + t1 + ":" : ""; + t2 = t1.length !== 0 ? t1 + ":" : ""; t3 = _this._host; t4 = t3 == null; if (!t4 || t1 === "file") { @@ -18189,7 +18118,7 @@ A.throwExpression(A.UnsupportedError$(string$.Cannotn)); pathSegments = _this.get$pathSegments(); A._Uri__checkNonWindowsPathReservedCharacters(pathSegments, false); - t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "" + "/" : "", pathSegments, "/"); + t1 = A.StringBuffer__writeAll(B.JSString_methods.startsWith$1(_this.path, "/") ? "/" : "", pathSegments, "/"); t1 = t1.charCodeAt(0) == 0 ? t1 : t1; return t1; }, @@ -18591,7 +18520,7 @@ t1.call(t1, wrapper); return wrapper; }, - $signature: 50 + $signature: 52 }; A.FutureOfVoidToJSPromise_get_toJS_closure.prototype = { call$2(resolve, reject) { @@ -18605,7 +18534,7 @@ var t1 = this.resolve; return t1.call(t1); }, - $signature: 46 + $signature: 50 }; A.FutureOfVoidToJSPromise_get_toJS__closure0.prototype = { call$2(error, stackTrace) { @@ -18725,44 +18654,10 @@ A._JSRandom.prototype = { nextInt$1(max) { if (max <= 0 || max > 4294967296) - throw A.wrapException(A.RangeError$(string$.max_mu + max)); + throw A.wrapException(A.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max)); return Math.random() * max >>> 0; - } - }; - A._JSSecureRandom.prototype = { - _JSSecureRandom$0() { - var $crypto = self.crypto; - if ($crypto != null) - if ($crypto.getRandomValues != null) - return; - throw A.wrapException(A.UnsupportedError$("No source of cryptographically secure random numbers available.")); }, - nextInt$1(max) { - var byteCount, t1, start, randomLimit, t2, t3, random, result; - if (max <= 0 || max > 4294967296) - throw A.wrapException(A.RangeError$(string$.max_mu + max)); - if (max > 255) - if (max > 65535) - byteCount = max > 16777215 ? 4 : 3; - else - byteCount = 2; - else - byteCount = 1; - t1 = this._math$_buffer; - t1.$flags & 2 && A.throwUnsupportedOperation(t1, 11); - t1.setUint32(0, 0, false); - start = 4 - byteCount; - randomLimit = A._asInt(Math.pow(256, byteCount)); - for (t2 = max - 1, t3 = (max & t2) >>> 0 === 0; true;) { - crypto.getRandomValues(J.asUint8List$2$x(B.NativeByteData_methods.get$buffer(t1), start, byteCount)); - random = t1.getUint32(0, false); - if (t3) - return (random & t2) >>> 0; - result = random % max; - if (random - result + max < randomLimit) - return result; - } - } + $isRandom: 1 }; A.AsyncMemoizer.prototype = {}; A.DelegatingStreamSink.prototype = { @@ -18925,7 +18820,7 @@ call$2(h, i) { return A._combine(A._asInt(h), J.get$hashCode$(i)); }, - $signature: 42 + $signature: 46 }; A.BuiltList.prototype = { toBuilder$0() { @@ -18976,7 +18871,6 @@ return new A.MappedListIterable(t1, t2._bind$1($T)._eval$1("1(2)")._as(this.$ti._bind$1($T)._eval$1("1(2)")._as(f)), t2._eval$1("@<1>")._bind$1($T)._eval$1("MappedListIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, contains$1(_, element) { @@ -19527,7 +19421,6 @@ return new A.EfficientLengthMappedIterable(t1, t2._bind$1($T)._eval$1("1(2)")._as(this.$ti._bind$1($T)._eval$1("1(2)")._as(f)), t2._eval$1("@<1>")._bind$1($T)._eval$1("EfficientLengthMappedIterable<1,2>")); }, map$1(_, f) { - f.toString; return this.map$1$1(0, f, type$.dynamic); }, contains$1(_, element) { @@ -19852,14 +19745,13 @@ }; A.newBuiltValueToStringHelper_closure.prototype = { call$1(className) { - var t1 = new A.StringBuffer(""), - t2 = "" + className; - t1._contents = t2; - t1._contents = t2 + " {\n"; + var t1 = new A.StringBuffer(""); + t1._contents = className; + t1._contents = className + " {\n"; $._indentingBuiltValueToStringHelperIndent = $._indentingBuiltValueToStringHelperIndent + 2; return new A.IndentingBuiltValueToStringHelper(t1); }, - $signature: 39 + $signature: 42 }; A.IndentingBuiltValueToStringHelper.prototype = { add$2(_, field, value) { @@ -19992,21 +19884,21 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.Object); }, - $signature: 38 + $signature: 39 }; A.Serializers_Serializers_closure0.prototype = { call$0() { var t1 = type$.Object; return A.ListMultimapBuilder_ListMultimapBuilder(t1, t1); }, - $signature: 36 + $signature: 38 }; A.Serializers_Serializers_closure1.prototype = { call$0() { var t1 = type$.Object; return A.MapBuilder_MapBuilder(t1, t1); }, - $signature: 34 + $signature: 36 }; A.Serializers_Serializers_closure2.prototype = { call$0() { @@ -20666,7 +20558,7 @@ throw A.wrapException(A.ArgumentError$("odd length", null)); for (t3 = result.$ti, t4 = t3._precomputed1, t5 = t3._rest[1], t6 = t3._eval$1("BuiltSet<2>"), t3 = t3._eval$1("Map<1,BuiltSet<2>>"), i = 0; i !== t2.get$length(serialized); i += 2) { key = serializers.deserialize$2$specifiedType(t2.elementAt$1(serialized, i), keyType); - for (t7 = J.get$iterator$ax(t1._as(J.map$1$ax(t2.elementAt$1(serialized, i + 1), new A.BuiltSetMultimapSerializer_deserialize_closure(serializers, valueType)))); t7.moveNext$0();) { + for (t7 = t1._as(J.map$1$ax(t2.elementAt$1(serialized, i + 1), new A.BuiltSetMultimapSerializer_deserialize_closure(serializers, valueType))), t7 = t7.get$iterator(t7); t7.moveNext$0();) { value = t7.get$current(); t4._as(key); t5._as(value); @@ -20960,6 +20852,143 @@ return "JsonObject"; } }; + A.ListSerializer.prototype = { + serialize$3$specifiedType(serializers, list, specifiedType) { + var t1, t2, elementType; + type$.List_dynamic._as(list); + if (!(specifiedType.root == null || specifiedType.parameters.length === 0)) + if (!serializers.builderFactories._map$_map.containsKey$1(specifiedType)) + serializers._throwMissingBuilderFactory$1(specifiedType); + t1 = specifiedType.parameters; + t2 = t1.length; + if (t2 === 0) + elementType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + elementType = t1[0]; + } + return J.map$1$1$ax(list, new A.ListSerializer_serialize_closure(serializers, elementType), type$.nullable_Object); + }, + serialize$2(serializers, list) { + return this.serialize$3$specifiedType(serializers, list, B.FullType_null_List_empty_false); + }, + deserialize$3$specifiedType(serializers, serialized, specifiedType) { + var isUnderspecified, t1, t2, elementType, result; + type$.Iterable_dynamic._as(serialized); + isUnderspecified = specifiedType.root == null || specifiedType.parameters.length === 0; + t1 = specifiedType.parameters; + t2 = t1.length; + if (t2 === 0) + elementType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + elementType = t1[0]; + } + result = isUnderspecified ? A._setArrayType([], type$.JSArray_Object) : type$.List_dynamic._as(serializers.newBuilder$1(specifiedType)); + for (t1 = J.get$iterator$ax(serialized), t2 = J.getInterceptor$ax(result); t1.moveNext$0();) + t2.add$1(result, serializers.deserialize$2$specifiedType(t1.get$current(), elementType)); + return result; + }, + deserialize$2(serializers, serialized) { + return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); + }, + $isSerializer: 1, + $isStructuredSerializer: 1, + get$types() { + return this.types; + }, + get$wireName() { + return "List"; + } + }; + A.ListSerializer_serialize_closure.prototype = { + call$1(item) { + return this.serializers.serialize$2$specifiedType(item, this.elementType); + }, + $signature: 3 + }; + A.MapSerializer.prototype = { + serialize$3$specifiedType(serializers, $Map, specifiedType) { + var t1, t2, t3, keyType, valueType, result, key; + type$.Map_dynamic_dynamic._as($Map); + if (!(specifiedType.root == null || specifiedType.parameters.length === 0)) + if (!serializers.builderFactories._map$_map.containsKey$1(specifiedType)) + serializers._throwMissingBuilderFactory$1(specifiedType); + t1 = specifiedType.parameters; + t2 = t1.length; + t3 = t2 === 0; + if (t3) + keyType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + keyType = t1[0]; + } + if (t3) + valueType = B.FullType_null_List_empty_false; + else { + if (1 >= t2) + return A.ioore(t1, 1); + valueType = t1[1]; + } + result = []; + for (t1 = $Map.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) { + key = t1.get$current(); + result.push(serializers.serialize$2$specifiedType(key, keyType)); + result.push(serializers.serialize$2$specifiedType($Map.$index(0, key), valueType)); + } + return result; + }, + serialize$2(serializers, $Map) { + return this.serialize$3$specifiedType(serializers, $Map, B.FullType_null_List_empty_false); + }, + deserialize$3$specifiedType(serializers, serialized, specifiedType) { + var isUnderspecified, t1, t2, t3, keyType, valueType, result, i; + type$.Iterable_dynamic._as(serialized); + isUnderspecified = specifiedType.root == null || specifiedType.parameters.length === 0; + t1 = specifiedType.parameters; + t2 = t1.length; + t3 = t2 === 0; + if (t3) + keyType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + keyType = t1[0]; + } + if (t3) + valueType = B.FullType_null_List_empty_false; + else { + if (1 >= t2) + return A.ioore(t1, 1); + valueType = t1[1]; + } + if (isUnderspecified) { + t1 = type$.Object; + result = A.LinkedHashMap_LinkedHashMap$_empty(t1, t1); + } else + result = type$.Map_dynamic_dynamic._as(serializers.newBuilder$1(specifiedType)); + t1 = J.getInterceptor$asx(serialized); + if (B.JSInt_methods.$mod(t1.get$length(serialized), 2) === 1) + throw A.wrapException(A.ArgumentError$("odd length", null)); + for (i = 0; i !== t1.get$length(serialized); i += 2) + result.$indexSet(0, serializers.deserialize$2$specifiedType(t1.elementAt$1(serialized, i), keyType), serializers.deserialize$2$specifiedType(t1.elementAt$1(serialized, i + 1), valueType)); + return result; + }, + deserialize$2(serializers, serialized) { + return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); + }, + $isSerializer: 1, + $isStructuredSerializer: 1, + get$types() { + return this.types; + }, + get$wireName() { + return "Map"; + } + }; A.NullSerializer.prototype = { serialize$3$specifiedType(serializers, value, specifiedType) { type$.Null._as(value); @@ -21041,6 +21070,63 @@ return "RegExp"; } }; + A.SetSerializer.prototype = { + serialize$3$specifiedType(serializers, set, specifiedType) { + var t1, t2, elementType; + type$.Set_dynamic._as(set); + if (!(specifiedType.root == null || specifiedType.parameters.length === 0)) + if (!serializers.builderFactories._map$_map.containsKey$1(specifiedType)) + serializers._throwMissingBuilderFactory$1(specifiedType); + t1 = specifiedType.parameters; + t2 = t1.length; + if (t2 === 0) + elementType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + elementType = t1[0]; + } + return set.map$1$1(0, new A.SetSerializer_serialize_closure(serializers, elementType), type$.nullable_Object); + }, + serialize$2(serializers, set) { + return this.serialize$3$specifiedType(serializers, set, B.FullType_null_List_empty_false); + }, + deserialize$3$specifiedType(serializers, serialized, specifiedType) { + var isUnderspecified, t1, t2, elementType, result; + type$.Iterable_dynamic._as(serialized); + isUnderspecified = specifiedType.root == null || specifiedType.parameters.length === 0; + t1 = specifiedType.parameters; + t2 = t1.length; + if (t2 === 0) + elementType = B.FullType_null_List_empty_false; + else { + if (0 >= t2) + return A.ioore(t1, 0); + elementType = t1[0]; + } + result = isUnderspecified ? A.LinkedHashSet_LinkedHashSet$_empty(type$.Object) : type$.Set_dynamic._as(serializers.newBuilder$1(specifiedType)); + for (t1 = J.get$iterator$ax(serialized); t1.moveNext$0();) + result.add$1(0, serializers.deserialize$2$specifiedType(t1.get$current(), elementType)); + return result; + }, + deserialize$2(serializers, serialized) { + return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); + }, + $isSerializer: 1, + $isStructuredSerializer: 1, + get$types() { + return this.types; + }, + get$wireName() { + return "Set"; + } + }; + A.SetSerializer_serialize_closure.prototype = { + call$1(item) { + return this.serializers.serialize$2$specifiedType(item, this.elementType); + }, + $signature: 3 + }; A.StringSerializer.prototype = { serialize$3$specifiedType(serializers, string, specifiedType) { return A._asString(string); @@ -21157,7 +21243,6 @@ }, map$1(_, transform) { var t1 = type$.dynamic; - transform.toString; return this.map$2$1(0, transform, t1, t1); }, toString$0(_) { @@ -21566,7 +21651,6 @@ }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { var t1, t2, value, $$v, _$result, - _s11_ = "BuildResult", result = new A.BuildResultBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); for (t1 = type$.BuildStatus; iterator.moveNext$0();) { @@ -21590,13 +21674,7 @@ } } _$result = result._build_result$_$v; - if (_$result == null) { - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_build_result$_$this()._status, _s11_, "status", t1); - _$result = new A._$BuildResult(t2); - A.BuiltValueNullFieldError_checkNotNull(t2, _s11_, "status", t1); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.BuildResult); - return result._build_result$_$v = _$result; + return result._build_result$_$v = _$result == null ? new A._$BuildResult(A.BuiltValueNullFieldError_checkNotNull(result.get$_build_result$_$this()._status, "BuildResult", "status", t1)) : _$result; }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -21727,22 +21805,13 @@ return _this; }, _connect_request$_build$0() { - var t1, t2, t3, t4, _this = this, + var t1, _this = this, _s14_ = "ConnectRequest", - _s10_ = "instanceId", - _s14_0 = "entrypointPath", _$result = _this._connect_request$_$v; if (_$result == null) { t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._connect_request$_appId, _s14_, "appId", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._instanceId, _s14_, _s10_, t1); - t4 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._entrypointPath, _s14_, _s14_0, t1); - _$result = new A._$ConnectRequest(t2, t3, t4); - A.BuiltValueNullFieldError_checkNotNull(t2, _s14_, "appId", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s14_, _s10_, t1); - A.BuiltValueNullFieldError_checkNotNull(t4, _s14_, _s14_0, t1); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.ConnectRequest); + _$result = new A._$ConnectRequest(A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._connect_request$_appId, _s14_, "appId", t1), A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._instanceId, _s14_, "instanceId", t1), A.BuiltValueNullFieldError_checkNotNull(_this.get$_connect_request$_$this()._entrypointPath, _s14_, "entrypointPath", t1)); + } return _this._connect_request$_$v = _$result; } }; @@ -21907,23 +21976,13 @@ return _this; }, _debug_event$_build$0() { - var t1, t2, t3, t4, t5, _this = this, + var t1, _this = this, _s10_ = "DebugEvent", - _s9_ = "eventData", - _s9_0 = "timestamp", _$result = _this._debug_event$_$v; if (_$result == null) { t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._debug_event$_kind, _s10_, "kind", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._eventData, _s10_, _s9_, t1); - t4 = type$.int; - t5 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._timestamp, _s10_, _s9_0, t4); - _$result = new A._$DebugEvent(t2, t3, t5); - A.BuiltValueNullFieldError_checkNotNull(t2, _s10_, "kind", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s10_, _s9_, t1); - A.BuiltValueNullFieldError_checkNotNull(t5, _s10_, _s9_0, t4); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.DebugEvent); + _$result = new A._$DebugEvent(A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._debug_event$_kind, _s10_, "kind", t1), A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._eventData, _s10_, "eventData", t1), A.BuiltValueNullFieldError_checkNotNull(_this.get$_debug_event$_$this()._timestamp, _s10_, "timestamp", type$.int)); + } return _this._debug_event$_$v = _$result; } }; @@ -21968,17 +22027,10 @@ return _this; }, _debug_event$_build$0() { - var _$failedField, e, _$result0, t1, exception, t2, _this = this, - _s18_ = "BatchedDebugEvents", - _$result = null; + var _$failedField, e, _$result0, exception, t1, _this = this, _$result = null; try { _$result0 = _this._debug_event$_$v; - if (_$result0 == null) { - t1 = _this.get$events().build$0(); - _$result0 = new A._$BatchedDebugEvents(t1); - A.BuiltValueNullFieldError_checkNotNull(t1, _s18_, "events", type$.BuiltList_DebugEvent); - } - _$result = _$result0; + _$result = _$result0 == null ? new A._$BatchedDebugEvents(_this.get$events().build$0()) : _$result0; } catch (exception) { _$failedField = A._Cell$named("_$failedField"); try { @@ -21986,15 +22038,12 @@ _this.get$events().build$0(); } catch (exception) { e = A.unwrapException(exception); - t1 = A.BuiltValueNestedFieldError$(_s18_, _$failedField.readLocal$0(), J.toString$0$(e)); + t1 = A.BuiltValueNestedFieldError$("BatchedDebugEvents", _$failedField.readLocal$0(), J.toString$0$(e)); throw A.wrapException(t1); } throw exception; } - t1 = type$.BatchedDebugEvents; - t2 = t1._as(_$result); - A.ArgumentError_checkNotNull(t2, "other", t1); - _this._debug_event$_$v = t2; + _this._debug_event$_$v = type$.BatchedDebugEvents._as(_$result); return _$result; }, set$_events(_events) { @@ -22214,10 +22263,7 @@ _build$0() { var _this = this, _$result = _this._$v; - if (_$result == null) - _$result = new A._$DebugInfo(_this.get$_$this()._appEntrypointPath, _this.get$_$this()._appId, _this.get$_$this()._appInstanceId, _this.get$_$this()._appOrigin, _this.get$_$this()._appUrl, _this.get$_$this()._authUrl, _this.get$_$this()._dwdsVersion, _this.get$_$this()._extensionUrl, _this.get$_$this()._isInternalBuild, _this.get$_$this()._isFlutterApp, _this.get$_$this()._workspaceName, _this.get$_$this()._tabUrl, _this.get$_$this()._tabId); - A.ArgumentError_checkNotNull(_$result, "other", type$.DebugInfo); - return _this._$v = _$result; + return _this._$v = _$result == null ? new A._$DebugInfo(_this.get$_$this()._appEntrypointPath, _this.get$_$this()._appId, _this.get$_$this()._appInstanceId, _this.get$_$this()._appOrigin, _this.get$_$this()._appUrl, _this.get$_$this()._authUrl, _this.get$_$this()._dwdsVersion, _this.get$_$this()._extensionUrl, _this.get$_$this()._isInternalBuild, _this.get$_$this()._isFlutterApp, _this.get$_$this()._workspaceName, _this.get$_$this()._tabUrl, _this.get$_$this()._tabId) : _$result; } }; A.DevToolsRequest.prototype = {}; @@ -22323,8 +22369,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, _$result, t2, t3, - _s15_ = "promptExtension", + var t1, value, _$result, _s16_ = "DevToolsResponse", result = new A.DevToolsResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); @@ -22356,13 +22401,8 @@ _$result = result._devtools_request$_$v; if (_$result == null) { t1 = type$.bool; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_devtools_request$_$this()._success, _s16_, "success", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(result.get$_devtools_request$_$this()._promptExtension, _s16_, _s15_, t1); - _$result = new A._$DevToolsResponse(t2, t3, result.get$_devtools_request$_$this()._error); - A.BuiltValueNullFieldError_checkNotNull(t2, _s16_, "success", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s16_, _s15_, t1); + _$result = new A._$DevToolsResponse(A.BuiltValueNullFieldError_checkNotNull(result.get$_devtools_request$_$this()._success, _s16_, "success", t1), A.BuiltValueNullFieldError_checkNotNull(result.get$_devtools_request$_$this()._promptExtension, _s16_, "promptExtension", t1), result.get$_devtools_request$_$this()._error); } - A.ArgumentError_checkNotNull(_$result, "other", type$.DevToolsResponse); return result._devtools_request$_$v = _$result; }, deserialize$2(serializers, serialized) { @@ -22419,19 +22459,13 @@ return _this; }, _devtools_request$_build$0() { - var t1, t2, t3, _this = this, + var t1, _this = this, _s15_ = "DevToolsRequest", - _s10_ = "instanceId", _$result = _this._devtools_request$_$v; if (_$result == null) { t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_devtools_request$_$this()._devtools_request$_appId, _s15_, "appId", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_devtools_request$_$this()._devtools_request$_instanceId, _s15_, _s10_, t1); - _$result = new A._$DevToolsRequest(t2, t3, _this.get$_devtools_request$_$this()._contextId, _this.get$_devtools_request$_$this()._devtools_request$_tabUrl, _this.get$_devtools_request$_$this()._uriOnly, _this.get$_devtools_request$_$this()._devtools_request$_client); - A.BuiltValueNullFieldError_checkNotNull(t2, _s15_, "appId", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s15_, _s10_, t1); + _$result = new A._$DevToolsRequest(A.BuiltValueNullFieldError_checkNotNull(_this.get$_devtools_request$_$this()._devtools_request$_appId, _s15_, "appId", t1), A.BuiltValueNullFieldError_checkNotNull(_this.get$_devtools_request$_$this()._devtools_request$_instanceId, _s15_, "instanceId", t1), _this.get$_devtools_request$_$this()._contextId, _this.get$_devtools_request$_$this()._devtools_request$_tabUrl, _this.get$_devtools_request$_$this()._uriOnly, _this.get$_devtools_request$_$this()._devtools_request$_client); } - A.ArgumentError_checkNotNull(_$result, "other", type$.DevToolsRequest); return _this._devtools_request$_$v = _$result; } }; @@ -22482,8 +22516,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, $$v, _$result, t2, t3, - _s10_ = "stackTrace", + var t1, value, $$v, _$result, _s13_ = "ErrorResponse", result = new A.ErrorResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); @@ -22523,13 +22556,8 @@ _$result = result._error_response$_$v; if (_$result == null) { t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_error_response$_$this()._error_response$_error, _s13_, "error", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(result.get$_error_response$_$this()._error_response$_stackTrace, _s13_, _s10_, t1); - _$result = new A._$ErrorResponse(t2, t3); - A.BuiltValueNullFieldError_checkNotNull(t2, _s13_, "error", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s13_, _s10_, t1); + _$result = new A._$ErrorResponse(A.BuiltValueNullFieldError_checkNotNull(result.get$_error_response$_$this()._error_response$_error, _s13_, "error", t1), A.BuiltValueNullFieldError_checkNotNull(result.get$_error_response$_$this()._error_response$_stackTrace, _s13_, "stackTrace", t1)); } - A.ArgumentError_checkNotNull(_$result, "other", type$.ErrorResponse); return result._error_response$_$v = _$result; }, deserialize$2(serializers, serialized) { @@ -22595,7 +22623,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, _$result, t2, t3, t4, + var t1, value, _$result, _s16_ = "ExtensionRequest", result = new A.ExtensionRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); @@ -22625,17 +22653,7 @@ } } _$result = result._extension_request$_$v; - if (_$result == null) { - t1 = type$.int; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._id, _s16_, "id", t1); - t3 = type$.String; - t4 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._command, _s16_, "command", t3); - _$result = new A._$ExtensionRequest(t2, t4, result.get$_extension_request$_$this()._commandParams); - A.BuiltValueNullFieldError_checkNotNull(t2, _s16_, "id", t1); - A.BuiltValueNullFieldError_checkNotNull(t4, _s16_, "command", t3); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.ExtensionRequest); - return result._extension_request$_$v = _$result; + return result._extension_request$_$v = _$result == null ? new A._$ExtensionRequest(A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._id, _s16_, "id", type$.int), A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._command, _s16_, "command", type$.String), result.get$_extension_request$_$this()._commandParams) : _$result; }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -22665,7 +22683,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, _$result, t2, t3, t4, t5, t6, + var t1, value, _$result, _s17_ = "ExtensionResponse", result = new A.ExtensionResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); @@ -22701,20 +22719,7 @@ } } _$result = result._extension_request$_$v; - if (_$result == null) { - t1 = type$.int; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._id, _s17_, "id", t1); - t3 = type$.bool; - t4 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_success, _s17_, "success", t3); - t5 = type$.String; - t6 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_result, _s17_, "result", t5); - _$result = new A._$ExtensionResponse(t2, t4, t6, result.get$_extension_request$_$this()._extension_request$_error); - A.BuiltValueNullFieldError_checkNotNull(t2, _s17_, "id", t1); - A.BuiltValueNullFieldError_checkNotNull(t4, _s17_, "success", t3); - A.BuiltValueNullFieldError_checkNotNull(t6, _s17_, "result", t5); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.ExtensionResponse); - return result._extension_request$_$v = _$result; + return result._extension_request$_$v = _$result == null ? new A._$ExtensionResponse(A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._id, _s17_, "id", type$.int), A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_success, _s17_, "success", type$.bool), A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_result, _s17_, "result", type$.String), result.get$_extension_request$_$this()._extension_request$_error) : _$result; }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -22737,7 +22742,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, $$v, _$result, t2, t3, + var t1, value, $$v, _$result, _s14_ = "ExtensionEvent", result = new A.ExtensionEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); @@ -22777,13 +22782,8 @@ _$result = result._extension_request$_$v; if (_$result == null) { t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._params, _s14_, "params", t1); - t3 = A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_method, _s14_, "method", t1); - _$result = new A._$ExtensionEvent(t2, t3); - A.BuiltValueNullFieldError_checkNotNull(t2, _s14_, "params", t1); - A.BuiltValueNullFieldError_checkNotNull(t3, _s14_, "method", t1); + _$result = new A._$ExtensionEvent(A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._params, _s14_, "params", t1), A.BuiltValueNullFieldError_checkNotNull(result.get$_extension_request$_$this()._extension_request$_method, _s14_, "method", t1)); } - A.ArgumentError_checkNotNull(_$result, "other", type$.ExtensionEvent); return result._extension_request$_$v = _$result; }, deserialize$2(serializers, serialized) { @@ -23019,17 +23019,10 @@ return t1; }, _extension_request$_build$0() { - var _$failedField, e, _$result0, t1, exception, t2, _this = this, - _s13_ = "BatchedEvents", - _$result = null; + var _$failedField, e, _$result0, exception, t1, _this = this, _$result = null; try { _$result0 = _this._extension_request$_$v; - if (_$result0 == null) { - t1 = _this.get$events().build$0(); - _$result0 = new A._$BatchedEvents(t1); - A.BuiltValueNullFieldError_checkNotNull(t1, _s13_, "events", type$.BuiltList_ExtensionEvent); - } - _$result = _$result0; + _$result = _$result0 == null ? new A._$BatchedEvents(_this.get$events().build$0()) : _$result0; } catch (exception) { _$failedField = A._Cell$named("_$failedField"); try { @@ -23037,15 +23030,12 @@ _this.get$events().build$0(); } catch (exception) { e = A.unwrapException(exception); - t1 = A.BuiltValueNestedFieldError$(_s13_, _$failedField.readLocal$0(), J.toString$0$(e)); + t1 = A.BuiltValueNestedFieldError$("BatchedEvents", _$failedField.readLocal$0(), J.toString$0$(e)); throw A.wrapException(t1); } throw exception; } - t1 = type$.BatchedEvents; - t2 = t1._as(_$result); - A.ArgumentError_checkNotNull(t2, "other", t1); - _this._extension_request$_$v = t2; + _this._extension_request$_$v = type$.BatchedEvents._as(_$result); return _$result; }, set$_extension_request$_events(_events) { @@ -23061,8 +23051,7 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var t1, value, $$v, _$result, t2, - _s16_ = "HotReloadRequest", + var t1, value, $$v, _$result, result = new A.HotReloadRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); for (; iterator.moveNext$0();) { @@ -23086,14 +23075,7 @@ } } _$result = result._hot_reload_request$_$v; - if (_$result == null) { - t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(result.get$_hot_reload_request$_$this()._hot_reload_request$_id, _s16_, "id", t1); - _$result = new A._$HotReloadRequest(t2); - A.BuiltValueNullFieldError_checkNotNull(t2, _s16_, "id", t1); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.HotReloadRequest); - return result._hot_reload_request$_$v = _$result; + return result._hot_reload_request$_$v = _$result == null ? new A._$HotReloadRequest(A.BuiltValueNullFieldError_checkNotNull(result.get$_hot_reload_request$_$this()._hot_reload_request$_id, "HotReloadRequest", "id", type$.String)) : _$result; }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -23241,20 +23223,10 @@ return _this; }, _hot_reload_response$_build$0() { - var t1, t2, t3, t4, _this = this, + var _this = this, _s17_ = "HotReloadResponse", _$result = _this._hot_reload_response$_$v; - if (_$result == null) { - t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_hot_reload_response$_$this()._hot_reload_response$_id, _s17_, "id", t1); - t3 = type$.bool; - t4 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_hot_reload_response$_$this()._hot_reload_response$_success, _s17_, "success", t3); - _$result = new A._$HotReloadResponse(t2, t4, _this.get$_hot_reload_response$_$this()._errorMessage); - A.BuiltValueNullFieldError_checkNotNull(t2, _s17_, "id", t1); - A.BuiltValueNullFieldError_checkNotNull(t4, _s17_, "success", t3); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.HotReloadResponse); - return _this._hot_reload_response$_$v = _$result; + return _this._hot_reload_response$_$v = _$result == null ? new A._$HotReloadResponse(A.BuiltValueNullFieldError_checkNotNull(_this.get$_hot_reload_response$_$this()._hot_reload_response$_id, _s17_, "id", type$.String), A.BuiltValueNullFieldError_checkNotNull(_this.get$_hot_reload_response$_$this()._hot_reload_response$_success, _s17_, "success", type$.bool), _this.get$_hot_reload_response$_$this()._errorMessage) : _$result; } }; A.IsolateExit.prototype = {}; @@ -23325,10 +23297,7 @@ A.IsolateExitBuilder.prototype = { _isolate_events$_build$0() { var _$result = this._isolate_events$_$v; - if (_$result == null) - _$result = new A._$IsolateExit(); - A.ArgumentError_checkNotNull(_$result, "other", type$.IsolateExit); - return this._isolate_events$_$v = _$result; + return this._isolate_events$_$v = _$result == null ? new A._$IsolateExit() : _$result; } }; A._$IsolateStart.prototype = { @@ -23349,10 +23318,7 @@ A.IsolateStartBuilder.prototype = { _isolate_events$_build$0() { var _$result = this._isolate_events$_$v; - if (_$result == null) - _$result = new A._$IsolateStart(); - A.ArgumentError_checkNotNull(_$result, "other", type$.IsolateStart); - return this._isolate_events$_$v = _$result; + return this._isolate_events$_$v = _$result == null ? new A._$IsolateStart() : _$result; } }; A.RegisterEvent.prototype = {}; @@ -23446,22 +23412,10 @@ return _this; }, _register_event$_build$0() { - var t1, t2, t3, t4, _this = this, + var _this = this, _s13_ = "RegisterEvent", - _s9_ = "eventData", - _s9_0 = "timestamp", _$result = _this._register_event$_$v; - if (_$result == null) { - t1 = type$.String; - t2 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_register_event$_$this()._register_event$_eventData, _s13_, _s9_, t1); - t3 = type$.int; - t4 = A.BuiltValueNullFieldError_checkNotNull(_this.get$_register_event$_$this()._register_event$_timestamp, _s13_, _s9_0, t3); - _$result = new A._$RegisterEvent(t2, t4); - A.BuiltValueNullFieldError_checkNotNull(t2, _s13_, _s9_, t1); - A.BuiltValueNullFieldError_checkNotNull(t4, _s13_, _s9_0, t3); - } - A.ArgumentError_checkNotNull(_$result, "other", type$.RegisterEvent); - return _this._register_event$_$v = _$result; + return _this._register_event$_$v = _$result == null ? new A._$RegisterEvent(A.BuiltValueNullFieldError_checkNotNull(_this.get$_register_event$_$this()._register_event$_eventData, _s13_, "eventData", type$.String), A.BuiltValueNullFieldError_checkNotNull(_this.get$_register_event$_$this()._register_event$_timestamp, _s13_, "timestamp", type$.int)) : _$result; } }; A.RunRequest.prototype = {}; @@ -23474,11 +23428,8 @@ return this.serialize$3$specifiedType(serializers, object, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - var _$result; type$.Iterable_nullable_Object._as(serialized); - _$result = new A._$RunRequest(); - A.ArgumentError_checkNotNull(_$result, "other", type$.RunRequest); - return _$result; + return new A._$RunRequest(); }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -23625,13 +23576,13 @@ call$0() { return true; }, - $signature: 33 + $signature: 34 }; A.BatchedStreamController__hasEventDuring_closure.prototype = { call$0() { return false; }, - $signature: 33 + $signature: 34 }; A.SocketClient.prototype = {}; A.SseSocketClient.prototype = { @@ -23806,9 +23757,6 @@ A._StackState.prototype = {}; A.BaseClient.prototype = { _sendUnstreamed$3(method, url, headers) { - return this._sendUnstreamed$body$BaseClient(method, url, headers); - }, - _sendUnstreamed$body$BaseClient(method, url, headers) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.Response), $async$returnValue, $async$self = this, request, $async$temp1; @@ -23869,9 +23817,6 @@ }; A.BrowserClient.prototype = { send$1(request) { - return this.send$body$BrowserClient(request); - }, - send$body$BrowserClient(request) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.StreamedResponse), $async$returnValue, $async$handler = 2, $async$errorStack = [], $async$next = [], $async$self = this, xhr, completer, bytes, t1, t2, header, t3; @@ -24013,7 +23958,7 @@ A.MediaType.prototype = { toString$0(_) { var buffer = new A.StringBuffer(""), - t1 = "" + this.type; + t1 = this.type; buffer._contents = t1; t1 += "/"; buffer._contents = t1; @@ -24109,7 +24054,7 @@ call$1(match) { return "\\" + A.S(match.$index(0, 0)); }, - $signature: 31 + $signature: 32 }; A.expectQuotedString_closure.prototype = { call$1(match) { @@ -24117,7 +24062,7 @@ t1.toString; return t1; }, - $signature: 31 + $signature: 32 }; A.Level.prototype = { $eq(_, other) { @@ -24165,7 +24110,7 @@ var record, _this = this, t1 = logLevel.value; if (t1 >= _this.get$level().value) { - if ((stackTrace == null || stackTrace === B._StringStackTrace_OdL) && t1 >= 2000) { + if (stackTrace == null && t1 >= 2000) { A.StackTrace_current(); if (error == null) logLevel.toString$0(0); @@ -24240,10 +24185,10 @@ parsed.root = t4; if (t2.needsSeparator$1(t4)) B.JSArray_methods.$indexSet(parsed.separators, 0, t2.get$separator()); - t4 = "" + parsed.toString$0(0); + t4 = parsed.toString$0(0); } else if (t2.rootLength$1(t5) > 0) { isAbsoluteAndNotRootRelative = !t2.isRootRelative$1(t5); - t4 = "" + t5; + t4 = t5; } else { t6 = t5.length; if (t6 !== 0) { @@ -24409,7 +24354,7 @@ t2 = t1.length; if (t2 === 0) return "."; - if (t2 > 1 && J.$eq$(B.JSArray_methods.get$last(t1), ".")) { + if (t2 > 1 && B.JSArray_methods.get$last(t1) === ".") { B.JSArray_methods.removeLast$0(pathParsed.parts); t1 = pathParsed.separators; if (0 >= t1.length) @@ -24440,13 +24385,13 @@ call$1(part) { return A._asString(part) !== ""; }, - $signature: 30 + $signature: 31 }; A.Context_split_closure.prototype = { call$1(part) { return A._asString(part).length !== 0; }, - $signature: 30 + $signature: 31 }; A._validateArgList_closure.prototype = { call$1(arg) { @@ -24478,7 +24423,7 @@ var t1, t2, _this = this; while (true) { t1 = _this.parts; - if (!(t1.length !== 0 && J.$eq$(B.JSArray_methods.get$last(t1), ""))) + if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1) === "")) break; B.JSArray_methods.removeLast$0(_this.parts); t1 = _this.separators; @@ -24526,13 +24471,13 @@ toString$0(_) { var t2, t3, t4, t5, i, t1 = this.root; - t1 = t1 != null ? "" + t1 : ""; + t1 = t1 != null ? t1 : ""; for (t2 = this.parts, t3 = t2.length, t4 = this.separators, t5 = t4.length, i = 0; i < t3; ++i) { if (!(i < t5)) return A.ioore(t4, i); t1 = t1 + t4[i] + t2[i]; } - t1 += A.S(B.JSArray_methods.get$last(t4)); + t1 += B.JSArray_methods.get$last(t4); return t1.charCodeAt(0) == 0 ? t1 : t1; }, set$parts(parts) { @@ -25540,7 +25485,7 @@ t4 = B.JSString_methods.$mul("^", Math.max(endColumn + (tabsBefore + tabsInside) * 3 - startColumn, 1)); return (t2._contents += t4).length - t3.length; }, - $signature: 22 + $signature: 28 }; A.Highlighter__writeIndicator_closure0.prototype = { call$0() { @@ -25561,7 +25506,7 @@ t1._writeArrow$3$beginning(_this.line, Math.max(_this.highlight.span.get$end().get$column() - 1, 0), false); return t2._contents.length - t3.length; }, - $signature: 22 + $signature: 28 }; A.Highlighter__writeSidebar_closure.prototype = { call$0() { @@ -25580,7 +25525,7 @@ A._Highlight.prototype = { toString$0(_) { var t1 = this.span; - t1 = "" + "primary " + ("" + t1.get$start().get$line() + ":" + t1.get$start().get$column() + "-" + t1.get$end().get$line() + ":" + t1.get$end().get$column()); + t1 = "primary " + ("" + t1.get$start().get$line() + ":" + t1.get$start().get$column() + "-" + t1.get$end().get$line() + ":" + t1.get$end().get$column()); return t1.charCodeAt(0) == 0 ? t1 : t1; } }; @@ -25717,7 +25662,7 @@ toString$0(_) { var t3, t4, highlight, t1 = this._span, - t2 = "" + ("line " + (t1.get$start().get$line() + 1) + ", column " + (t1.get$start().get$column() + 1)); + t2 = "line " + (t1.get$start().get$line() + 1) + ", column " + (t1.get$start().get$column() + 1); if (t1.get$sourceUrl() != null) { t3 = t1.get$sourceUrl(); t4 = $.$get$context(); @@ -25978,19 +25923,19 @@ call$2(value, count) { return B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(value, 16), count, "0"); }, - $signature: 20 + $signature: 22 }; A.generateUuidV4_bitsDigits.prototype = { call$2(bitCount, digitCount) { return this.printDigits.call$2(this.generateBits.call$1(bitCount), digitCount); }, - $signature: 20 + $signature: 22 }; A.GuaranteeChannel.prototype = { GuaranteeChannel$3$allowSinkErrors(innerSink, allowSinkErrors, _box_0, $T) { var _this = this, t1 = _this.$ti, - t2 = t1._eval$1("_GuaranteeSink<1>")._as(new A._GuaranteeSink(innerSink, _this, new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_void), type$._AsyncCompleter_void), allowSinkErrors, $T._eval$1("_GuaranteeSink<0>"))); + t2 = t1._eval$1("_GuaranteeSink<1>")._as(new A._GuaranteeSink(innerSink, _this, new A._AsyncCompleter(new A._Future($.Zone__current, type$._Future_dynamic), type$._AsyncCompleter_dynamic), allowSinkErrors, $T._eval$1("_GuaranteeSink<0>"))); _this.__GuaranteeChannel__sink_F !== $ && A.throwLateFieldAI("_sink"); _this.__GuaranteeChannel__sink_F = t2; t1 = t1._eval$1("StreamController<1>")._as(A.StreamController_StreamController(null, new A.GuaranteeChannel_closure(_box_0, _this, $T), true, $T)); @@ -26163,30 +26108,30 @@ } }; A.RNG.prototype = {}; - A.CryptoRNG.prototype = { + A.MathRNG.prototype = { _generateInternal$0() { - var i, k, t1, t2, + var t1, i, k, t2, t3, b = new Uint8Array(16); - for (i = 0; i < 16; i += 4) { - k = $.$get$CryptoRNG__secureRandom().nextInt$1(B.JSNumber_methods.toInt$0(Math.pow(2, 32))); + for (t1 = this._rnd, i = 0; i < 16; i += 4) { + k = t1.nextInt$1(B.JSNumber_methods.toInt$0(Math.pow(2, 32))); if (!(i < 16)) return A.ioore(b, i); b[i] = k; - t1 = i + 1; - t2 = B.JSInt_methods._shrOtherPositive$1(k, 8); - if (!(t1 < 16)) - return A.ioore(b, t1); - b[t1] = t2; - t2 = i + 2; - t1 = B.JSInt_methods._shrOtherPositive$1(k, 16); + t2 = i + 1; + t3 = B.JSInt_methods._shrOtherPositive$1(k, 8); if (!(t2 < 16)) return A.ioore(b, t2); - b[t2] = t1; - t1 = i + 3; - t2 = B.JSInt_methods._shrOtherPositive$1(k, 24); - if (!(t1 < 16)) - return A.ioore(b, t1); - b[t1] = t2; + b[t2] = t3; + t3 = i + 2; + t2 = B.JSInt_methods._shrOtherPositive$1(k, 16); + if (!(t3 < 16)) + return A.ioore(b, t3); + b[t3] = t2; + t2 = i + 3; + t3 = B.JSInt_methods._shrOtherPositive$1(k, 24); + if (!(t2 < 16)) + return A.ioore(b, t2); + b[t2] = t3; } return b; } @@ -26757,8 +26702,8 @@ case 2: // break $label0$0 manager = new A.ReloadingManager(client, t3); - t1.$dartHotReloadDwds = A._functionToJS0(new A.main__closure(manager)); - t1.$fetchLibrariesForHotReload = A._functionToJS0(new A.main__closure0(manager)); + t1.$dartHotReloadStartDwds = A._functionToJS0(new A.main__closure(manager)); + t1.$dartHotReloadEndDwds = A._functionToJS0(new A.main__closure0(manager)); _box_0.readyToRunMainCompleter = null; t1.$dartHotRestartDwds = A._functionToJS2(new A.main__closure1(_box_0, manager)); t1.$dartReadyToRunMain = A._functionToJS0(new A.main__closure2(_box_0)); @@ -26800,13 +26745,13 @@ }; A.main__closure.prototype = { call$0() { - return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReload$0()); + return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), type$.JSArray_nullable_Object); }, $signature: 10 }; A.main__closure0.prototype = { call$0() { - return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), type$.JSArray_nullable_Object); + return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd$0()); }, $signature: 10 }; @@ -26986,11 +26931,11 @@ // then t1 = $async$self.manager; $async$goto = 14; - return A._asyncAwait(t1._restarter.fetchLibrariesForHotReload$1(A.hotReloadSourcesPath()), $async$call$1); + return A._asyncAwait(t1._restarter.hotReloadStart$1(A.hotReloadSourcesPath()), $async$call$1); case 14: // returning from await. $async$goto = 15; - return A._asyncAwait(t1.hotReload$0(), $async$call$1); + return A._asyncAwait(t1.hotReloadEnd$0(), $async$call$1); case 15: // returning from await. case 13: @@ -27155,9 +27100,6 @@ }; A.DdcLibraryBundleRestarter.prototype = { _runMainWhenReady$2(readyToRunMain, runMain) { - return this._runMainWhenReady$body$DdcLibraryBundleRestarter(readyToRunMain, runMain); - }, - _runMainWhenReady$body$DdcLibraryBundleRestarter(readyToRunMain, runMain) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void); var $async$_runMainWhenReady$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { @@ -27218,42 +27160,11 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - get$_sourcesAndLibrariesToReload() { - var t1 = this.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A; - t1 === $ && A.throwLateFieldNI("_sourcesAndLibrariesToReload"); - return t1; - }, - reload$0() { - var $async$goto = 0, - $async$completer = A._makeAsyncAwaitCompleter(type$.void), - $async$self = this, t1; - var $async$reload$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { - if ($async$errorCode === 1) - return A._asyncRethrow($async$result, $async$completer); - while (true) - switch ($async$goto) { - case 0: - // Function start - t1 = type$.JSObject; - $async$goto = 2; - return A._asyncAwait(A.promiseToFuture(t1._as(t1._as(init.G.dartDevEmbedder).hotReload($async$self.get$_sourcesAndLibrariesToReload()._1, $async$self.get$_sourcesAndLibrariesToReload()._0)), type$.nullable_Object), $async$reload$0); - case 2: - // returning from await. - $async$self.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = null; - // implicit return - return A._asyncReturn(null, $async$completer); - } - }); - return A._asyncStartSync($async$reload$0, $async$completer); - }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { - return this.fetchLibrariesForHotReload$body$DdcLibraryBundleRestarter(hotReloadSourcesPath); - }, - fetchLibrariesForHotReload$body$DdcLibraryBundleRestarter(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.JSArray_nullable_Object), - $async$returnValue, $async$self = this, t3, srcLibraries, filesToLoad, librariesToReload, t4, srcLibraryCast, t5, t1, t2, xhr, $async$temp1, $async$temp2, $async$temp3; - var $async$fetchLibrariesForHotReload$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + $async$returnValue, $async$self = this, t4, srcLibraries, filesToLoad, librariesToReload, t5, t6, srcLibraryCast, libraries, t7, t1, t2, t3, xhr, $async$temp1, $async$temp2, $async$temp3; + var $async$hotReloadStart$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); while (true) @@ -27262,30 +27173,36 @@ // Function start t1 = new A._Future($.Zone__current, type$._Future_String); t2 = init.G; - xhr = type$.JSObject._as(new t2.XMLHttpRequest()); + t3 = type$.JSObject; + xhr = t3._as(new t2.XMLHttpRequest()); xhr.withCredentials = true; - xhr.onreadystatechange = A._functionToJS0(new A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure(xhr, new A._AsyncCompleter(t1, type$._AsyncCompleter_String))); + xhr.onreadystatechange = A._functionToJS0(new A.DdcLibraryBundleRestarter_hotReloadStart_closure(xhr, new A._AsyncCompleter(t1, type$._AsyncCompleter_String))); xhr.open("GET", hotReloadSourcesPath, true); xhr.send(); - t3 = type$.List_dynamic; + t4 = type$.List_dynamic; $async$temp1 = J; - $async$temp2 = t3; + $async$temp2 = t4; $async$temp3 = B.C_JsonCodec; $async$goto = 3; - return A._asyncAwait(t1, $async$fetchLibrariesForHotReload$1); + return A._asyncAwait(t1, $async$hotReloadStart$1); case 3: // returning from await. srcLibraries = $async$temp1.cast$1$0$ax($async$temp2._as($async$temp3.decode$1($async$result)), type$.Map_dynamic_dynamic); t1 = type$.JSArray_nullable_Object; filesToLoad = t1._as(new t2.Array()); librariesToReload = t1._as(new t2.Array()); - for (t1 = J.get$iterator$ax(srcLibraries), t2 = type$.String, t4 = type$.Object; t1.moveNext$0();) { - srcLibraryCast = t1.get$current().cast$2$0(0, t2, t4); + for (t1 = srcLibraries.get$iterator(srcLibraries), t5 = type$.String, t6 = type$.Object; t1.moveNext$0();) { + srcLibraryCast = t1.get$current().cast$2$0(0, t5, t6); filesToLoad.push(A._asString(srcLibraryCast.$index(0, "src"))); - for (t5 = J.get$iterator$ax(J.cast$1$0$ax(t3._as(srcLibraryCast.$index(0, "libraries")), t2)); t5.moveNext$0();) - librariesToReload.push(t5.get$current()); + libraries = J.cast$1$0$ax(t4._as(srcLibraryCast.$index(0, "libraries")), t5); + for (t7 = libraries.get$iterator(libraries); t7.moveNext$0();) + librariesToReload.push(t7.get$current()); } - $async$self.__DdcLibraryBundleRestarter__sourcesAndLibrariesToReload_A = new A._Record_2_libraries_sources(librariesToReload, filesToLoad); + t3._as(t3._as(t2.dartDevEmbedder).config).capturedHotReloadEndHandler = A._functionToJS1(new A.DdcLibraryBundleRestarter_hotReloadStart_closure0($async$self)); + $async$goto = 4; + return A._asyncAwait(A.promiseToFuture(t3._as(t3._as(t2.dartDevEmbedder).hotReload(filesToLoad, librariesToReload)), type$.nullable_Object), $async$hotReloadStart$1); + case 4: + // returning from await. $async$returnValue = librariesToReload; // goto return $async$goto = 1; @@ -27295,7 +27212,28 @@ return A._asyncReturn($async$returnValue, $async$completer); } }); - return A._asyncStartSync($async$fetchLibrariesForHotReload$1, $async$completer); + return A._asyncStartSync($async$hotReloadStart$1, $async$completer); + }, + hotReloadEnd$0() { + var $async$goto = 0, + $async$completer = A._makeAsyncAwaitCompleter(type$.void), + $async$self = this, t1; + var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + if ($async$errorCode === 1) + return A._asyncRethrow($async$result, $async$completer); + while (true) + switch ($async$goto) { + case 0: + // Function start + $async$self._capturedHotReloadEndCallback.call(); + t1 = type$.JSObject; + t1._as(t1._as(init.G.dartDevEmbedder).config).capturedHotReloadEndHandler = null; + $async$self._capturedHotReloadEndCallback = null; + // implicit return + return A._asyncReturn(null, $async$completer); + } + }); + return A._asyncStartSync($async$hotReloadEnd$0, $async$completer); }, $isRestarter: 1 }; @@ -27307,9 +27245,9 @@ t1._as(t1._as(init.G.dartDevEmbedder).config).capturedMainHandler = null; A.safeUnawaited(this.$this._runMainWhenReady$2(this.readyToRunMain, runMain)); }, - $signature: 83 + $signature: 20 }; - A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure.prototype = { + A.DdcLibraryBundleRestarter_hotReloadStart_closure.prototype = { call$0() { var t1 = this.xhr; if (A._asInt(t1.readyState) === 4 && A._asInt(t1.status) === 200 || A._asInt(t1.status) === 304) @@ -27317,6 +27255,12 @@ }, $signature: 1 }; + A.DdcLibraryBundleRestarter_hotReloadStart_closure0.prototype = { + call$1(hotReloadEndCallback) { + this.$this._capturedHotReloadEndCallback = type$.JavaScriptFunction._as(hotReloadEndCallback); + }, + $signature: 20 + }; A.DdcRestarter.prototype = { restart$2$readyToRunMain$runId(readyToRunMain, runId) { var $async$goto = 0, @@ -27346,10 +27290,10 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - reload$0() { + hotReloadEnd$0() { return A.throwExpression(A.UnimplementedError$(string$.Hot_reD)); }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { return A.throwExpression(A.UnimplementedError$(string$.Hot_reD)); }, $isRestarter: 1 @@ -27409,11 +27353,11 @@ hotRestart$1$runId(runId) { return this.hotRestart$2$readyToRunMain$runId(null, runId); }, - hotReload$0() { + hotReloadEnd$0() { var $async$goto = 0, $async$completer = A._makeAsyncAwaitCompleter(type$.void), $async$self = this; - var $async$hotReload$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { + var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); while (true) @@ -27421,14 +27365,14 @@ case 0: // Function start $async$goto = 2; - return A._asyncAwait($async$self._restarter.reload$0(), $async$hotReload$0); + return A._asyncAwait($async$self._restarter.hotReloadEnd$0(), $async$hotReloadEnd$0); case 2: // returning from await. // implicit return return A._asyncReturn(null, $async$completer); } }); - return A._asyncStartSync($async$hotReload$0, $async$completer); + return A._asyncStartSync($async$hotReloadEnd$0, $async$completer); }, _afterRestart$1(succeeded) { var t1, t2; @@ -27528,10 +27472,10 @@ }); return A._asyncStartSync($async$restart$2$readyToRunMain$runId, $async$completer); }, - reload$0() { + hotReloadEnd$0() { return A.throwExpression(A.UnimplementedError$(string$.Hot_reA)); }, - fetchLibrariesForHotReload$1(hotReloadSourcesPath) { + hotReloadStart$1(hotReloadSourcesPath) { return A.throwExpression(A.UnimplementedError$(string$.Hot_reA)); }, _require_restarter$_runMainWhenReady$1(readyToRunMain) { @@ -27910,7 +27854,7 @@ _instance_1_i = hunkHelpers._instance_1i, _instance_0_u = hunkHelpers._instance_0u, _instance_1_u = hunkHelpers._instance_1u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 28); + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 30); _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 16); _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 16); _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 16); @@ -27920,27 +27864,22 @@ _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 91, 0); _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { - f.toString; return A._rootRun($self, $parent, zone, f, type$.dynamic); }], 92, 0); _static(A, "async___rootRunUnary$closure", 5, null, ["call$2$5", "call$5"], ["_rootRunUnary", function($self, $parent, zone, f, arg) { var t1 = type$.dynamic; - f.toString; return A._rootRunUnary($self, $parent, zone, f, arg, t1, t1); }], 93, 0); _static(A, "async___rootRunBinary$closure", 6, null, ["call$3$6"], ["_rootRunBinary"], 94, 0); _static(A, "async___rootRegisterCallback$closure", 4, null, ["call$1$4", "call$4"], ["_rootRegisterCallback", function($self, $parent, zone, f) { - f.toString; return A._rootRegisterCallback($self, $parent, zone, f, type$.dynamic); }], 95, 0); _static(A, "async___rootRegisterUnaryCallback$closure", 4, null, ["call$2$4", "call$4"], ["_rootRegisterUnaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; - f.toString; return A._rootRegisterUnaryCallback($self, $parent, zone, f, t1, t1); }], 96, 0); _static(A, "async___rootRegisterBinaryCallback$closure", 4, null, ["call$3$4", "call$4"], ["_rootRegisterBinaryCallback", function($self, $parent, zone, f) { var t1 = type$.dynamic; - f.toString; return A._rootRegisterBinaryCallback($self, $parent, zone, f, t1, t1, t1); }], 97, 0); _static(A, "async___rootErrorCallback$closure", 5, null, ["call$5"], ["_rootErrorCallback"], 98, 0); @@ -27950,11 +27889,11 @@ _static(A, "async___rootPrint$closure", 4, null, ["call$4"], ["_rootPrint"], 102, 0); _static_1(A, "async___printToZone$closure", "_printToZone", 103); _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 104, 0); - _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 32, 0, 0); + _instance(A._Completer.prototype, "get$completeError", 0, 1, null, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 33, 0, 0); _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 14); var _; _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 9); - _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 32, 0, 0); + _instance(_, "get$addError", 0, 1, null, ["call$2", "call$1"], ["addError$2", "addError$1"], 33, 0, 0); _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); _instance_0_u(_ = A._BufferingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); @@ -27967,7 +27906,7 @@ _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 18); _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 17); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 28); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 30); _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 4); _instance_1_i(_ = A._ByteCallbackSink.prototype, "get$add", "add$1", 9); _instance_0_u(_, "get$close", "close$0", 0); @@ -27975,8 +27914,6 @@ _static_2(A, "core__identical$closure", "identical", 18); _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 13); _static(A, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { - a.toString; - b.toString; return A.max(a, b, type$.num); }], 105, 0); _instance_2_u(_ = A.DeepCollectionEquality.prototype, "get$equals", "equals$2", 18); @@ -27999,31 +27936,30 @@ _inherit = hunkHelpers.inherit, _inheritMany = hunkHelpers.inheritMany; _inherit(A.Object, null); - _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A._Record, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A._UnmodifiableNativeByteBufferView, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A._JSSecureRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); + _inheritMany(A.Object, [A.JS_CONST, J.Interceptor, A.SafeToStringHook, J.ArrayIterator, A.Iterable, A.CastIterator, A.Closure, A.MapBase, A.Error, A.ListBase, A.SentinelValue, A.ListIterator, A.MappedIterator, A.WhereIterator, A.ExpandIterator, A.TakeIterator, A.SkipIterator, A.EmptyIterator, A.WhereTypeIterator, A.FixedLengthListMixin, A.UnmodifiableListMixin, A.ConstantMap, A._KeysOrValuesOrElementsIterator, A.TypeErrorDecoder, A.NullThrownFromJavaScriptException, A.ExceptionAndStackTrace, A._StackTrace, A.LinkedHashMapCell, A.LinkedHashMapKeyIterator, A.LinkedHashMapValueIterator, A.LinkedHashMapEntryIterator, A._Record, A.JSSyntaxRegExp, A._MatchImplementation, A._AllMatchesIterator, A.StringMatch, A._StringAllMatchesIterator, A._Cell, A.Rti, A._FunctionParameters, A._Type, A._TimerImpl, A._AsyncAwaitCompleter, A.AsyncError, A.TimeoutException, A._Completer, A._FutureListener, A._Future, A._AsyncCallbackEntry, A.Stream, A._StreamController, A._SyncStreamControllerDispatch, A._AsyncStreamControllerDispatch, A._BufferingStreamSubscription, A._StreamSinkWrapper, A._DelayedEvent, A._DelayedDone, A._PendingEvents, A._DoneStreamSubscription, A._StreamIterator, A._ZoneFunction, A._ZoneSpecification, A._ZoneDelegate, A._Zone, A._HashMapKeyIterator, A.SetBase, A._HashSetIterator, A._LinkedHashSetCell, A._LinkedHashSetIterator, A._UnmodifiableMapMixin, A.MapView, A._ListQueueIterator, A._SplayTreeNode, A._SplayTree, A._SplayTreeIterator, A.Codec, A.Converter, A._Base64Encoder, A._Base64Decoder, A.ByteConversionSink, A._JsonStringifier, A._Utf8Encoder, A._Utf8Decoder, A._BigIntImpl, A.DateTime, A.Duration, A.OutOfMemoryError, A.StackOverflowError, A._Exception, A.FormatException, A.IntegerDivisionByZeroException, A.MapEntry, A.Null, A._StringStackTrace, A.StringBuffer, A._Uri, A.UriData, A._SimpleUri, A.NullRejectionException, A._JSRandom, A.AsyncMemoizer, A.DelegatingStreamSink, A.ErrorResult, A.ValueResult, A.StreamQueue, A._NextRequest, A._HasNextRequest, A.BuiltList, A.ListBuilder, A.BuiltListMultimap, A.ListMultimapBuilder, A.BuiltMap, A.MapBuilder, A.BuiltSet, A.SetBuilder, A.BuiltSetMultimap, A.SetMultimapBuilder, A.EnumClass, A.IndentingBuiltValueToStringHelper, A.JsonObject, A.FullType, A.BigIntSerializer, A.BoolSerializer, A.BuiltJsonSerializers, A.BuiltJsonSerializersBuilder, A.BuiltListMultimapSerializer, A.BuiltListSerializer, A.BuiltMapSerializer, A.BuiltSetMultimapSerializer, A.BuiltSetSerializer, A.DateTimeSerializer, A.DoubleSerializer, A.DurationSerializer, A.Int32Serializer, A.Int64Serializer, A.IntSerializer, A.JsonObjectSerializer, A.ListSerializer, A.MapSerializer, A.NullSerializer, A.NumSerializer, A.RegExpSerializer, A.SetSerializer, A.StringSerializer, A.Uint8ListSerializer, A.UriSerializer, A.CanonicalizedMap, A.DefaultEquality, A.IterableEquality, A.ListEquality, A._UnorderedEquality, A._MapEntry, A.MapEquality, A.DeepCollectionEquality, A._QueueList_Object_ListMixin, A.BuildResult, A._$BuildStatusSerializer, A._$BuildResultSerializer, A.BuildResultBuilder, A.ConnectRequest, A._$ConnectRequestSerializer, A.ConnectRequestBuilder, A.DebugEvent, A.BatchedDebugEvents, A._$DebugEventSerializer, A._$BatchedDebugEventsSerializer, A.DebugEventBuilder, A.BatchedDebugEventsBuilder, A.DebugInfo, A._$DebugInfoSerializer, A.DebugInfoBuilder, A.DevToolsRequest, A.DevToolsResponse, A._$DevToolsRequestSerializer, A._$DevToolsResponseSerializer, A.DevToolsRequestBuilder, A.DevToolsResponseBuilder, A.ErrorResponse, A._$ErrorResponseSerializer, A.ErrorResponseBuilder, A.ExtensionRequest, A.ExtensionResponse, A.ExtensionEvent, A.BatchedEvents, A._$ExtensionRequestSerializer, A._$ExtensionResponseSerializer, A._$ExtensionEventSerializer, A._$BatchedEventsSerializer, A.ExtensionRequestBuilder, A.ExtensionResponseBuilder, A.ExtensionEventBuilder, A.BatchedEventsBuilder, A.HotReloadRequest, A._$HotReloadRequestSerializer, A.HotReloadRequestBuilder, A.HotReloadResponse, A._$HotReloadResponseSerializer, A.HotReloadResponseBuilder, A.IsolateExit, A.IsolateStart, A._$IsolateExitSerializer, A._$IsolateStartSerializer, A.IsolateExitBuilder, A.IsolateStartBuilder, A.RegisterEvent, A._$RegisterEventSerializer, A.RegisterEventBuilder, A.RunRequest, A._$RunRequestSerializer, A.BatchedStreamController, A.SocketClient, A.Int32, A.Int64, A._StackState, A.BaseClient, A.BaseRequest, A.BaseResponse, A.ClientException, A.MediaType, A.Level, A.LogRecord, A.Logger, A.Context, A.Style, A.ParsedPath, A.PathException, A.Pool, A.PoolResource, A.SourceFile, A.SourceLocationMixin, A.SourceSpanMixin, A.Highlighter, A._Highlight, A._Line, A.SourceLocation, A.SourceSpanException, A.StreamChannelMixin, A._GuaranteeSink, A.StreamChannelController, A.StringScanner, A.RNG, A.UuidV1, A.EventStreamProvider, A._EventStreamSubscription, A.BrowserWebSocket, A.WebSocketEvent, A.WebSocketException, A.WebSocketChannelException, A.DdcLibraryBundleRestarter, A.DdcRestarter, A.ReloadingManager, A.HotReloadFailedException, A.RequireRestarter]); _inheritMany(J.Interceptor, [J.JSBool, J.JSNull, J.JavaScriptObject, J.JavaScriptBigInt, J.JavaScriptSymbol, J.JSNumber, J.JSString]); _inheritMany(J.JavaScriptObject, [J.LegacyJavaScriptObject, J.JSArray, A.NativeByteBuffer, A.NativeTypedData]); _inheritMany(J.LegacyJavaScriptObject, [J.PlainJavaScriptObject, J.UnknownJavaScriptObject, J.JavaScriptFunction]); + _inherit(J.JSArraySafeToStringHook, A.SafeToStringHook); _inherit(J.JSUnmodifiableArray, J.JSArray); _inheritMany(J.JSNumber, [J.JSInt, J.JSNumNotInt]); _inheritMany(A.Iterable, [A._CastIterableBase, A.EfficientLengthIterable, A.MappedIterable, A.WhereIterable, A.ExpandIterable, A.TakeIterable, A.SkipIterable, A.WhereTypeIterable, A._KeysOrValues, A._AllMatchesIterable, A._StringAllMatchesIterable]); _inheritMany(A._CastIterableBase, [A.CastIterable, A.__CastListBase__CastIterableBase_ListMixin]); _inherit(A._EfficientLengthCastIterable, A.CastIterable); _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); - _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._CustomHashMap_closure, A._LinkedCustomHashMap_closure, A._BigIntImpl_hashCode_finish, A._Uri__makePath_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure, A.FutureOfVoidToJSPromise_get_toJS__closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.StreamQueue__ensureListening_closure, A.BuiltListMultimap_BuiltListMultimap_closure, A.BuiltListMultimap_hashCode_closure, A.ListMultimapBuilder_replace_closure, A.BuiltMap_BuiltMap_closure, A.BuiltMap_hashCode_closure, A.BuiltSet_hashCode_closure, A.BuiltSetMultimap_hashCode_closure, A.SetMultimapBuilder_replace_closure, A.newBuiltValueToStringHelper_closure, A.BuiltListMultimapSerializer_serialize_closure, A.BuiltListMultimapSerializer_deserialize_closure, A.BuiltListSerializer_serialize_closure, A.BuiltListSerializer_deserialize_closure, A.BuiltSetMultimapSerializer_serialize_closure, A.BuiltSetMultimapSerializer_deserialize_closure, A.BuiltSetSerializer_serialize_closure, A.BuiltSetSerializer_deserialize_closure, A.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_closure0, A.ByteStream_toBytes_closure, A.MediaType_toString__closure, A.expectQuotedString_closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.Pool__runOnRelease_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.SseClient_closure0, A.SseClient_closure1, A.generateUuidV4_generateBits, A._GuaranteeSink__addError_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.AdapterWebSocketChannel_closure, A.AdapterWebSocketChannel__closure, A.AdapterWebSocketChannel__closure0, A.AdapterWebSocketChannel_closure0, A.main__closure1, A.main__closure3, A.main___closure2, A.main___closure1, A.main__closure5, A.main___closure0, A.main___closure, A.main__closure7, A.main__closure8, A.main__closure9, A._sendConnectRequest_closure, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]); + _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._CustomHashMap_closure, A._LinkedCustomHashMap_closure, A._BigIntImpl_hashCode_finish, A._Uri__makePath_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure, A.FutureOfVoidToJSPromise_get_toJS__closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.StreamQueue__ensureListening_closure, A.BuiltListMultimap_BuiltListMultimap_closure, A.BuiltListMultimap_hashCode_closure, A.ListMultimapBuilder_replace_closure, A.BuiltMap_BuiltMap_closure, A.BuiltMap_hashCode_closure, A.BuiltSet_hashCode_closure, A.BuiltSetMultimap_hashCode_closure, A.SetMultimapBuilder_replace_closure, A.newBuiltValueToStringHelper_closure, A.BuiltListMultimapSerializer_serialize_closure, A.BuiltListMultimapSerializer_deserialize_closure, A.BuiltListSerializer_serialize_closure, A.BuiltListSerializer_deserialize_closure, A.BuiltSetMultimapSerializer_serialize_closure, A.BuiltSetMultimapSerializer_deserialize_closure, A.BuiltSetSerializer_serialize_closure, A.BuiltSetSerializer_deserialize_closure, A.ListSerializer_serialize_closure, A.SetSerializer_serialize_closure, A.CanonicalizedMap_keys_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A.BrowserClient_send_closure0, A.ByteStream_toBytes_closure, A.MediaType_toString__closure, A.expectQuotedString_closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.Pool__runOnRelease_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.SseClient_closure0, A.SseClient_closure1, A.generateUuidV4_generateBits, A._GuaranteeSink__addError_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.AdapterWebSocketChannel_closure, A.AdapterWebSocketChannel__closure, A.AdapterWebSocketChannel__closure0, A.AdapterWebSocketChannel_closure0, A.main__closure1, A.main__closure3, A.main___closure2, A.main___closure1, A.main__closure5, A.main___closure0, A.main___closure, A.main__closure7, A.main__closure8, A.main__closure9, A._sendConnectRequest_closure, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcLibraryBundleRestarter_hotReloadStart_closure0, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]); _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.ConstantMap_map_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A._Future_timeout_closure1, A._BufferingStreamSubscription_asFuture_closure0, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._BigIntImpl_hashCode_combine, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A.FutureOfJSAnyToJSPromise_get_toJS_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure0, A.FutureOfVoidToJSPromise_get_toJS_closure, A.FutureOfVoidToJSPromise_get_toJS__closure0, A.StreamQueue__ensureListening_closure1, A.hashObjects_closure, A.MapBuilder_replace_closure, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.CanonicalizedMap_map_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.generateUuidV4_printDigits, A.generateUuidV4_bitsDigits, A.main__closure4, A.main_closure0]); _inherit(A.CastList, A._CastListBase); _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A._JsonMap]); _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError, A.BuiltValueNullFieldError, A.BuiltValueNestedFieldError, A.DeserializationError]); _inherit(A.UnmodifiableListBase, A.ListBase); _inheritMany(A.UnmodifiableListBase, [A.CodeUnits, A.UnmodifiableListView]); - _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A.Future_Future$microtask_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.Serializers_Serializers_closure, A.Serializers_Serializers_closure0, A.Serializers_Serializers_closure1, A.Serializers_Serializers_closure2, A.Serializers_Serializers_closure3, A._$serializers_closure, A._$serializers_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A.MediaType_MediaType$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.GuaranteeChannel_closure, A.GuaranteeChannel__closure, A.AdapterWebSocketChannel__closure1, A.main_closure, A.main__closure, A.main__closure0, A.main__closure2, A.main__closure6, A.DdcLibraryBundleRestarter_fetchLibrariesForHotReload_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]); + _inheritMany(A.Closure0Args, [A.nullFuture_closure, A._AsyncRun__scheduleImmediateJsOverride_internalCallback, A._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback, A._TimerImpl_internalCallback, A._TimerImpl$periodic_closure, A.Future_Future$microtask_closure, A._Future__addListener_closure, A._Future__prependListeners_closure, A._Future__chainCoreFuture_closure, A._Future__asyncCompleteWithValue_closure, A._Future__asyncCompleteErrorObject_closure, A._Future__propagateToListeners_handleWhenCompleteCallback, A._Future__propagateToListeners_handleValueCallback, A._Future__propagateToListeners_handleError, A._Future_timeout_closure, A.Stream_length_closure0, A.Stream_first_closure, A._StreamController__subscribe_closure, A._StreamController__recordCancel_complete, A._BufferingStreamSubscription_asFuture_closure, A._BufferingStreamSubscription_asFuture__closure, A._BufferingStreamSubscription__sendError_sendError, A._BufferingStreamSubscription__sendDone_sendDone, A._PendingEvents_schedule_closure, A._cancelAndValue_closure, A._CustomZone_bindCallback_closure, A._CustomZone_bindCallbackGuarded_closure, A._rootHandleError_closure, A._RootZone_bindCallback_closure, A._RootZone_bindCallbackGuarded_closure, A._Utf8Decoder__decoder_closure, A._Utf8Decoder__decoderNonfatal_closure, A.StreamQueue__ensureListening_closure0, A.Serializers_Serializers_closure, A.Serializers_Serializers_closure0, A.Serializers_Serializers_closure1, A.Serializers_Serializers_closure2, A.Serializers_Serializers_closure3, A._$serializers_closure, A._$serializers_closure0, A.BatchedStreamController__hasEventOrTimeOut_closure, A.BatchedStreamController__hasEventDuring_closure, A.MediaType_MediaType$parse_closure, A.Logger_Logger_closure, A.Highlighter_closure, A.Highlighter__writeFileStart_closure, A.Highlighter__writeMultilineHighlights_closure, A.Highlighter__writeMultilineHighlights_closure0, A.Highlighter__writeMultilineHighlights_closure1, A.Highlighter__writeMultilineHighlights_closure2, A.Highlighter__writeMultilineHighlights__closure, A.Highlighter__writeMultilineHighlights__closure0, A.Highlighter__writeHighlightedText_closure, A.Highlighter__writeIndicator_closure, A.Highlighter__writeIndicator_closure0, A.Highlighter__writeIndicator_closure1, A.Highlighter__writeSidebar_closure, A._Highlight_closure, A.SseClient_closure, A.SseClient__closure, A.SseClient__onOutgoingMessage_closure, A.GuaranteeChannel_closure, A.GuaranteeChannel__closure, A.AdapterWebSocketChannel__closure1, A.main_closure, A.main__closure, A.main__closure0, A.main__closure2, A.main__closure6, A.DdcLibraryBundleRestarter_hotReloadStart_closure, A.RequireRestarter__reload_closure, A.RequireRestarter__reloadModule_closure, A._createScript_closure, A._createScript__closure, A._createScript__closure0, A.runMain_closure]); _inheritMany(A.EfficientLengthIterable, [A.ListIterable, A.EmptyIterable, A.LinkedHashMapKeysIterable, A.LinkedHashMapValuesIterable, A.LinkedHashMapEntriesIterable, A._HashMapKeyIterable]); _inheritMany(A.ListIterable, [A.SubListIterable, A.MappedListIterable, A.ReversedListIterable, A.ListQueue, A._JsonMapKeyIterable]); _inherit(A.EfficientLengthMappedIterable, A.MappedIterable); _inherit(A.EfficientLengthTakeIterable, A.TakeIterable); _inherit(A.EfficientLengthSkipIterable, A.SkipIterable); - _inherit(A._Record2, A._Record); - _inherit(A._Record_2_libraries_sources, A._Record2); _inherit(A.ConstantStringMap, A.ConstantMap); _inherit(A.Instantiation1, A.Instantiation); _inherit(A.NullError, A.TypeError); @@ -28109,7 +28045,7 @@ _inherit(A.SourceSpanWithContext, A.SourceSpanBase); _inheritMany(A.StreamChannelMixin, [A.SseClient, A.GuaranteeChannel, A.AdapterWebSocketChannel]); _inherit(A.StringScannerException, A.SourceSpanFormatException); - _inherit(A.CryptoRNG, A.RNG); + _inherit(A.MathRNG, A.RNG); _inheritMany(A.WebSocketEvent, [A.TextDataReceived, A.BinaryDataReceived, A.CloseReceived]); _inherit(A.WebSocketConnectionClosed, A.WebSocketException); _inherit(A._WebSocketSink, A.DelegatingStreamSink); @@ -28131,15 +28067,13 @@ typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map"}, mangledNames: {}, - types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "JSObject()", "Object?(Object?)", "bool(Object?)", "String(String)", "~(Object,StackTrace)", "bool(_Highlight)", "~(~())", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "String(int,int)", "~(@,StackTrace)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "int(int)", "int(@,@)", "Null(JavaScriptFunction,JavaScriptFunction)", "bool(String)", "String(Match)", "~(Object[StackTrace?])", "bool()", "MapBuilder()", "SetBuilder()", "ListMultimapBuilder()", "~(int,@)", "ListBuilder()", "IndentingBuiltValueToStringHelper(String)", "ListBuilder()", "ListBuilder()", "int(int,@)", "String(@)", "bool(String,String)", "int(String)", "Object?(~)", "~(List)", "MediaType()", "~(String,String)", "JSObject(Object,StackTrace)", "Logger()", "Null(@,StackTrace)", "~(String,int?)", "String?()", "int(_Line)", "~(String,int)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "Null(~())", "SourceSpanWithContext()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "~(String?)", "Future()", "@(@,String)", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(bool)", "Null(JavaScriptFunction)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "SetMultimapBuilder()", "@(String)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "~(String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "0^(0^,0^)", "String(String?)"], + types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "@(@)", "Null(Object,StackTrace)", "Null(@)", "~(@)", "Null(JSObject)", "~(Object?)", "JSObject()", "Object?(Object?)", "bool(Object?)", "String(String)", "~(Object,StackTrace)", "bool(_Highlight)", "~(~())", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "Null(JavaScriptFunction)", "~(@,StackTrace)", "String(int,int)", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "int(int)", "int()", "Null(JavaScriptFunction,JavaScriptFunction)", "int(@,@)", "bool(String)", "String(Match)", "~(Object[StackTrace?])", "bool()", "SetBuilder()", "MapBuilder()", "~(int,@)", "ListMultimapBuilder()", "ListBuilder()", "ListBuilder()", "ListBuilder()", "IndentingBuiltValueToStringHelper(String)", "String(@)", "bool(String,String)", "int(String)", "int(int,@)", "~(List)", "MediaType()", "~(String,String)", "Object?(~)", "Logger()", "JSObject(Object,StackTrace)", "Null(@,StackTrace)", "String?()", "int(_Line)", "~(String,int?)", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(String,int)", "SourceSpanWithContext()", "Null(~())", "~(String?)", "Future()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "DebugInfoBuilder(DebugInfoBuilder)", "~(bool)", "@(@,String)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "SetMultimapBuilder()", "@(String)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "~(String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "0^(0^,0^)", "String(String?)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti"), - rttc: { - "2;libraries,sources": (t1, t2) => o => o instanceof A._Record_2_libraries_sources && t1._is(o._0) && t2._is(o._1) - } + rttc: {} }; - A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_Record_2_libraries_sources":{"_Record2":[],"_Record":[]},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_Record2":{"_Record":[]},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"_UnmodifiableNativeByteBufferView":{"ByteBuffer":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); + A._Universe_addRules(init.typeUniverse, JSON.parse('{"JavaScriptFunction":"LegacyJavaScriptObject","PlainJavaScriptObject":"LegacyJavaScriptObject","UnknownJavaScriptObject":"LegacyJavaScriptObject","JavaScriptObject":{"JSObject":[]},"JSArray":{"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"JSBool":{"bool":[],"TrustedGetRuntimeType":[]},"JSNull":{"Null":[],"TrustedGetRuntimeType":[]},"LegacyJavaScriptObject":{"JavaScriptObject":[],"JSObject":[]},"JSArraySafeToStringHook":{"SafeToStringHook":[]},"JSUnmodifiableArray":{"JSArray":["1"],"List":["1"],"JavaScriptObject":[],"EfficientLengthIterable":["1"],"JSObject":[],"Iterable":["1"],"JSIndexable":["1"],"Iterable.E":"1"},"ArrayIterator":{"Iterator":["1"]},"JSNumber":{"double":[],"num":[],"Comparable":["num"]},"JSInt":{"double":[],"int":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSNumNotInt":{"double":[],"num":[],"Comparable":["num"],"TrustedGetRuntimeType":[]},"JSString":{"String":[],"Comparable":["String"],"Pattern":[],"JSIndexable":["@"],"TrustedGetRuntimeType":[]},"_CastIterableBase":{"Iterable":["2"]},"CastIterator":{"Iterator":["2"]},"CastIterable":{"_CastIterableBase":["1","2"],"Iterable":["2"],"Iterable.E":"2"},"_EfficientLengthCastIterable":{"CastIterable":["1","2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"_CastListBase":{"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"]},"CastList":{"_CastListBase":["1","2"],"ListBase":["2"],"List":["2"],"_CastIterableBase":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","Iterable.E":"2"},"CastMap":{"MapBase":["3","4"],"Map":["3","4"],"MapBase.K":"3","MapBase.V":"4"},"LateError":{"Error":[]},"CodeUnits":{"ListBase":["int"],"UnmodifiableListMixin":["int"],"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"],"ListBase.E":"int","Iterable.E":"int","UnmodifiableListMixin.E":"int"},"EfficientLengthIterable":{"Iterable":["1"]},"ListIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"SubListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ListIterator":{"Iterator":["1"]},"MappedIterable":{"Iterable":["2"],"Iterable.E":"2"},"EfficientLengthMappedIterable":{"MappedIterable":["1","2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"Iterable.E":"2"},"MappedIterator":{"Iterator":["2"]},"MappedListIterable":{"ListIterable":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListIterable.E":"2","Iterable.E":"2"},"WhereIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereIterator":{"Iterator":["1"]},"ExpandIterable":{"Iterable":["2"],"Iterable.E":"2"},"ExpandIterator":{"Iterator":["2"]},"TakeIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthTakeIterable":{"TakeIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"TakeIterator":{"Iterator":["1"]},"SkipIterable":{"Iterable":["1"],"Iterable.E":"1"},"EfficientLengthSkipIterable":{"SkipIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"SkipIterator":{"Iterator":["1"]},"EmptyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"EmptyIterator":{"Iterator":["1"]},"WhereTypeIterable":{"Iterable":["1"],"Iterable.E":"1"},"WhereTypeIterator":{"Iterator":["1"]},"UnmodifiableListBase":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"ReversedListIterable":{"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"ConstantMap":{"Map":["1","2"]},"ConstantStringMap":{"ConstantMap":["1","2"],"Map":["1","2"]},"_KeysOrValues":{"Iterable":["1"],"Iterable.E":"1"},"_KeysOrValuesOrElementsIterator":{"Iterator":["1"]},"Instantiation":{"Closure":[],"Function":[]},"Instantiation1":{"Closure":[],"Function":[]},"NullError":{"TypeError":[],"Error":[]},"JsNoSuchMethodError":{"Error":[]},"UnknownJsTypeError":{"Error":[]},"NullThrownFromJavaScriptException":{"Exception":[]},"_StackTrace":{"StackTrace":[]},"Closure":{"Function":[]},"Closure0Args":{"Closure":[],"Function":[]},"Closure2Args":{"Closure":[],"Function":[]},"TearOffClosure":{"Closure":[],"Function":[]},"StaticClosure":{"Closure":[],"Function":[]},"BoundClosure":{"Closure":[],"Function":[]},"RuntimeError":{"Error":[]},"JsLinkedHashMap":{"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"LinkedHashMapKeysIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapKeyIterator":{"Iterator":["1"]},"LinkedHashMapValuesIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"LinkedHashMapValueIterator":{"Iterator":["1"]},"LinkedHashMapEntriesIterable":{"EfficientLengthIterable":["MapEntry<1,2>"],"Iterable":["MapEntry<1,2>"],"Iterable.E":"MapEntry<1,2>"},"LinkedHashMapEntryIterator":{"Iterator":["MapEntry<1,2>"]},"JsIdentityLinkedHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"JSSyntaxRegExp":{"RegExp":[],"Pattern":[]},"_MatchImplementation":{"RegExpMatch":[],"Match":[]},"_AllMatchesIterable":{"Iterable":["RegExpMatch"],"Iterable.E":"RegExpMatch"},"_AllMatchesIterator":{"Iterator":["RegExpMatch"]},"StringMatch":{"Match":[]},"_StringAllMatchesIterable":{"Iterable":["Match"],"Iterable.E":"Match"},"_StringAllMatchesIterator":{"Iterator":["Match"]},"NativeByteBuffer":{"JavaScriptObject":[],"JSObject":[],"ByteBuffer":[],"TrustedGetRuntimeType":[]},"NativeTypedData":{"JavaScriptObject":[],"JSObject":[]},"NativeByteData":{"JavaScriptObject":[],"ByteData":[],"JSObject":[],"TrustedGetRuntimeType":[]},"NativeTypedArray":{"JavaScriptIndexingBehavior":["1"],"JavaScriptObject":[],"JSObject":[],"JSIndexable":["1"]},"NativeTypedArrayOfDouble":{"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"]},"NativeTypedArrayOfInt":{"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"]},"NativeFloat32List":{"Float32List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeFloat64List":{"Float64List":[],"ListBase":["double"],"NativeTypedArray":["double"],"List":["double"],"JavaScriptIndexingBehavior":["double"],"JavaScriptObject":[],"EfficientLengthIterable":["double"],"JSObject":[],"JSIndexable":["double"],"Iterable":["double"],"FixedLengthListMixin":["double"],"TrustedGetRuntimeType":[],"ListBase.E":"double","Iterable.E":"double","FixedLengthListMixin.E":"double"},"NativeInt16List":{"NativeTypedArrayOfInt":[],"Int16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt32List":{"NativeTypedArrayOfInt":[],"Int32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeInt8List":{"NativeTypedArrayOfInt":[],"Int8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint16List":{"NativeTypedArrayOfInt":[],"Uint16List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint32List":{"NativeTypedArrayOfInt":[],"Uint32List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8ClampedList":{"NativeTypedArrayOfInt":[],"Uint8ClampedList":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"NativeUint8List":{"NativeTypedArrayOfInt":[],"Uint8List":[],"ListBase":["int"],"NativeTypedArray":["int"],"List":["int"],"JavaScriptIndexingBehavior":["int"],"JavaScriptObject":[],"EfficientLengthIterable":["int"],"JSObject":[],"JSIndexable":["int"],"Iterable":["int"],"FixedLengthListMixin":["int"],"TrustedGetRuntimeType":[],"ListBase.E":"int","Iterable.E":"int","FixedLengthListMixin.E":"int"},"_Type":{"Type":[]},"_Error":{"Error":[]},"_TypeError":{"TypeError":[],"Error":[]},"AsyncError":{"Error":[]},"_TimerImpl":{"Timer":[]},"_AsyncAwaitCompleter":{"Completer":["1"]},"_Completer":{"Completer":["1"]},"_AsyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_SyncCompleter":{"_Completer":["1"],"Completer":["1"]},"_Future":{"Future":["1"]},"StreamView":{"Stream":["1"]},"_StreamController":{"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_AsyncStreamController":{"_AsyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_SyncStreamController":{"_SyncStreamControllerDispatch":["1"],"_StreamController":["1"],"StreamController":["1"],"StreamSink":["1"],"_StreamControllerLifecycle":["1"],"_EventSink":["1"],"_EventDispatch":["1"]},"_ControllerStream":{"_StreamImpl":["1"],"Stream":["1"],"Stream.T":"1"},"_ControllerSubscription":{"_BufferingStreamSubscription":["1"],"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamSinkWrapper":{"StreamSink":["1"]},"_BufferingStreamSubscription":{"StreamSubscription":["1"],"_EventSink":["1"],"_EventDispatch":["1"],"_BufferingStreamSubscription.T":"1"},"_StreamImpl":{"Stream":["1"]},"_DelayedData":{"_DelayedEvent":["1"]},"_DelayedError":{"_DelayedEvent":["@"]},"_DelayedDone":{"_DelayedEvent":["@"]},"_DoneStreamSubscription":{"StreamSubscription":["1"]},"_EmptyStream":{"Stream":["1"],"Stream.T":"1"},"_ForwardingStream":{"Stream":["2"]},"_ForwardingStreamSubscription":{"_BufferingStreamSubscription":["2"],"StreamSubscription":["2"],"_EventSink":["2"],"_EventDispatch":["2"],"_BufferingStreamSubscription.T":"2"},"_MapStream":{"_ForwardingStream":["1","2"],"Stream":["2"],"Stream.T":"2"},"_ZoneSpecification":{"ZoneSpecification":[]},"_ZoneDelegate":{"ZoneDelegate":[]},"_Zone":{"Zone":[]},"_CustomZone":{"_Zone":[],"Zone":[]},"_RootZone":{"_Zone":[],"Zone":[]},"_SplayTreeSetNode":{"_SplayTreeNode":["1","_SplayTreeSetNode<1>"],"_SplayTreeNode.K":"1","_SplayTreeNode.1":"_SplayTreeSetNode<1>"},"_HashMap":{"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_IdentityHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_CustomHashMap":{"_HashMap":["1","2"],"MapBase":["1","2"],"HashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashMapKeyIterable":{"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashMapKeyIterator":{"Iterator":["1"]},"_LinkedCustomHashMap":{"JsLinkedHashMap":["1","2"],"MapBase":["1","2"],"LinkedHashMap":["1","2"],"Map":["1","2"],"MapBase.K":"1","MapBase.V":"2"},"_HashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_HashSetIterator":{"Iterator":["1"]},"_LinkedHashSet":{"_SetBase":["1"],"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"Iterable.E":"1"},"_LinkedHashSetIterator":{"Iterator":["1"]},"UnmodifiableListView":{"ListBase":["1"],"UnmodifiableListMixin":["1"],"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","Iterable.E":"1","UnmodifiableListMixin.E":"1"},"ListBase":{"List":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"MapBase":{"Map":["1","2"]},"MapView":{"Map":["1","2"]},"UnmodifiableMapView":{"_UnmodifiableMapView_MapView__UnmodifiableMapMixin":["1","2"],"MapView":["1","2"],"_UnmodifiableMapMixin":["1","2"],"Map":["1","2"]},"ListQueue":{"Queue":["1"],"ListIterable":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListIterable.E":"1","Iterable.E":"1"},"_ListQueueIterator":{"Iterator":["1"]},"SetBase":{"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SetBase":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"]},"_SplayTreeIterator":{"Iterator":["3"]},"_SplayTreeKeyIterator":{"_SplayTreeIterator":["1","2","1"],"Iterator":["1"],"_SplayTreeIterator.K":"1","_SplayTreeIterator.T":"1","_SplayTreeIterator.1":"2"},"SplayTreeSet":{"SetBase":["1"],"Set":["1"],"EfficientLengthIterable":["1"],"_SplayTree":["1","_SplayTreeSetNode<1>"],"Iterable":["1"],"Iterable.E":"1","_SplayTree.1":"_SplayTreeSetNode<1>","_SplayTree.K":"1"},"Encoding":{"Codec":["String","List"]},"_JsonMap":{"MapBase":["String","@"],"Map":["String","@"],"MapBase.K":"String","MapBase.V":"@"},"_JsonMapKeyIterable":{"ListIterable":["String"],"EfficientLengthIterable":["String"],"Iterable":["String"],"ListIterable.E":"String","Iterable.E":"String"},"AsciiCodec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"_UnicodeSubsetEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"AsciiEncoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"_UnicodeSubsetDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"AsciiDecoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Codec":{"Codec":["List","String"],"Codec.S":"List"},"Base64Encoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Base64Decoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Converter":{"StreamTransformer":["1","2"]},"JsonUnsupportedObjectError":{"Error":[]},"JsonCyclicError":{"Error":[]},"JsonCodec":{"Codec":["Object?","String"],"Codec.S":"Object?"},"JsonEncoder":{"Converter":["Object?","String"],"StreamTransformer":["Object?","String"]},"JsonDecoder":{"Converter":["String","Object?"],"StreamTransformer":["String","Object?"]},"Latin1Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Latin1Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Latin1Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"Utf8Codec":{"Encoding":[],"Codec":["String","List"],"Codec.S":"String"},"Utf8Encoder":{"Converter":["String","List"],"StreamTransformer":["String","List"]},"Utf8Decoder":{"Converter":["List","String"],"StreamTransformer":["List","String"]},"BigInt":{"Comparable":["BigInt"]},"DateTime":{"Comparable":["DateTime"]},"double":{"num":[],"Comparable":["num"]},"Duration":{"Comparable":["Duration"]},"int":{"num":[],"Comparable":["num"]},"List":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"num":{"Comparable":["num"]},"RegExp":{"Pattern":[]},"RegExpMatch":{"Match":[]},"Set":{"EfficientLengthIterable":["1"],"Iterable":["1"]},"String":{"Comparable":["String"],"Pattern":[]},"_BigIntImpl":{"BigInt":[],"Comparable":["BigInt"]},"AssertionError":{"Error":[]},"TypeError":{"Error":[]},"ArgumentError":{"Error":[]},"RangeError":{"Error":[]},"IndexError":{"Error":[]},"UnsupportedError":{"Error":[]},"UnimplementedError":{"Error":[]},"StateError":{"Error":[]},"ConcurrentModificationError":{"Error":[]},"OutOfMemoryError":{"Error":[]},"StackOverflowError":{"Error":[]},"_Exception":{"Exception":[]},"FormatException":{"Exception":[]},"IntegerDivisionByZeroException":{"Exception":[],"Error":[]},"_StringStackTrace":{"StackTrace":[]},"StringBuffer":{"StringSink":[]},"_Uri":{"Uri":[]},"_SimpleUri":{"Uri":[]},"_DataUri":{"Uri":[]},"NullRejectionException":{"Exception":[]},"_JSRandom":{"Random":[]},"DelegatingStreamSink":{"StreamSink":["1"]},"ErrorResult":{"Result":["0&"]},"ValueResult":{"Result":["1"]},"_NextRequest":{"_EventRequest":["1"]},"_HasNextRequest":{"_EventRequest":["1"]},"BuiltList":{"Iterable":["1"]},"_BuiltList":{"BuiltList":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltListMultimap":{"BuiltListMultimap":["1","2"]},"_BuiltMap":{"BuiltMap":["1","2"]},"BuiltSet":{"Iterable":["1"]},"_BuiltSet":{"BuiltSet":["1"],"Iterable":["1"],"Iterable.E":"1"},"_BuiltSetMultimap":{"BuiltSetMultimap":["1","2"]},"BuiltValueNullFieldError":{"Error":[]},"BuiltValueNestedFieldError":{"Error":[]},"BoolJsonObject":{"JsonObject":[]},"ListJsonObject":{"JsonObject":[]},"MapJsonObject":{"JsonObject":[]},"NumJsonObject":{"JsonObject":[]},"StringJsonObject":{"JsonObject":[]},"DeserializationError":{"Error":[]},"BigIntSerializer":{"PrimitiveSerializer":["BigInt"],"Serializer":["BigInt"]},"BoolSerializer":{"PrimitiveSerializer":["bool"],"Serializer":["bool"]},"BuiltJsonSerializers":{"Serializers":[]},"BuiltListMultimapSerializer":{"StructuredSerializer":["BuiltListMultimap<@,@>"],"Serializer":["BuiltListMultimap<@,@>"]},"BuiltListSerializer":{"StructuredSerializer":["BuiltList<@>"],"Serializer":["BuiltList<@>"]},"BuiltMapSerializer":{"StructuredSerializer":["BuiltMap<@,@>"],"Serializer":["BuiltMap<@,@>"]},"BuiltSetMultimapSerializer":{"StructuredSerializer":["BuiltSetMultimap<@,@>"],"Serializer":["BuiltSetMultimap<@,@>"]},"BuiltSetSerializer":{"StructuredSerializer":["BuiltSet<@>"],"Serializer":["BuiltSet<@>"]},"DateTimeSerializer":{"PrimitiveSerializer":["DateTime"],"Serializer":["DateTime"]},"DoubleSerializer":{"PrimitiveSerializer":["double"],"Serializer":["double"]},"DurationSerializer":{"PrimitiveSerializer":["Duration"],"Serializer":["Duration"]},"Int32Serializer":{"PrimitiveSerializer":["Int32"],"Serializer":["Int32"]},"Int64Serializer":{"PrimitiveSerializer":["Int64"],"Serializer":["Int64"]},"IntSerializer":{"PrimitiveSerializer":["int"],"Serializer":["int"]},"JsonObjectSerializer":{"PrimitiveSerializer":["JsonObject"],"Serializer":["JsonObject"]},"ListSerializer":{"StructuredSerializer":["List<@>"],"Serializer":["List<@>"]},"MapSerializer":{"StructuredSerializer":["Map<@,@>"],"Serializer":["Map<@,@>"]},"NullSerializer":{"PrimitiveSerializer":["Null"],"Serializer":["Null"]},"NumSerializer":{"PrimitiveSerializer":["num"],"Serializer":["num"]},"RegExpSerializer":{"PrimitiveSerializer":["RegExp"],"Serializer":["RegExp"]},"SetSerializer":{"StructuredSerializer":["Set<@>"],"Serializer":["Set<@>"]},"StringSerializer":{"PrimitiveSerializer":["String"],"Serializer":["String"]},"Uint8ListSerializer":{"PrimitiveSerializer":["Uint8List"],"Serializer":["Uint8List"]},"UriSerializer":{"PrimitiveSerializer":["Uri"],"Serializer":["Uri"]},"CanonicalizedMap":{"Map":["2","3"]},"DefaultEquality":{"Equality":["1"]},"IterableEquality":{"Equality":["Iterable<1>"]},"ListEquality":{"Equality":["List<1>"]},"_UnorderedEquality":{"Equality":["2"]},"SetEquality":{"_UnorderedEquality":["1","Set<1>"],"Equality":["Set<1>"],"_UnorderedEquality.E":"1","_UnorderedEquality.T":"Set<1>"},"MapEquality":{"Equality":["Map<1,2>"]},"DeepCollectionEquality":{"Equality":["@"]},"QueueList":{"ListBase":["1"],"List":["1"],"Queue":["1"],"EfficientLengthIterable":["1"],"Iterable":["1"],"ListBase.E":"1","QueueList.E":"1","Iterable.E":"1"},"_CastQueueList":{"QueueList":["2"],"ListBase":["2"],"List":["2"],"Queue":["2"],"EfficientLengthIterable":["2"],"Iterable":["2"],"ListBase.E":"2","QueueList.E":"2","Iterable.E":"2"},"_$BuildStatusSerializer":{"PrimitiveSerializer":["BuildStatus"],"Serializer":["BuildStatus"]},"_$BuildResultSerializer":{"StructuredSerializer":["BuildResult"],"Serializer":["BuildResult"]},"_$BuildResult":{"BuildResult":[]},"_$ConnectRequestSerializer":{"StructuredSerializer":["ConnectRequest"],"Serializer":["ConnectRequest"]},"_$ConnectRequest":{"ConnectRequest":[]},"_$DebugEventSerializer":{"StructuredSerializer":["DebugEvent"],"Serializer":["DebugEvent"]},"_$BatchedDebugEventsSerializer":{"StructuredSerializer":["BatchedDebugEvents"],"Serializer":["BatchedDebugEvents"]},"_$DebugEvent":{"DebugEvent":[]},"_$BatchedDebugEvents":{"BatchedDebugEvents":[]},"_$DebugInfoSerializer":{"StructuredSerializer":["DebugInfo"],"Serializer":["DebugInfo"]},"_$DebugInfo":{"DebugInfo":[]},"_$DevToolsRequestSerializer":{"StructuredSerializer":["DevToolsRequest"],"Serializer":["DevToolsRequest"]},"_$DevToolsResponseSerializer":{"StructuredSerializer":["DevToolsResponse"],"Serializer":["DevToolsResponse"]},"_$DevToolsRequest":{"DevToolsRequest":[]},"_$DevToolsResponse":{"DevToolsResponse":[]},"_$ErrorResponseSerializer":{"StructuredSerializer":["ErrorResponse"],"Serializer":["ErrorResponse"]},"_$ErrorResponse":{"ErrorResponse":[]},"_$ExtensionRequestSerializer":{"StructuredSerializer":["ExtensionRequest"],"Serializer":["ExtensionRequest"]},"_$ExtensionResponseSerializer":{"StructuredSerializer":["ExtensionResponse"],"Serializer":["ExtensionResponse"]},"_$ExtensionEventSerializer":{"StructuredSerializer":["ExtensionEvent"],"Serializer":["ExtensionEvent"]},"_$BatchedEventsSerializer":{"StructuredSerializer":["BatchedEvents"],"Serializer":["BatchedEvents"]},"_$ExtensionRequest":{"ExtensionRequest":[]},"_$ExtensionResponse":{"ExtensionResponse":[]},"_$ExtensionEvent":{"ExtensionEvent":[]},"_$BatchedEvents":{"BatchedEvents":[]},"_$HotReloadRequestSerializer":{"StructuredSerializer":["HotReloadRequest"],"Serializer":["HotReloadRequest"]},"_$HotReloadRequest":{"HotReloadRequest":[]},"_$HotReloadResponseSerializer":{"StructuredSerializer":["HotReloadResponse"],"Serializer":["HotReloadResponse"]},"_$HotReloadResponse":{"HotReloadResponse":[]},"_$IsolateExitSerializer":{"StructuredSerializer":["IsolateExit"],"Serializer":["IsolateExit"]},"_$IsolateStartSerializer":{"StructuredSerializer":["IsolateStart"],"Serializer":["IsolateStart"]},"_$IsolateExit":{"IsolateExit":[]},"_$IsolateStart":{"IsolateStart":[]},"_$RegisterEventSerializer":{"StructuredSerializer":["RegisterEvent"],"Serializer":["RegisterEvent"]},"_$RegisterEvent":{"RegisterEvent":[]},"_$RunRequestSerializer":{"StructuredSerializer":["RunRequest"],"Serializer":["RunRequest"]},"_$RunRequest":{"RunRequest":[]},"SseSocketClient":{"SocketClient":[]},"WebSocketClient":{"SocketClient":[]},"Int32":{"Comparable":["Object"]},"Int64":{"Comparable":["Object"]},"ByteStream":{"StreamView":["List"],"Stream":["List"],"Stream.T":"List","StreamView.T":"List"},"ClientException":{"Exception":[]},"Request":{"BaseRequest":[]},"StreamedResponseV2":{"StreamedResponse":[]},"CaseInsensitiveMap":{"CanonicalizedMap":["String","String","1"],"Map":["String","1"],"CanonicalizedMap.K":"String","CanonicalizedMap.V":"1","CanonicalizedMap.C":"String"},"Level":{"Comparable":["Level"]},"PathException":{"Exception":[]},"PosixStyle":{"InternalStyle":[]},"UrlStyle":{"InternalStyle":[]},"WindowsStyle":{"InternalStyle":[]},"FileLocation":{"SourceLocation":[],"Comparable":["SourceLocation"]},"_FileSpan":{"SourceSpanWithContext":[],"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceLocation":{"Comparable":["SourceLocation"]},"SourceLocationMixin":{"SourceLocation":[],"Comparable":["SourceLocation"]},"SourceSpan":{"Comparable":["SourceSpan"]},"SourceSpanBase":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanException":{"Exception":[]},"SourceSpanFormatException":{"FormatException":[],"Exception":[]},"SourceSpanMixin":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SourceSpanWithContext":{"SourceSpan":[],"Comparable":["SourceSpan"]},"SseClient":{"StreamChannel":["String?"]},"GuaranteeChannel":{"StreamChannel":["1"]},"_GuaranteeSink":{"StreamSink":["1"]},"StreamChannelMixin":{"StreamChannel":["1"]},"StringScannerException":{"FormatException":[],"Exception":[]},"_EventStream":{"Stream":["1"],"Stream.T":"1"},"_EventStreamSubscription":{"StreamSubscription":["1"]},"BrowserWebSocket":{"WebSocket":[]},"TextDataReceived":{"WebSocketEvent":[]},"BinaryDataReceived":{"WebSocketEvent":[]},"CloseReceived":{"WebSocketEvent":[]},"WebSocketException":{"Exception":[]},"WebSocketConnectionClosed":{"Exception":[]},"AdapterWebSocketChannel":{"WebSocketChannel":[],"StreamChannel":["@"]},"_WebSocketSink":{"WebSocketSink":[],"DelegatingStreamSink":["@"],"StreamSink":["@"],"DelegatingStreamSink.T":"@"},"WebSocketChannelException":{"Exception":[]},"DdcLibraryBundleRestarter":{"Restarter":[]},"DdcRestarter":{"Restarter":[]},"RequireRestarter":{"Restarter":[]},"HotReloadFailedException":{"Exception":[]},"Int8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint8ClampedList":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint16List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Int32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Uint32List":{"List":["int"],"EfficientLengthIterable":["int"],"Iterable":["int"]},"Float32List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]},"Float64List":{"List":["double"],"EfficientLengthIterable":["double"],"Iterable":["double"]}}')); A._Universe_addErasedTypes(init.typeUniverse, JSON.parse('{"UnmodifiableListBase":1,"__CastListBase__CastIterableBase_ListMixin":2,"NativeTypedArray":1,"_DelayedEvent":1,"_SplayTreeSet__SplayTree_Iterable":1,"_SplayTreeSet__SplayTree_Iterable_SetMixin":1,"_QueueList_Object_ListMixin":1,"StreamChannelMixin":1}')); var string$ = { x00_____: "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u03f6\x00\u0404\u03f4 \u03f4\u03f6\u01f6\u01f6\u03f6\u03fc\u01f4\u03ff\u03ff\u0584\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u05d4\u01f4\x00\u01f4\x00\u0504\u05c4\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0400\x00\u0400\u0200\u03f7\u0200\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u03ff\u0200\u0200\u0200\u03f7\x00", @@ -28152,7 +28086,6 @@ Error_: "Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type", Hot_reA: "Hot reload is not supported for the AMD module format.", Hot_reD: "Hot reload is not supported for the DDC module format.", - max_mu: "max must be in range 0 < max \u2264 2^32, was ", serial: "serializer must be StructuredSerializer or PrimitiveSerializer" }; var type$ = (function rtii() { @@ -28168,8 +28101,6 @@ BuildResult: findType("BuildResult"), BuildStatus: findType("BuildStatus"), BuiltListMultimap_dynamic_dynamic: findType("BuiltListMultimap<@,@>"), - BuiltList_DebugEvent: findType("BuiltList"), - BuiltList_ExtensionEvent: findType("BuiltList"), BuiltList_dynamic: findType("BuiltList<@>"), BuiltList_nullable_Object: findType("BuiltList"), BuiltMap_dynamic_dynamic: findType("BuiltMap<@,@>"), @@ -28396,7 +28327,6 @@ B.JSString_methods = J.JSString.prototype; B.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; B.JavaScriptObject_methods = J.JavaScriptObject.prototype; - B.NativeByteData_methods = A.NativeByteData.prototype; B.NativeUint32List_methods = A.NativeUint32List.prototype; B.NativeUint8List_methods = A.NativeUint8List.prototype; B.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; @@ -28555,9 +28485,9 @@ B.Duration_5000000 = new A.Duration(5000000); B.Type_BuiltList_fj6 = A.typeLiteral("BuiltList<@>"); B.Type_DebugEvent_gLJ = A.typeLiteral("DebugEvent"); - B.List_empty1 = A._setArrayType(makeConstList([]), type$.JSArray_FullType); + B.List_empty1 = makeConstList([], type$.JSArray_FullType); B.FullType_np4 = new A.FullType(B.Type_DebugEvent_gLJ, B.List_empty1, false); - B.List_njn = A._setArrayType(makeConstList([B.FullType_np4]), type$.JSArray_FullType); + B.List_njn = makeConstList([B.FullType_np4], type$.JSArray_FullType); B.FullType_3Xm = new A.FullType(B.Type_BuiltList_fj6, B.List_njn, false); B.Type_String_AXU = A.typeLiteral("String"); B.FullType_PT1 = new A.FullType(B.Type_String_AXU, B.List_empty1, false); @@ -28566,15 +28496,15 @@ B.Type_BuiltSetMultimap_yT7 = A.typeLiteral("BuiltSetMultimap<@,@>"); B.Type_Object_A4p = A.typeLiteral("Object"); B.FullType_kV7 = new A.FullType(B.Type_Object_A4p, B.List_empty1, false); - B.List_03P = A._setArrayType(makeConstList([B.FullType_kV7, B.FullType_kV7]), type$.JSArray_FullType); + B.List_03P = makeConstList([B.FullType_kV7, B.FullType_kV7], type$.JSArray_FullType); B.FullType_SWR = new A.FullType(B.Type_BuiltSetMultimap_yT7, B.List_03P, false); B.Type_BuiltListMultimap_HQW = A.typeLiteral("BuiltListMultimap<@,@>"); B.FullType_WP0 = new A.FullType(B.Type_BuiltListMultimap_HQW, B.List_03P, false); B.Type_ExtensionEvent_T8C = A.typeLiteral("ExtensionEvent"); B.FullType_I4i = new A.FullType(B.Type_ExtensionEvent_T8C, B.List_empty1, false); - B.List_O9J = A._setArrayType(makeConstList([B.FullType_I4i]), type$.JSArray_FullType); + B.List_O9J = makeConstList([B.FullType_I4i], type$.JSArray_FullType); B.FullType_ahP = new A.FullType(B.Type_BuiltList_fj6, B.List_O9J, false); - B.List_LtY = A._setArrayType(makeConstList([B.FullType_kV7]), type$.JSArray_FullType); + B.List_LtY = makeConstList([B.FullType_kV7], type$.JSArray_FullType); B.FullType_hm4 = new A.FullType(B.Type_BuiltList_fj6, B.List_LtY, false); B.Type_BuildStatus_8KJ = A.typeLiteral("BuildStatus"); B.FullType_k5M = new A.FullType(B.Type_BuildStatus_8KJ, B.List_empty1, false); @@ -28594,61 +28524,61 @@ B.Level_WARNING_900 = new A.Level("WARNING", 900); B.Type_ExtensionRequest_9GR = A.typeLiteral("ExtensionRequest"); B.Type__$ExtensionRequest_o1C = A.typeLiteral("_$ExtensionRequest"); - B.List_2dD = A._setArrayType(makeConstList([B.Type_ExtensionRequest_9GR, B.Type__$ExtensionRequest_o1C]), type$.JSArray_Type); + B.List_2dD = makeConstList([B.Type_ExtensionRequest_9GR, B.Type__$ExtensionRequest_o1C], type$.JSArray_Type); B.Type_DebugInfo_ua9 = A.typeLiteral("DebugInfo"); B.Type__$DebugInfo_ywz = A.typeLiteral("_$DebugInfo"); - B.List_55I = A._setArrayType(makeConstList([B.Type_DebugInfo_ua9, B.Type__$DebugInfo_ywz]), type$.JSArray_Type); + B.List_55I = makeConstList([B.Type_DebugInfo_ua9, B.Type__$DebugInfo_ywz], type$.JSArray_Type); B.Type_ErrorResponse_WMn = A.typeLiteral("ErrorResponse"); B.Type__$ErrorResponse_9Ps = A.typeLiteral("_$ErrorResponse"); - B.List_5LV = A._setArrayType(makeConstList([B.Type_ErrorResponse_WMn, B.Type__$ErrorResponse_9Ps]), type$.JSArray_Type); + B.List_5LV = makeConstList([B.Type_ErrorResponse_WMn, B.Type__$ErrorResponse_9Ps], type$.JSArray_Type); B.Type_HotReloadResponse_Gqc = A.typeLiteral("HotReloadResponse"); B.Type__$HotReloadResponse_56g = A.typeLiteral("_$HotReloadResponse"); - B.List_DqJ = A._setArrayType(makeConstList([B.Type_HotReloadResponse_Gqc, B.Type__$HotReloadResponse_56g]), type$.JSArray_Type); + B.List_DqJ = makeConstList([B.Type_HotReloadResponse_Gqc, B.Type__$HotReloadResponse_56g], type$.JSArray_Type); B.Type_RegisterEvent_0Yw = A.typeLiteral("RegisterEvent"); B.Type__$RegisterEvent_Ks1 = A.typeLiteral("_$RegisterEvent"); - B.List_EMv = A._setArrayType(makeConstList([B.Type_RegisterEvent_0Yw, B.Type__$RegisterEvent_Ks1]), type$.JSArray_Type); + B.List_EMv = makeConstList([B.Type_RegisterEvent_0Yw, B.Type__$RegisterEvent_Ks1], type$.JSArray_Type); B.Type_DevToolsRequest_DxE = A.typeLiteral("DevToolsRequest"); B.Type__$DevToolsRequest_Rak = A.typeLiteral("_$DevToolsRequest"); - B.List_G46 = A._setArrayType(makeConstList([B.Type_DevToolsRequest_DxE, B.Type__$DevToolsRequest_Rak]), type$.JSArray_Type); + B.List_G46 = makeConstList([B.Type_DevToolsRequest_DxE, B.Type__$DevToolsRequest_Rak], type$.JSArray_Type); B.Type_IsolateStart_nRT = A.typeLiteral("IsolateStart"); B.Type__$IsolateStart_Pnq = A.typeLiteral("_$IsolateStart"); - B.List_KpG = A._setArrayType(makeConstList([B.Type_IsolateStart_nRT, B.Type__$IsolateStart_Pnq]), type$.JSArray_Type); + B.List_KpG = makeConstList([B.Type_IsolateStart_nRT, B.Type__$IsolateStart_Pnq], type$.JSArray_Type); B.Type_IsolateExit_QVA = A.typeLiteral("IsolateExit"); B.Type__$IsolateExit_4XE = A.typeLiteral("_$IsolateExit"); - B.List_MJN = A._setArrayType(makeConstList([B.Type_IsolateExit_QVA, B.Type__$IsolateExit_4XE]), type$.JSArray_Type); + B.List_MJN = makeConstList([B.Type_IsolateExit_QVA, B.Type__$IsolateExit_4XE], type$.JSArray_Type); B.Type_ExtensionResponse_0Oi = A.typeLiteral("ExtensionResponse"); B.Type__$ExtensionResponse_46G = A.typeLiteral("_$ExtensionResponse"); - B.List_RWp = A._setArrayType(makeConstList([B.Type_ExtensionResponse_0Oi, B.Type__$ExtensionResponse_46G]), type$.JSArray_Type); + B.List_RWp = makeConstList([B.Type_ExtensionResponse_0Oi, B.Type__$ExtensionResponse_46G], type$.JSArray_Type); B.Type_RunRequest_Hfm = A.typeLiteral("RunRequest"); B.Type__$RunRequest_3ad = A.typeLiteral("_$RunRequest"); - B.List_RlA = A._setArrayType(makeConstList([B.Type_RunRequest_Hfm, B.Type__$RunRequest_3ad]), type$.JSArray_Type); + B.List_RlA = makeConstList([B.Type_RunRequest_Hfm, B.Type__$RunRequest_3ad], type$.JSArray_Type); B.Type_DevToolsResponse_gVs = A.typeLiteral("DevToolsResponse"); B.Type__$DevToolsResponse_dcs = A.typeLiteral("_$DevToolsResponse"); - B.List_TEH = A._setArrayType(makeConstList([B.Type_DevToolsResponse_gVs, B.Type__$DevToolsResponse_dcs]), type$.JSArray_Type); - B.List_Type_BuildStatus_8KJ = A._setArrayType(makeConstList([B.Type_BuildStatus_8KJ]), type$.JSArray_Type); + B.List_TEH = makeConstList([B.Type_DevToolsResponse_gVs, B.Type__$DevToolsResponse_dcs], type$.JSArray_Type); + B.List_Type_BuildStatus_8KJ = makeConstList([B.Type_BuildStatus_8KJ], type$.JSArray_Type); B.Type_BatchedDebugEvents_v7B = A.typeLiteral("BatchedDebugEvents"); B.Type__$BatchedDebugEvents_LFV = A.typeLiteral("_$BatchedDebugEvents"); - B.List_WAE = A._setArrayType(makeConstList([B.Type_BatchedDebugEvents_v7B, B.Type__$BatchedDebugEvents_LFV]), type$.JSArray_Type); - B.List_ZNA = A._setArrayType(makeConstList([0, 0, 1048576, 531441, 1048576, 390625, 279936, 823543, 262144, 531441, 1000000, 161051, 248832, 371293, 537824, 759375, 1048576, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1048576, 35937, 39304, 42875, 46656]), type$.JSArray_int); + B.List_WAE = makeConstList([B.Type_BatchedDebugEvents_v7B, B.Type__$BatchedDebugEvents_LFV], type$.JSArray_Type); + B.List_ZNA = makeConstList([0, 0, 1048576, 531441, 1048576, 390625, 279936, 823543, 262144, 531441, 1000000, 161051, 248832, 371293, 537824, 759375, 1048576, 83521, 104976, 130321, 160000, 194481, 234256, 279841, 331776, 390625, 456976, 531441, 614656, 707281, 810000, 923521, 1048576, 35937, 39304, 42875, 46656], type$.JSArray_int); B.Type_HotReloadRequest_EsW = A.typeLiteral("HotReloadRequest"); B.Type__$HotReloadRequest_ynq = A.typeLiteral("_$HotReloadRequest"); - B.List_dz9 = A._setArrayType(makeConstList([B.Type_HotReloadRequest_EsW, B.Type__$HotReloadRequest_ynq]), type$.JSArray_Type); - B.List_empty = A._setArrayType(makeConstList([]), type$.JSArray_String); - B.List_empty0 = A._setArrayType(makeConstList([]), type$.JSArray_dynamic); - B.List_fAJ = A._setArrayType(makeConstList(["d", "D", "\u2202", "\xce"]), type$.JSArray_String); + B.List_dz9 = makeConstList([B.Type_HotReloadRequest_EsW, B.Type__$HotReloadRequest_ynq], type$.JSArray_Type); + B.List_empty = makeConstList([], type$.JSArray_String); + B.List_empty0 = makeConstList([], type$.JSArray_dynamic); + B.List_fAJ = makeConstList(["d", "D", "\u2202", "\xce"], type$.JSArray_String); B.Type__$DebugEvent_YX4 = A.typeLiteral("_$DebugEvent"); - B.List_fK8 = A._setArrayType(makeConstList([B.Type_DebugEvent_gLJ, B.Type__$DebugEvent_YX4]), type$.JSArray_Type); + B.List_fK8 = makeConstList([B.Type_DebugEvent_gLJ, B.Type__$DebugEvent_YX4], type$.JSArray_Type); B.Type_BatchedEvents_ABc = A.typeLiteral("BatchedEvents"); B.Type__$BatchedEvents_jAA = A.typeLiteral("_$BatchedEvents"); - B.List_oDF = A._setArrayType(makeConstList([B.Type_BatchedEvents_ABc, B.Type__$BatchedEvents_jAA]), type$.JSArray_Type); + B.List_oDF = makeConstList([B.Type_BatchedEvents_ABc, B.Type__$BatchedEvents_jAA], type$.JSArray_Type); B.Type_BuildResult_SAR = A.typeLiteral("BuildResult"); B.Type__$BuildResult_Iwz = A.typeLiteral("_$BuildResult"); - B.List_pLn = A._setArrayType(makeConstList([B.Type_BuildResult_SAR, B.Type__$BuildResult_Iwz]), type$.JSArray_Type); + B.List_pLn = makeConstList([B.Type_BuildResult_SAR, B.Type__$BuildResult_Iwz], type$.JSArray_Type); B.Type_ConnectRequest_8Nv = A.typeLiteral("ConnectRequest"); B.Type__$ConnectRequest_3Qd = A.typeLiteral("_$ConnectRequest"); - B.List_xmd = A._setArrayType(makeConstList([B.Type_ConnectRequest_8Nv, B.Type__$ConnectRequest_3Qd]), type$.JSArray_Type); + B.List_xmd = makeConstList([B.Type_ConnectRequest_8Nv, B.Type__$ConnectRequest_3Qd], type$.JSArray_Type); B.Type__$ExtensionEvent_WzR = A.typeLiteral("_$ExtensionEvent"); - B.List_yvR = A._setArrayType(makeConstList([B.Type_ExtensionEvent_T8C, B.Type__$ExtensionEvent_WzR]), type$.JSArray_Type); + B.List_yvR = makeConstList([B.Type_ExtensionEvent_T8C, B.Type__$ExtensionEvent_WzR], type$.JSArray_Type); B.Object_empty = {}; B.Map_empty0 = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap")); B.Map_empty = new A.ConstantStringMap(B.Object_empty, [], A.findType("ConstantStringMap<@,@>")); @@ -28668,10 +28598,13 @@ B.Type_JSObject_ttY = A.typeLiteral("JSObject"); B.Type_JsonObject_5jQ = A.typeLiteral("JsonObject"); B.Type_ListJsonObject_qcV = A.typeLiteral("ListJsonObject"); + B.Type_List_hc9 = A.typeLiteral("List<@>"); B.Type_MapJsonObject_VMr = A.typeLiteral("MapJsonObject"); + B.Type_Map_9Aj = A.typeLiteral("Map<@,@>"); B.Type_Null_0Rm = A.typeLiteral("Null"); B.Type_NumJsonObject_hYY = A.typeLiteral("NumJsonObject"); B.Type_RegExp_w5l = A.typeLiteral("RegExp"); + B.Type_Set_tZi = A.typeLiteral("Set<@>"); B.Type_StringJsonObject_NL7 = A.typeLiteral("StringJsonObject"); B.Type_Uint16List_kmP = A.typeLiteral("Uint16List"); B.Type_Uint32List_kmP = A.typeLiteral("Uint32List"); @@ -28743,6 +28676,7 @@ _lazy = hunkHelpers.lazy; _lazyFinal($, "DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", () => A.getIsolateAffinityTag("_$dart_dartClosure")); _lazyFinal($, "nullFuture", "$get$nullFuture", () => B.C__RootZone.run$1$1(new A.nullFuture_closure(), type$.Future_void)); + _lazyFinal($, "_safeToStringHooks", "$get$_safeToStringHooks", () => A._setArrayType([new J.JSArraySafeToStringHook()], A.findType("JSArray"))); _lazyFinal($, "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", () => A.TypeErrorDecoder_extractPattern(A.TypeErrorDecoder_provokeCallErrorOn({ toString: function() { return "$receiver$"; @@ -28807,11 +28741,6 @@ _lazyFinal($, "_Uri__needsNoEncoding", "$get$_Uri__needsNoEncoding", () => A.RegExp_RegExp("^[\\-\\.0-9A-Z_a-z~]*$", true, false)); _lazyFinal($, "_hashSeed", "$get$_hashSeed", () => A.objectHashCode(B.Type_Object_A4p)); _lazyFinal($, "_jsBoxedDartObjectProperty", "$get$_jsBoxedDartObjectProperty", () => Symbol("jsBoxedDartObjectProperty")); - _lazyFinal($, "Random__secureRandom", "$get$Random__secureRandom", () => { - var t1 = new A._JSSecureRandom(new DataView(new ArrayBuffer(A._checkLength(8)))); - t1._JSSecureRandom$0(); - return t1; - }); _lazyFinal($, "isSoundMode", "$get$isSoundMode", () => !type$.List_int._is(A._setArrayType([], A.findType("JSArray")))); _lazy($, "newBuiltValueToStringHelper", "$get$newBuiltValueToStringHelper", () => new A.newBuiltValueToStringHelper_closure()); _lazyFinal($, "_runtimeType", "$get$_runtimeType", () => A.getRuntimeTypeOfDartObject(A.RegExp_RegExp("", true, false))); @@ -28867,7 +28796,7 @@ _lazyFinal($, "_escapedChar", "$get$_escapedChar", () => A.RegExp_RegExp('["\\x00-\\x1F\\x7F]', true, false)); _lazyFinal($, "token", "$get$token", () => A.RegExp_RegExp('[^()<>@,;:"\\\\/[\\]?={} \\t\\x00-\\x1F\\x7F]+', true, false)); _lazyFinal($, "_lws", "$get$_lws", () => A.RegExp_RegExp("(?:\\r\\n)?[ \\t]+", true, false)); - _lazyFinal($, "_quotedString", "$get$_quotedString", () => A.RegExp_RegExp('"(?:[^"\\x00-\\x1F\\x7F\\\\]|\\\\.)*"', true, false)); + _lazyFinal($, "_quotedString", "$get$_quotedString", () => A.RegExp_RegExp('"(?:[^"\\x00-\\x1F\\x7F]|\\\\.)*"', true, false)); _lazyFinal($, "_quotedPair", "$get$_quotedPair", () => A.RegExp_RegExp("\\\\(.)", true, false)); _lazyFinal($, "nonToken", "$get$nonToken", () => A.RegExp_RegExp('[()<>@,;:"\\\\/\\[\\]?={} \\t\\x00-\\x1F\\x7F]', true, false)); _lazyFinal($, "whitespace", "$get$whitespace", () => A.RegExp_RegExp("(?:" + $.$get$_lws().pattern + ")*", true, false)); @@ -28886,7 +28815,10 @@ t4 = A.Completer_Completer(type$.dynamic); return new A.Pool(t2, t3, t1, 1000, new A.AsyncMemoizer(t4, A.findType("AsyncMemoizer<@>"))); }); - _lazy($, "V1State_random", "$get$V1State_random", () => new A.CryptoRNG()); + _lazy($, "V1State_random", "$get$V1State_random", () => { + var t1 = A.Random_Random(null); + return new A.MathRNG(t1); + }); _lazyFinal($, "UuidParsing__byteToHex", "$get$UuidParsing__byteToHex", () => { var i, _list = J.JSArray_JSArray$allocateGrowable(256, type$.String); @@ -28894,7 +28826,6 @@ _list[i] = B.JSString_methods.padLeft$2(B.JSInt_methods.toRadixString$1(i, 16), 2, "0"); return _list; }); - _lazyFinal($, "CryptoRNG__secureRandom", "$get$CryptoRNG__secureRandom", () => $.$get$Random__secureRandom()); _lazyFinal($, "_noncePattern", "$get$_noncePattern", () => A.RegExp_RegExp("^[\\w+/_-]+[=]{0,2}$", true, false)); _lazyFinal($, "_createScript", "$get$_createScript", () => new A._createScript_closure().call$0()); })(); diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index 3141d2c57..836a1de21 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -117,7 +117,7 @@ class ChromeProxyService implements VmServiceInterface { final _resumeAfterRestartEventsController = StreamController.broadcast(); - /// A global stream of resume events. + /// A global stream of resume events for hot restart. /// /// The values in the stream are the isolates IDs for the resume event. /// @@ -127,6 +127,12 @@ class ChromeProxyService implements VmServiceInterface { Stream get resumeAfterRestartEventsStream => _resumeAfterRestartEventsController.stream; + /// If non-null, a resume event should await the result of this after resuming + /// execution. + /// + /// This is used to complete a hot reload. + Future Function()? _finishHotReloadOnResume; + final _logger = Logger('ChromeProxyService'); final ExpressionCompiler? _compiler; @@ -227,6 +233,21 @@ class ChromeProxyService implements VmServiceInterface { } } + /// Reinitializes any caches so that they can be recomputed across hot reload. + // TODO(srujzs): We can maybe do better here than reinitializing all the data. + // Specifically, we can invalidate certain parts as we know what libraries + // will be stale, and therefore recompute information only for those libraries + // and possibly libraries that depend on them. Currently, there's no good + // separation between "existing" information and "new" information, making + // this difficult. + // https://github.com/dart-lang/webdev/issues/2628 + Future _reinitializeForHotReload() async { + final entrypoint = inspector.appConnection.request.entrypointPath; + await globalToolConfiguration.loadStrategy.trackEntrypoint(entrypoint); + _initializeEntrypoint(entrypoint); + await inspector.initialize(); + } + /// Initializes metadata in [Locations], [Modules], and [ExpressionCompiler]. void _initializeEntrypoint(String entrypoint) { _locations.initialize(entrypoint); @@ -448,21 +469,15 @@ class ChromeProxyService implements VmServiceInterface { } /// Removes the breakpoints in the running isolate. - /// - /// [libraries] is a set of Dart libraries, where if non-null, only - /// breakpoints within those libraries are removed. - Future disableBreakpoints({Set? libraries}) async { + Future disableBreakpoints() async { if (!_isIsolateRunning) return; final isolate = inspector.isolate; - for (final breakpoint in isolate.breakpoints?.toList() ?? []) { - if (libraries == null || - (breakpoint.location.script != null && - // ignore: avoid-collection-methods-with-unrelated-types - libraries.contains(breakpoint.location.script.uri))) { - await (await debuggerFuture).removeBreakpoint(breakpoint.id!); - } - } + final debugger = await debuggerFuture; + await Future.wait([ + for (final breakpoint in isolate.breakpoints ?? []) + debugger.removeBreakpoint(breakpoint.id!), + ]); } @override @@ -1160,7 +1175,9 @@ class ChromeProxyService implements VmServiceInterface { String? rootLibUri, String? packagesUri, }) async { - _logger.info('Attempting a hot reload'); + await isInitialized; + _checkIsolate('reloadSources', isolateId); + ReloadReport getFailedReloadReport(String error) => _ReloadReportWithMetadata(success: false) ..json = { @@ -1172,7 +1189,7 @@ class ChromeProxyService implements VmServiceInterface { if (useWebSocket) { await _performWebSocketHotReload(); } else { - await _performClientSideHotReload(); + await _performClientSideHotReload(isolateId); } } catch (e) { _logger.info('Hot reload failed: $e'); @@ -1182,26 +1199,64 @@ class ChromeProxyService implements VmServiceInterface { return _ReloadReportWithMetadata(success: true); } - /// Performs a client-side hot reload by fetching libraries, disabling breakpoints, and invoking the reload. - Future _performClientSideHotReload() async { - // Fetch the needed sources and libraries, disable breakpoints on the - // changed libraries, and then reload. - // TODO(srujzs): Re-map the breakpoints appropriately using events to - // trigger the client to re-register the breakpoints on the new sources. - // https://github.com/dart-lang/sdk/issues/60186 - _logger.info('Issuing \$fetchLibrariesForHotReload request'); - final librariesRemoteObject = await inspector.jsEvaluate( - '\$fetchLibrariesForHotReload();', + /// Performs a client-side hot reload by fetching libraries, handling + /// PausePostRequests, and invoking the reload. + Future _performClientSideHotReload(String isolateId) async { + _logger.info('Attempting a hot reload'); + + // Initiate a hot reload. + _logger.info('Issuing \$dartHotReloadStartDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadStartDwds();', awaitPromise: true, returnByValue: true, ); - _logger.info('\$fetchLibrariesForHotReload request complete.'); - final libraries = - (librariesRemoteObject.value as List).toSet().cast(); - await disableBreakpoints(libraries: libraries); - _logger.info('Issuing \$dartHotReloadDwds request'); - await inspector.jsEvaluate('\$dartHotReloadDwds();', awaitPromise: true); - _logger.info('\$dartHotReloadDwds request complete.'); + + if (!pauseIsolatesOnStart) { + // Finish hot reload immediately. + _logger.info('Issuing \$dartHotReloadEndDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadEndDwds();', + awaitPromise: true, + ); + _logger.info('\$dartHotReloadEndDwds request complete.'); + // TODO(srujzs): Supposedly Dart DevTools uses a kIsolateReload event + // for breakpoints? We should confirm and add tests before sending the + // event. + return; + } + // If `pause_isolates_on_start` is enabled, pause and then the reload + // should finish later after the client removes breakpoints, reregisters + // breakpoints, and resumes. + _finishHotReloadOnResume = () async { + // Client finished setting breakpoints, called resume, and now the + // execution has resumed. Finish the hot reload so we start executing + // the new code instead. + _logger.info('Issuing \$dartHotReloadEndDwds request'); + await inspector.jsEvaluate( + '\$dartHotReloadEndDwds();', + awaitPromise: true, + ); + _logger.info('\$dartHotReloadEndDwds request complete.'); + }; + + // Pause and wait for the pause to occur before managing breakpoints. + final pausedEvent = _firstStreamEvent('Debug', EventKind.kPauseInterrupted); + await pause(isolateId); + await pausedEvent; + + await _reinitializeForHotReload(); + + // This lets the client know that we're ready for breakpoint management + // and a resume. + _streamNotify( + 'Debug', + Event( + kind: EventKind.kPausePostRequest, + timestamp: DateTime.now().millisecondsSinceEpoch, + isolate: inspector.isolateRef, + ), + ); } /// Performs a WebSocket-based hot reload by sending a request and waiting for a response. @@ -1269,20 +1324,24 @@ class ChromeProxyService implements VmServiceInterface { _resumeAfterRestartEventsController.add(isolateId); return Success(); } + if (inspector.appConnection.isStarted) { - return captureElapsedTime(() async { + await captureElapsedTime(() async { await isInitialized; await isStarted; _checkIsolate('resume', isolateId); - return await (await debuggerFuture).resume( - step: step, - frameIndex: frameIndex, - ); + final debugger = await debuggerFuture; + return await debugger.resume(step: step, frameIndex: frameIndex); }, (result) => DwdsEvent.resume(step)); } else { inspector.appConnection.runMain(); - return Success(); } + // Finish the hot reload if needed. + if (_finishHotReloadOnResume != null) { + await _finishHotReloadOnResume!(); + _finishHotReloadOnResume = null; + } + return Success(); } /// This method is deprecated in vm_service package. @@ -1575,6 +1634,11 @@ class ChromeProxyService implements VmServiceInterface { controller.add(event); } + Future _firstStreamEvent(String streamId, String eventKind) { + final controller = _streamControllers[streamId]!; + return controller.stream.firstWhere((event) => event.kind == eventKind); + } + Future _handleDeveloperLog( IsolateRef isolateRef, ConsoleAPIEvent event, diff --git a/dwds/lib/src/utilities/dart_uri.dart b/dwds/lib/src/utilities/dart_uri.dart index 43f60d807..c1698a1c8 100644 --- a/dwds/lib/src/utilities/dart_uri.dart +++ b/dwds/lib/src/utilities/dart_uri.dart @@ -161,15 +161,25 @@ class DartUri { /// Returns resolved path for a package, app, or dart uri. static String? toResolvedUri(String uri) => _uriToResolvedUri[uri]; + static String _currentDirectory = p.current; + /// The directory in which we're running. /// /// We store this here because for tests we may want to act as if we're /// running in the directory of a target package, even if the current /// directory of the tests is actually the main dwds directory. - static String currentDirectory = p.current; + static String get currentDirectory => _currentDirectory; + + static set currentDirectory(String newDir) { + _currentDirectory = newDir; + _currentDirectoryUri = p.toUri(newDir).toString(); + } + + static String _currentDirectoryUri = p.toUri(currentDirectory).toString(); - /// The current directory as a file: Uri, saved here to avoid re-computing. - static final String currentDirectoryUri = '${p.toUri(currentDirectory)}'; + /// The current directory as a file: Uri, saved in a field to avoid + /// re-computing. + static String get currentDirectoryUri => _currentDirectoryUri; /// Record library and script uris to enable resolving library and script paths. static Future initialize() async { diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 4d32c5a90..7c0b832fc 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -53,6 +53,7 @@ dev_dependencies: graphs: ^2.1.0 frontend_server_common: path: ../frontend_server_common + io: ^1.0.5 js: '>=0.6.4 <0.8.0' pubspec_parse: ^1.2.0 puppeteer: ^3.1.1 diff --git a/dwds/test/build_daemon_callstack_test.dart b/dwds/test/build_daemon_callstack_test.dart index 96268b9e0..c93b58fc8 100644 --- a/dwds/test/build_daemon_callstack_test.dart +++ b/dwds/test/build_daemon_callstack_test.dart @@ -22,7 +22,7 @@ void main() { group('shared context |', () { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final project = TestProject.testPackage(); final context = TestContext(project, provider); diff --git a/dwds/test/build_daemon_circular_evaluate_test.dart b/dwds/test/build_daemon_circular_evaluate_test.dart index 941670ed4..760fb0bc3 100644 --- a/dwds/test/build_daemon_circular_evaluate_test.dart +++ b/dwds/test/build_daemon_circular_evaluate_test.dart @@ -14,7 +14,7 @@ import 'fixtures/context.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/build_daemon_evaluate_test.dart b/dwds/test/build_daemon_evaluate_test.dart index a50810547..2f59d551c 100644 --- a/dwds/test/build_daemon_evaluate_test.dart +++ b/dwds/test/build_daemon_evaluate_test.dart @@ -15,7 +15,7 @@ import 'fixtures/context.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/build_daemon_hot_restart_correctness_test.dart b/dwds/test/build_daemon_hot_restart_correctness_test.dart index 66042b6b6..a5599447c 100644 --- a/dwds/test/build_daemon_hot_restart_correctness_test.dart +++ b/dwds/test/build_daemon_hot_restart_correctness_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/build_daemon_hot_restart_test.dart b/dwds/test/build_daemon_hot_restart_test.dart index 12600703a..bb7a69192 100644 --- a/dwds/test/build_daemon_hot_restart_test.dart +++ b/dwds/test/build_daemon_hot_restart_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/chrome_proxy_service_amd_test.dart b/dwds/test/chrome_proxy_service_amd_test.dart index 296914d5d..7e83599e9 100644 --- a/dwds/test/chrome_proxy_service_amd_test.dart +++ b/dwds/test/chrome_proxy_service_amd_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; final compilationMode = CompilationMode.buildDaemon; diff --git a/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart b/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart index a9f31437a..515a25d7a 100644 --- a/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart +++ b/dwds/test/chrome_proxy_service_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/common/chrome_proxy_service_common.dart b/dwds/test/common/chrome_proxy_service_common.dart index 178aed35a..92b8a3e4e 100644 --- a/dwds/test/common/chrome_proxy_service_common.dart +++ b/dwds/test/common/chrome_proxy_service_common.dart @@ -2227,7 +2227,9 @@ void runTests({ test('reloadSources', () async { final service = context.service; - final report = await service.reloadSources(''); + final vm = await service.getVM(); + final isolateId = vm.isolates!.first.id!; + final report = await service.reloadSources(isolateId); // TODO(srujzs): This naturally fails regardless of the module format // because we didn't set up prerequisite state (the reload scripts). We // should create new tests for hot reload within DWDS and remove this diff --git a/dwds/test/common/hot_restart_common.dart b/dwds/test/common/hot_restart_common.dart index f1f0fce4a..504704a15 100644 --- a/dwds/test/common/hot_restart_common.dart +++ b/dwds/test/common/hot_restart_common.dart @@ -54,13 +54,6 @@ void runTests({ await recompile(hasEdits: true); } - void undoEdit() { - context.makeEditToDartEntryFile( - toReplace: newString, - replaceWith: originalString, - ); - } - /// Wait for main to finish executing before checking expectations by checking /// for a log output. /// @@ -77,9 +70,8 @@ void runTests({ completer.complete(); } }); - await completer.future.then((_) { - subscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } group( @@ -99,7 +91,6 @@ void runTests({ }); tearDown(() async { - undoEdit(); await context.tearDown(); }); @@ -132,7 +123,6 @@ void runTests({ }); tearDown(() async { - undoEdit(); await context.tearDown(); }); @@ -167,7 +157,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can live reload changes ', () async { @@ -205,7 +194,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('destroys and recreates the isolate during a hot restart', () async { @@ -423,7 +411,7 @@ void runTests({ var vm = await client.getVM(); var isolateId = vm.isolates!.first.id!; await client.streamListen('Debug'); - final stream = client.onEvent('Debug'); + final stream = client.onDebugEvent; final scriptList = await client.getScripts(isolateId); final main = scriptList.scripts!.firstWhere( (script) => script.uri!.contains('main.dart'), @@ -502,7 +490,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can hot restart changes ', () async { @@ -563,7 +550,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('can hot restart changes ', () async { @@ -610,7 +596,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test( diff --git a/dwds/test/common/hot_restart_correctness_common.dart b/dwds/test/common/hot_restart_correctness_common.dart index 5cdda1000..381c41a39 100644 --- a/dwds/test/common/hot_restart_correctness_common.dart +++ b/dwds/test/common/hot_restart_correctness_common.dart @@ -51,14 +51,6 @@ void runTests({ } } - void undoEdit() { - context.makeEditToDartLibFile( - libFileName: 'library2.dart', - toReplace: newString, - replaceWith: originalString, - ); - } - group('Injected client', () { VmService? fakeClient; @@ -78,7 +70,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test( @@ -145,7 +136,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('properly compares constants after hot restart', () async { @@ -189,7 +179,6 @@ void runTests({ tearDown(() async { await context.tearDown(); - undoEdit(); }); test('properly compares constants after hot restart', () async { diff --git a/dwds/test/dart_uri_file_uri_test.dart b/dwds/test/dart_uri_file_uri_test.dart index c84b1c3c6..7f223c8a4 100644 --- a/dwds/test/dart_uri_file_uri_test.dart +++ b/dwds/test/dart_uri_file_uri_test.dart @@ -26,13 +26,6 @@ void main() { final testProject = TestProject.test; final testPackageProject = TestProject.testPackage(); - /// The directory for the general _test package. - final testDir = testProject.absolutePackageDirectory; - - /// The directory for the _testPackage package (contained within dwds), - /// which imports _test. - final testPackageDir = testPackageProject.absolutePackageDirectory; - final context = TestContext(testPackageProject, provider); for (final compilationMode in CompilationMode.values) { @@ -71,7 +64,13 @@ void main() { test('file path to org-dartlang-app', () { final webMain = Uri.file( - p.join(testPackageDir, 'web', 'main.dart'), + p.join( + // The directory for the _testPackage package which imports + // _test. + testPackageProject.absolutePackageDirectory, + 'web', + 'main.dart', + ), ); final uri = DartUri('$webMain'); expect(uri.serverPath, appServerPath); @@ -79,14 +78,28 @@ void main() { test('file path to this package', () { final testPackageLib = Uri.file( - p.join(testPackageDir, 'lib', 'test_library.dart'), + p.join( + testPackageProject.absolutePackageDirectory, + 'lib', + 'test_library.dart', + ), ); final uri = DartUri('$testPackageLib'); expect(uri.serverPath, serverPath); }); test('file path to another package', () { - final testLib = Uri.file(p.join(testDir, 'lib', 'library.dart')); + final testLib = Uri.file( + p.join( + // The directory for the general _test package. This is going to + // be relative to the project in the `TestContext`. + testPackageProject.absolutePackageDirectory, + '..', + testProject.packageDirectory, + 'lib', + 'library.dart', + ), + ); final dartUri = DartUri('$testLib'); expect(dartUri.serverPath, anotherServerPath); }); diff --git a/dwds/test/devtools_test.dart b/dwds/test/devtools_test.dart index 2fef4633e..3c246fe74 100644 --- a/dwds/test/devtools_test.dart +++ b/dwds/test/devtools_test.dart @@ -132,11 +132,6 @@ void main() { await context.webDriver.driver.refresh(); await eventsDone; - // Re-set the edited file: - context.makeEditToDartEntryFile( - toReplace: 'Bonjour le monde!', - replaceWith: 'Hello World!', - ); }, skip: 'https://github.com/dart-lang/webdev/issues/1888', ); diff --git a/dwds/test/execution_context_test.dart b/dwds/test/execution_context_test.dart index acbe2f148..9f8b59b5e 100644 --- a/dwds/test/execution_context_test.dart +++ b/dwds/test/execution_context_test.dart @@ -20,7 +20,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import 'fixtures/fakes.dart'; void main() async { - final debug = false; + const debug = false; group('ExecutionContext', () { setUpAll(() { diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index 3f7090725..a6a1ab373 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -89,7 +89,7 @@ class TestContext { WebDriver? _webDriver; Process get chromeDriver => _chromeDriver!; - late Process? _chromeDriver; + Process? _chromeDriver; WebkitDebugger get webkitDebugger => _webkitDebugger!; late WebkitDebugger? _webkitDebugger; @@ -98,7 +98,7 @@ class TestContext { late Handler? _assetHandler; Client get client => _client!; - late Client? _client; + Client? _client; ExpressionCompilerService? ddcService; @@ -106,7 +106,7 @@ class TestContext { late int? _port; Directory get outputDir => _outputDir!; - late Directory? _outputDir; + Directory? _outputDir; late WipConnection extensionConnection; late AppConnection appConnection; @@ -129,18 +129,7 @@ class TestContext { /// External VM service. VmService get vmService => debugConnection.vmService; - TestContext(this.project, this.sdkConfigurationProvider) { - DartUri.currentDirectory = project.absolutePackageDirectory; - - project.validate(); - - _logger.info( - 'Serving: ${project.directoryToServe}/${project.filePathToServe}', - ); - _logger.info('Project: ${project.absolutePackageDirectory}'); - _logger.info('Packages: ${project.packageConfigFile}'); - _logger.info('Entry: ${project.dartEntryFilePath}'); - } + TestContext(this.project, this.sdkConfigurationProvider); Future setUp({ TestSettings testSettings = const TestSettings(), @@ -160,10 +149,17 @@ class TestContext { final sdkLayout = sdkConfigurationProvider.sdkLayout; final configuration = await sdkConfigurationProvider.configuration; configuration.validate(); - await project.cleanUp(); + await project.setUp(); DartUri.currentDirectory = project.absolutePackageDirectory; + _logger.info( + 'Serving: ${project.directoryToServe}/${project.filePathToServe}', + ); + _logger.info('Project: ${project.absolutePackageDirectory}'); + _logger.info('Packages: ${project.packageConfigFile}'); + _logger.info('Entry: ${project.dartEntryFilePath}'); + configureLogWriter(); _client = IOClient( @@ -542,16 +538,17 @@ class TestContext { } Future tearDown() async { + await _webRunner?.stop(); await _webDriver?.quit(closeSession: true); _chromeDriver?.kill(); DartUri.currentDirectory = p.current; await _daemonClient?.close(); await ddcService?.stop(); - await _webRunner?.stop(); await _testServer?.stop(); _client?.close(); await _outputDir?.delete(recursive: true); stopLogWriter(); + await project.tearDown(); // clear the state for next setup _webDriver = null; @@ -590,11 +587,6 @@ class TestContext { file.writeAsStringSync(contents); } - void removeLibraryFile({required String libFileName}) { - final file = File(project.dartLibFilePath(libFileName)); - file.deleteSync(); - } - Future recompile({required bool fullRestart}) async { await webRunner.run( frontendServerFileSystem, diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 8ce0d88e6..46bd9193b 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -4,7 +4,9 @@ import 'dart:io'; +import 'package:io/io.dart'; import 'package:path/path.dart' as p; +import 'package:pubspec_parse/pubspec_parse.dart'; import 'package:test_common/utilities.dart'; enum IndexBaseMode { noBase, base } @@ -17,10 +19,12 @@ class TestProject { final String dartEntryFileName; final String htmlEntryFileName; + late Directory _fixturesCopy; + /// The top level directory in which we run the test server, e.g. - /// "/workstation/webdev/fixtures/_testSound". + /// "/tmp/_testSound". String get absolutePackageDirectory => - absolutePath(pathFromFixtures: packageDirectory); + p.join(_fixturesCopy.absolute.path, packageDirectory); /// The directory to build and serve, e.g. "example". String get directoryToServe => p.split(webAssetsPath).first; @@ -35,14 +39,13 @@ class TestProject { } /// The path to the Dart entry file, e.g, - /// "/workstation/webdev/fixtures/_testSound/example/hello_world/main.dart": - String get dartEntryFilePath => absolutePath( - pathFromFixtures: p.joinAll([ - packageDirectory, - webAssetsPath, - dartEntryFileName, - ]), - ); + /// "/tmp/_testSound/example/hello_world/main.dart": + String get dartEntryFilePath => p.joinAll([ + _fixturesCopy.absolute.path, + packageDirectory, + webAssetsPath, + dartEntryFileName, + ]); /// The URI for the package_config.json is located in: /// `/.dart_tool/package_config` @@ -56,7 +59,7 @@ class TestProject { 'org-dartlang-app:///${p.join(webAssetsPath, dartEntryFileName)}', ); - const TestProject.testPackage({IndexBaseMode baseMode = IndexBaseMode.noBase}) + TestProject.testPackage({IndexBaseMode baseMode = IndexBaseMode.noBase}) : this._( packageName: '_test_package_sound', packageDirectory: '_testPackageSound', @@ -66,7 +69,7 @@ class TestProject { baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', ); - static const testCircular1 = TestProject._( + static final testCircular1 = TestProject._( packageName: '_test_circular1_sound', packageDirectory: '_testCircular1Sound', webAssetsPath: 'web', @@ -74,18 +77,17 @@ class TestProject { htmlEntryFileName: 'index.html', ); - const TestProject.testCircular2({ - IndexBaseMode baseMode = IndexBaseMode.noBase, - }) : this._( - packageName: '_test_circular2_sound', - packageDirectory: '_testCircular2Sound', - webAssetsPath: 'web', - dartEntryFileName: 'main.dart', - htmlEntryFileName: - baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', - ); - - static const test = TestProject._( + TestProject.testCircular2({IndexBaseMode baseMode = IndexBaseMode.noBase}) + : this._( + packageName: '_test_circular2_sound', + packageDirectory: '_testCircular2Sound', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: + baseMode == IndexBaseMode.base ? 'base_index.html' : 'index.html', + ); + + static final test = TestProject._( packageName: '_test_sound', packageDirectory: '_testSound', webAssetsPath: 'example/hello_world', @@ -109,7 +111,7 @@ class TestProject { htmlEntryFileName: 'index.html', ); - static const testExperiment = TestProject._( + static final testExperiment = TestProject._( packageName: '_experiment_sound', packageDirectory: '_experimentSound', webAssetsPath: 'web', @@ -117,7 +119,7 @@ class TestProject { htmlEntryFileName: 'index.html', ); - static const testHotRestart1 = TestProject._( + static final testHotRestart1 = TestProject._( packageName: '_test_hot_restart1', packageDirectory: '_testHotRestart1Sound', webAssetsPath: 'web', @@ -127,7 +129,7 @@ class TestProject { /// This series of hot restart tests is divided across multiple packages in /// order to test correctness when only a subset of libraries are updated. - static const testHotRestart2 = TestProject._( + static final testHotRestart2 = TestProject._( packageName: '_test_hot_restart2', packageDirectory: '_testHotRestart2Sound', webAssetsPath: 'web', @@ -135,7 +137,7 @@ class TestProject { htmlEntryFileName: 'index.html', ); - static const testHotRestartBreakpoints = TestProject._( + static final testHotRestartBreakpoints = TestProject._( packageName: '_test_hot_restart_breakpoints', packageDirectory: '_testHotRestartBreakpoints', webAssetsPath: 'web', @@ -143,7 +145,7 @@ class TestProject { htmlEntryFileName: 'index.html', ); - static const testHotReload = TestProject._( + static final testHotReload = TestProject._( packageName: '_test_hot_reload', packageDirectory: '_testHotReload', webAssetsPath: 'web', @@ -151,7 +153,15 @@ class TestProject { htmlEntryFileName: 'index.html', ); - const TestProject._({ + static final testHotReloadBreakpoints = TestProject._( + packageName: '_test_hot_reload_breakpoints', + packageDirectory: '_testHotReloadBreakpoints', + webAssetsPath: 'web', + dartEntryFileName: 'main.dart', + htmlEntryFileName: 'index.html', + ); + + TestProject._({ required this.packageName, required this.packageDirectory, required this.webAssetsPath, @@ -159,25 +169,90 @@ class TestProject { required this.htmlEntryFileName, }); - void validate() { - // Verify that the web assets path has no starting slash: - assert(!webAssetsPath.startsWith('/')); - } + static Future _copyPackageAndPathDependenciesIntoTempDirectory( + Directory tempDirectory, + String packageDirectory, + Set copiedPackageDirectories, + ) async { + // There may be cycles in dependencies, so check that we already copied this + // package. + if (copiedPackageDirectories.contains(packageDirectory)) return; + final currentPath = absolutePath(pathFromFixtures: packageDirectory); + final newPath = p.join(tempDirectory.absolute.path, packageDirectory); + Directory(newPath).createSync(); + copyPathSync(currentPath, newPath); + copiedPackageDirectories.add(packageDirectory); + final pubspec = Pubspec.parse( + File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(), + ); + for (final dependency in pubspec.dependencies.values) { + if (dependency is PathDependency) { + final dependencyDirectory = Directory( + p.normalize(p.join(currentPath, dependency.path)), + ); + // It may be okay to do some more complicated copying here for path + // dependencies that aren't immediately under `fixtures`, but for now, + // only support those that are. + assert( + dependencyDirectory.parent.path == Directory(currentPath).parent.path, + 'Path dependency of $packageDirectory: ' + '${dependencyDirectory.path} is not an immediate directory in ' + '`fixtures`.', + ); + await _copyPackageAndPathDependenciesIntoTempDirectory( + tempDirectory, + p.basename(dependencyDirectory.path), + copiedPackageDirectories, + ); + } + } - /// Clean up the project. - /// Called when we need to rebuild sdk and the app from - /// previous test configurations. - Future cleanUp() async { + // Clean up the project. + // Called when we need to rebuild sdk and the app from previous test + // configurations. await Process.run('dart', [ 'run', 'build_runner', 'clean', - ], workingDirectory: absolutePackageDirectory); + ], workingDirectory: newPath); + } + + Future setUp() async { + // Verify that the web assets path has no starting slash. + assert(!webAssetsPath.startsWith('/')); + // Copy the package into a temporary directory to allow editing of files if + // needed. + final systemTempDir = Directory( + // Resolve symbolic links as build_daemon tests rely on paths matching + // between the client and the daemon. + Directory.systemTemp.resolveSymbolicLinksSync(), + ); + _fixturesCopy = systemTempDir.createTempSync(); + await _copyPackageAndPathDependenciesIntoTempDirectory( + _fixturesCopy, + packageDirectory, + {}, + ); + } + + /// Delete the copy of the project. + Future tearDown() async { + try { + _fixturesCopy.deleteSync(recursive: true); + } on FileSystemException catch (_) { + // On Windows, the build daemon process might still be accessing the + // working directory, so wait a second and then try again. + await Future.delayed(const Duration(seconds: 1)); + _fixturesCopy.deleteSync(recursive: true); + } } /// The path to the Dart specified file in the 'lib' directory, e.g, - /// "/workstation/webdev/fixtures/_testSound/lib/library.dart": - String dartLibFilePath(String dartLibFileName) => absolutePath( - pathFromFixtures: p.joinAll([packageDirectory, 'lib', dartLibFileName]), - ); + /// "/tmp/_testSound/lib/library.dart": + String dartLibFilePath(String dartLibFileName) => p.joinAll([ + _fixturesCopy.absolute.path, + packageDirectory, + 'lib', + dartLibFileName, + ]); } diff --git a/dwds/test/frontend_server_breakpoint_test.dart b/dwds/test/frontend_server_breakpoint_test.dart index 9823e6117..d1f9fe523 100644 --- a/dwds/test/frontend_server_breakpoint_test.dart +++ b/dwds/test/frontend_server_breakpoint_test.dart @@ -18,7 +18,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_callstack_test.dart b/dwds/test/frontend_server_callstack_test.dart index 79f6f0e6c..64ff9e359 100644 --- a/dwds/test/frontend_server_callstack_test.dart +++ b/dwds/test/frontend_server_callstack_test.dart @@ -18,7 +18,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_circular_evaluate_test.dart b/dwds/test/frontend_server_circular_evaluate_test.dart index 19ce2a345..33b0edaf8 100644 --- a/dwds/test/frontend_server_circular_evaluate_test.dart +++ b/dwds/test/frontend_server_circular_evaluate_test.dart @@ -17,7 +17,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_ddc_evaluate_test.dart b/dwds/test/frontend_server_ddc_evaluate_test.dart index dc67a431e..4ed878a6e 100644 --- a/dwds/test/frontend_server_ddc_evaluate_test.dart +++ b/dwds/test/frontend_server_ddc_evaluate_test.dart @@ -19,7 +19,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, diff --git a/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart b/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart index 3f5e5927d..157ee82b1 100644 --- a/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart +++ b/dwds/test/frontend_server_ddc_library_bundle_evaluate_test.dart @@ -19,7 +19,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, diff --git a/dwds/test/frontend_server_evaluate_test.dart b/dwds/test/frontend_server_evaluate_test.dart index 2ccfd489e..02d798661 100644 --- a/dwds/test/frontend_server_evaluate_test.dart +++ b/dwds/test/frontend_server_evaluate_test.dart @@ -18,7 +18,7 @@ import 'fixtures/project.dart'; void main() async { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/frontend_server_hot_restart_correctness_test.dart b/dwds/test/frontend_server_hot_restart_correctness_test.dart index 198e6546c..b1aeda73e 100644 --- a/dwds/test/frontend_server_hot_restart_correctness_test.dart +++ b/dwds/test/frontend_server_hot_restart_correctness_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/frontend_server_hot_restart_test.dart b/dwds/test/frontend_server_hot_restart_test.dart index 95d98bd28..df48f2a95 100644 --- a/dwds/test/frontend_server_hot_restart_test.dart +++ b/dwds/test/frontend_server_hot_restart_test.dart @@ -16,7 +16,7 @@ import 'fixtures/context.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart new file mode 100644 index 000000000..bd9ec0bff --- /dev/null +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -0,0 +1,468 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Tags(['daily']) +@TestOn('vm') +@Timeout(Duration(minutes: 5)) +library; + +import 'dart:async'; +import 'dart:io'; + +import 'package:dwds/expression_compiler.dart'; +import 'package:test/test.dart'; +import 'package:test_common/logging.dart'; +import 'package:test_common/test_sdk_configuration.dart'; +import 'package:vm_service/vm_service.dart'; + +import 'fixtures/context.dart'; +import 'fixtures/project.dart'; +import 'fixtures/utilities.dart'; + +void main() { + // Enable verbose logging for debugging. + const debug = false; + final provider = TestSdkConfigurationProvider( + verbose: debug, + canaryFeatures: true, + ddcModuleFormat: ModuleFormat.ddc, + ); + final project = TestProject.testHotReloadBreakpoints; + final context = TestContext(project, provider); + final mainFile = project.dartEntryFileName; + final callLogMarker = 'callLog'; + final capturedStringMarker = 'capturedString'; + + tearDownAll(provider.dispose); + + void makeEdit(String file, String originalString, String newString) { + if (file == project.dartEntryFileName) { + context.makeEditToDartEntryFile( + toReplace: originalString, + replaceWith: newString, + ); + } else { + context.makeEditToDartLibFile( + libFileName: file, + toReplace: originalString, + replaceWith: newString, + ); + } + } + + Future makeEditAndRecompile( + String file, + String originalString, + String newString, + ) async { + makeEdit(file, originalString, newString); + await context.recompile(fullRestart: false); + } + + group('when pause_isolates_on_start is true', () { + late VmService client; + late Stream stream; + + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: CompilationMode.frontendServer, + moduleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ), + ); + client = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'true'); + await client.streamListen(EventStreams.kDebug); + stream = client.onDebugEvent; + }); + + tearDown(() async { + await context.tearDown(); + }); + + Future addBreakpoint({ + required String file, + required String breakpointMarker, + }) async { + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + final scriptList = await client.getScripts(isolateId); + final scriptRef = scriptList.scripts!.firstWhere( + (script) => script.uri!.contains(file), + ); + final bpLine = await context.findBreakpointLine( + breakpointMarker, + isolateId, + scriptRef, + ); + final breakpointAdded = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + ); + final breakpoint = await client.addBreakpointWithScriptUri( + isolateId, + scriptRef.uri!, + bpLine, + ); + await breakpointAdded; + return breakpoint; + } + + Future removeBreakpoint(Breakpoint bp) async { + final vm = await client.getVM(); + final isolateId = vm.isolates!.first.id!; + final breakpointRemoved = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointRemoved)), + ); + await client.removeBreakpoint(isolateId, bp.id!); + await breakpointRemoved; + } + + Future resume() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + await client.resume(isolate.id!); + } + + // When the program is executing, we want to check that at some point it + // will execute code that will emit [expectedString]. + Future resumeAndExpectLog(String expectedString) async { + final completer = Completer(); + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + await resume(); + await completer.future; + await subscription.cancel(); + } + + Future> hotReloadAndHandlePausePost( + List<({String file, String breakpointMarker, Breakpoint? bp})> + breakpoints, + ) async { + final waitForPausePost = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kPausePostRequest)), + ); + + // Initiate the hot reload by loading the sources into the page. + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final report = await client.reloadSources(isolate.id!); + expect(report.success, true); + + // Client (e.g. DAP) should listen for this event, remove old breakpoints, + // reregister breakpoints, and then resume. The following lines imitate + // what the client should do. + await waitForPausePost; + final newBreakpoints = []; + for (final (:bp, :breakpointMarker, :file) in breakpoints) { + // This could be a new file, so there's no existing breakpoint to + // remove. + if (bp != null) await removeBreakpoint(bp); + newBreakpoints.add( + await addBreakpoint(file: file, breakpointMarker: breakpointMarker), + ); + } + // The resume should complete hot reload and resume the program. + await resume(); + return newBreakpoints; + } + + Future callEvaluate() async { + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + } + + // Much like `resumeAndExpectLog`, we need a completer to ensure the log + // will eventually occur when code is executing. + Future callEvaluateAndExpectLog(String expectedString) async { + final completer = Completer(); + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + await completer.future; + await subscription.cancel(); + } + + Future waitForBreakpoint() => + expectLater(stream, emitsThrough(_hasKind(EventKind.kPauseBreakpoint))); + + test('after edit and hot reload, breakpoint is in new file', () async { + final oldString = 'main gen0'; + final newString = 'main gen1'; + + final bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + var breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + await resumeAndExpectLog(oldString); + + // Modify the string that gets printed. + await makeEditAndRecompile(mainFile, oldString, newString); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ]); + + breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + await resumeAndExpectLog(newString); + }); + + test('after adding line, hot reload, removing line, and hot reload, ' + 'breakpoint is correct across both hot reloads', () async { + final genLog = 'main gen0'; + + var bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + var breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + await resumeAndExpectLog(genLog); + + // Add an extra log before the existing log. + final extraLog = 'hot reload'; + final oldString = "log('"; + final newString = "log('$extraLog');\n$oldString"; + await makeEditAndRecompile(mainFile, oldString, newString); + + bp = + (await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ])).first; + + breakpointFuture = waitForBreakpoint(); + + await callEvaluateAndExpectLog(extraLog); + + // Should break at `callLog`. + await breakpointFuture; + await resumeAndExpectLog(genLog); + + // Remove the line we just added. + await makeEditAndRecompile(mainFile, newString, oldString); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + ]); + + breakpointFuture = waitForBreakpoint(); + + final consoleLogs = []; + final consoleSubscription = context.webkitDebugger.onConsoleAPICalled + .listen((e) { + consoleLogs.add(e.args.first.value as String); + }); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + expect(consoleLogs.contains(extraLog), false); + await resumeAndExpectLog(genLog); + await consoleSubscription.cancel(); + }); + + test( + 'after adding file and putting breakpoint in it, breakpoint is correctly ' + 'registered', + () async { + final genLog = 'main gen0'; + + final bp = await addBreakpoint( + file: mainFile, + breakpointMarker: callLogMarker, + ); + + var breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + await resumeAndExpectLog(genLog); + + // Add a library file, import it, and then refer to it in the log. + final libFile = 'library.dart'; + final libGenLog = 'lib gen0'; + final libValueMarker = 'libValue'; + context.addLibraryFile( + libFileName: libFile, + contents: '''String get libraryValue { + return '$libGenLog'; // Breakpoint: $libValueMarker + }''', + ); + final oldImports = "import 'dart:js_interop';"; + final newImports = + '$oldImports\n' + "import 'package:_test_hot_reload_breakpoints/library.dart';"; + makeEdit(mainFile, oldImports, newImports); + final oldLog = "log('\$mainValue');"; + final newLog = "log('\$libraryValue');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: callLogMarker, bp: bp), + (file: libFile, breakpointMarker: libValueMarker, bp: null), + ]); + + breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `callLog`. + await breakpointFuture; + + breakpointFuture = waitForBreakpoint(); + + await resume(); + // Should break at `libValue`. + await breakpointFuture; + await resumeAndExpectLog(libGenLog); + }, + ); + + test( + 'breakpoint in captured code is deleted', + () async { + var bp = await addBreakpoint( + file: mainFile, + breakpointMarker: capturedStringMarker, + ); + + final oldLog = "log('\$mainValue');"; + final newLog = "log('\${closure()}');"; + await makeEditAndRecompile(mainFile, oldLog, newLog); + + bp = + (await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ])).first; + + final breakpointFuture = waitForBreakpoint(); + + await callEvaluate(); + + // Should break at `capturedString`. + await breakpointFuture; + final oldCapturedString = 'captured closure gen0'; + // Closure gets evaluated for the first time. + await resumeAndExpectLog(oldCapturedString); + + final newCapturedString = 'captured closure gen1'; + await makeEditAndRecompile( + mainFile, + oldCapturedString, + newCapturedString, + ); + + await hotReloadAndHandlePausePost([ + (file: mainFile, breakpointMarker: capturedStringMarker, bp: bp), + ]); + + // Breakpoint should not be hit as it's now deleted. We should also see + // the old string still as the closure has not been reevaluated. + await callEvaluateAndExpectLog(oldCapturedString); + }, + // TODO(srujzs): Re-enable after + // https://github.com/dart-lang/webdev/issues/2640. + skip: Platform.isWindows, + ); + }, timeout: Timeout.factor(2)); + + group('when pause_isolates_on_start is false', () { + late VmService client; + + setUp(() async { + setCurrentLogWriter(debug: debug); + await context.setUp( + testSettings: TestSettings( + enableExpressionEvaluation: true, + compilationMode: CompilationMode.frontendServer, + moduleFormat: ModuleFormat.ddc, + canaryFeatures: true, + ), + ); + client = await context.connectFakeClient(); + await client.setFlag('pause_isolates_on_start', 'false'); + }); + + tearDown(() async { + await context.tearDown(); + }); + + Future callEvaluateAndExpectLog(String expectedString) async { + final completer = Completer(); + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( + e, + ) { + if (e.args.first.value == expectedString) { + completer.complete(); + } + }); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final rootLib = isolate.rootLib; + await client.evaluate(isolate.id!, rootLib!.id!, 'evaluate()'); + await completer.future; + await subscription.cancel(); + } + + test('no pause when calling reloadSources', () async { + final oldString = 'main gen0'; + final newString = 'main gen1'; + + await callEvaluateAndExpectLog(oldString); + + // Modify the string that gets printed and hot reload. + await makeEditAndRecompile(mainFile, oldString, newString); + final vm = await client.getVM(); + final isolate = await client.getIsolate(vm.isolates!.first.id!); + final report = await client.reloadSources(isolate.id!); + expect(report.success, true); + + // Program should not be paused, so this should execute. + await callEvaluateAndExpectLog(newString); + }); + }, timeout: Timeout.factor(2)); +} + +TypeMatcher _hasKind(String kind) => + isA().having((e) => e.kind, 'kind', kind); diff --git a/dwds/test/hot_reload_test.dart b/dwds/test/hot_reload_test.dart index a836426c8..d9eec22f9 100644 --- a/dwds/test/hot_reload_test.dart +++ b/dwds/test/hot_reload_test.dart @@ -22,7 +22,7 @@ const newString = 'Bonjour le monde!'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: true, @@ -42,14 +42,6 @@ void main() { await context.recompile(fullRestart: false); } - void undoEdit() { - context.makeEditToDartLibFile( - libFileName: 'library1.dart', - toReplace: newString, - replaceWith: originalString, - ); - } - group('Injected client', () { late VmService fakeClient; @@ -67,7 +59,6 @@ void main() { }); tearDown(() async { - undoEdit(); await context.tearDown(); }); diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index a8f11b078..c54bb3696 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -23,7 +23,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider( verbose: debug, canaryFeatures: true, @@ -36,8 +36,6 @@ void main() { tearDownAll(provider.dispose); - final edits = <({String file, String originalString, String newString})>[]; - void makeEdit(String file, String originalString, String newString) { if (file == project.dartEntryFileName) { context.makeEditToDartEntryFile( @@ -51,11 +49,6 @@ void main() { replaceWith: newString, ); } - edits.add(( - file: file, - originalString: originalString, - newString: newString, - )); } Future makeEditAndRecompile( @@ -67,25 +60,6 @@ void main() { await context.recompile(fullRestart: true); } - void undoEdits() { - for (var i = edits.length - 1; i >= 0; i--) { - final edit = edits[i]; - if (edit.file == project.dartEntryFileName) { - context.makeEditToDartEntryFile( - toReplace: edit.newString, - replaceWith: edit.originalString, - ); - } else { - context.makeEditToDartLibFile( - libFileName: edit.file, - toReplace: edit.newString, - replaceWith: edit.originalString, - ); - } - } - edits.clear(); - } - group('when pause_isolates_on_start is true', () { late VmService client; late VmServiceInterface service; @@ -105,11 +79,11 @@ void main() { ), ); client = await context.connectFakeClient(); - await client.setFlag('pause_isolates_on_start', 'true'); - await client.streamListen('Isolate'); service = context.service; - await service.streamListen('Debug'); - stream = service.onEvent('Debug'); + await client.setFlag('pause_isolates_on_start', 'true'); + await client.streamListen(EventStreams.kIsolate); + await client.streamListen(EventStreams.kDebug); + stream = client.onDebugEvent; consoleSubscription = context.webkitDebugger.onConsoleAPICalled.listen( (e) => consoleLogs.add(e.args.first.value as String), ); @@ -118,7 +92,6 @@ void main() { tearDown(() async { await consoleSubscription.cancel(); consoleLogs.clear(); - undoEdits(); await context.tearDown(); }); @@ -137,11 +110,17 @@ void main() { isolateId, scriptRef, ); - return await client.addBreakpointWithScriptUri( + final breakpointAdded = expectLater( + stream, + emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + ); + final breakpoint = await client.addBreakpointWithScriptUri( isolateId, scriptRef.uri!, bpLine, ); + await breakpointAdded; + return breakpoint; } Future resume() async { @@ -154,7 +133,7 @@ void main() { // will execute code that will emit [expectedString]. Future resumeAndExpectLog(String expectedString) async { final completer = Completer(); - final newSubscription = context.webkitDebugger.onConsoleAPICalled.listen(( + final subscription = context.webkitDebugger.onConsoleAPICalled.listen(( e, ) { if (e.args.first.value == expectedString) { @@ -162,9 +141,8 @@ void main() { } }); await resume(); - await completer.future.then((_) { - newSubscription.cancel(); - }); + await completer.future; + await subscription.cancel(); } Future hotRestartAndHandlePausePost( @@ -204,11 +182,8 @@ void main() { final vm = await client.getVM(); final isolate = await service.getIsolate(vm.isolates!.first.id!); expect(isolate.breakpoints, isEmpty); - for (final breakpoint in breakpoints) { - await addBreakpoint( - file: breakpoint.file, - breakpointMarker: breakpoint.breakpointMarker, - ); + for (final (:breakpointMarker, :file) in breakpoints) { + await addBreakpoint(file: file, breakpointMarker: breakpointMarker); } await resume(); } @@ -323,8 +298,6 @@ void main() { await breakpointFuture; expect(consoleLogs.contains(libGenLog), false); await resumeAndExpectLog(libGenLog); - - context.removeLibraryFile(libFileName: libFile); }, ); }); diff --git a/dwds/test/instances/class_inspection_amd_test.dart b/dwds/test/instances/class_inspection_amd_test.dart index 0cf7f3426..a82ab46ac 100644 --- a/dwds/test/instances/class_inspection_amd_test.dart +++ b/dwds/test/instances/class_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/class_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('Class |', () { diff --git a/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart index 2f54f5fbc..b00100348 100644 --- a/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/class_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/class_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; final provider = TestSdkConfigurationProvider( diff --git a/dwds/test/instances/instance_amd_canary_test.dart b/dwds/test/instances/instance_amd_canary_test.dart index 8f74aa270..588a0d2e4 100644 --- a/dwds/test/instances/instance_amd_canary_test.dart +++ b/dwds/test/instances/instance_amd_canary_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.amd; diff --git a/dwds/test/instances/instance_amd_test.dart b/dwds/test/instances/instance_amd_test.dart index d87deb5f5..03706e5ce 100644 --- a/dwds/test/instances/instance_amd_test.dart +++ b/dwds/test/instances/instance_amd_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; final moduleFormat = ModuleFormat.amd; diff --git a/dwds/test/instances/instance_ddc_library_bundle_test.dart b/dwds/test/instances/instance_ddc_library_bundle_test.dart index a06018121..d38e9f84a 100644 --- a/dwds/test/instances/instance_ddc_library_bundle_test.dart +++ b/dwds/test/instances/instance_ddc_library_bundle_test.dart @@ -15,7 +15,7 @@ import 'common/instance_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final moduleFormat = ModuleFormat.ddc; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/instance_inspection_amd_canary_test.dart b/dwds/test/instances/instance_inspection_amd_canary_test.dart index c9dbaf5cf..0319b9bfc 100644 --- a/dwds/test/instances/instance_inspection_amd_canary_test.dart +++ b/dwds/test/instances/instance_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/instance_inspection_amd_test.dart b/dwds/test/instances/instance_inspection_amd_test.dart index a8f7df0d7..36d19793b 100644 --- a/dwds/test/instances/instance_inspection_amd_test.dart +++ b/dwds/test/instances/instance_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart index bfca2b3c7..7bcda8b35 100644 --- a/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/instance_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/instance_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/patterns_inspection_canary_test.dart b/dwds/test/instances/patterns_inspection_canary_test.dart index fecc84b9a..cc46732b4 100644 --- a/dwds/test/instances/patterns_inspection_canary_test.dart +++ b/dwds/test/instances/patterns_inspection_canary_test.dart @@ -15,7 +15,7 @@ import 'common/patterns_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/patterns_inspection_test.dart b/dwds/test/instances/patterns_inspection_test.dart index c0b58ea34..2578b7264 100644 --- a/dwds/test/instances/patterns_inspection_test.dart +++ b/dwds/test/instances/patterns_inspection_test.dart @@ -15,7 +15,7 @@ import 'common/patterns_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_amd_canary_test.dart b/dwds/test/instances/record_inspection_amd_canary_test.dart index 7c2c5c0a8..52df6fc7e 100644 --- a/dwds/test/instances/record_inspection_amd_canary_test.dart +++ b/dwds/test/instances/record_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_amd_test.dart b/dwds/test/instances/record_inspection_amd_test.dart index afee36510..cab859fe5 100644 --- a/dwds/test/instances/record_inspection_amd_test.dart +++ b/dwds/test/instances/record_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart index deb18060a..ee123ae1f 100644 --- a/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/record_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/record_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/record_type_inspection_amd_canary_test.dart b/dwds/test/instances/record_type_inspection_amd_canary_test.dart index 02d5f826b..952b73b35 100644 --- a/dwds/test/instances/record_type_inspection_amd_canary_test.dart +++ b/dwds/test/instances/record_type_inspection_amd_canary_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_type_inspection_amd_test.dart b/dwds/test/instances/record_type_inspection_amd_test.dart index d471b0769..d86880e3c 100644 --- a/dwds/test/instances/record_type_inspection_amd_test.dart +++ b/dwds/test/instances/record_type_inspection_amd_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart b/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart index 9e5cb3c11..e6a9e7ec1 100644 --- a/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart +++ b/dwds/test/instances/record_type_inspection_ddc_library_bundle_test.dart @@ -16,7 +16,7 @@ import 'common/record_type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; final compilationMode = CompilationMode.frontendServer; diff --git a/dwds/test/instances/type_inspection_canary_test.dart b/dwds/test/instances/type_inspection_canary_test.dart index f908fb629..0cd257ead 100644 --- a/dwds/test/instances/type_inspection_canary_test.dart +++ b/dwds/test/instances/type_inspection_canary_test.dart @@ -15,7 +15,7 @@ import 'common/type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = true; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/instances/type_inspection_test.dart b/dwds/test/instances/type_inspection_test.dart index 7f510226e..35090d4bd 100644 --- a/dwds/test/instances/type_inspection_test.dart +++ b/dwds/test/instances/type_inspection_test.dart @@ -15,7 +15,7 @@ import 'common/type_inspection_common.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final canaryFeatures = false; group('canary: $canaryFeatures |', () { diff --git a/dwds/test/load_strategy_test.dart b/dwds/test/load_strategy_test.dart index 99c6c608e..8539526c8 100644 --- a/dwds/test/load_strategy_test.dart +++ b/dwds/test/load_strategy_test.dart @@ -31,7 +31,7 @@ void main() { group( 'When the packageConfigLocator does not specify a package config path', () { - final strategy = FakeStrategy(FakeAssetReader()); + late final strategy = FakeStrategy(FakeAssetReader()); test('defaults to "./dart_tool/package_config.json"', () { expect( @@ -43,7 +43,7 @@ void main() { ); group('When a custom package config path is specified', () { - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), packageConfigPath: 'custom/package_config/path', ); @@ -57,7 +57,7 @@ void main() { }); group('When default build settings defined', () { - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), buildSettings: TestBuildSettings.dart(), ); @@ -85,7 +85,7 @@ void main() { final isFlutterApp = true; final experiments = ['records']; - final strategy = FakeStrategy( + late final strategy = FakeStrategy( FakeAssetReader(), buildSettings: BuildSettings( appEntrypoint: appEntrypoint, diff --git a/dwds/test/package_uri_mapper_test.dart b/dwds/test/package_uri_mapper_test.dart index a5de72ca6..179e3a91a 100644 --- a/dwds/test/package_uri_mapper_test.dart +++ b/dwds/test/package_uri_mapper_test.dart @@ -33,22 +33,25 @@ void main() { ? 'packages/${project.packageDirectory}/lib/test_library.dart' : '/packages/${project.packageName}/test_library.dart'; - final resolvedPath = - '/webdev/fixtures/${project.packageDirectory}/lib/test_library.dart'; - - final testPackageSoundPath = project.absolutePackageDirectory; - final packageConfigFile = Uri.file( - p.join(testPackageSoundPath, '.dart_tool', 'package_config.json'), - ); + final resolvedPath = '${project.packageDirectory}/lib/test_library.dart'; late final PackageUriMapper packageUriMapper; setUpAll(() async { + await project.setUp(); // Note: Run `dart pub upgrade` before the test cases to fix // https://github.com/dart-lang/webdev/issues/1834: await Process.run('dart', [ 'pub', 'upgrade', - ], workingDirectory: testPackageSoundPath); + ], workingDirectory: project.absolutePackageDirectory); + + final packageConfigFile = Uri.file( + p.join( + project.absolutePackageDirectory, + '.dart_tool', + 'package_config.json', + ), + ); packageUriMapper = await PackageUriMapper.create( fileSystem, @@ -57,6 +60,8 @@ void main() { ); }); + tearDownAll(project.tearDown); + test('Can convert package urls to server paths', () { expect(packageUriMapper.packageUriToServerPath(packageUri), serverPath); }); diff --git a/dwds/test/readers/frontend_server_asset_reader_test.dart b/dwds/test/readers/frontend_server_asset_reader_test.dart index 1e85ed2d3..9c20eb2dd 100644 --- a/dwds/test/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/readers/frontend_server_asset_reader_test.dart @@ -22,9 +22,9 @@ void main() { late Directory tempFixtures; late File jsonOriginal; late File mapOriginal; + late String packagesDir; final testProject = TestProject.test; - final packagesDir = testProject.absolutePackageDirectory; Future createTempFixtures() async { tempFixtures = await Directory.systemTemp.createTemp('dwds_test_fixtures'); @@ -37,15 +37,14 @@ void main() { ).copy(p.join(tempFixtures.path, 'main.dart.dill.map')); } - setUpAll(() async { + setUp(() async { + await testProject.setUp(); + packagesDir = testProject.absolutePackageDirectory; final sdkLayout = TestSdkLayout.defaultSdkLayout; await Process.run(sdkLayout.dartPath, [ 'pub', 'upgrade', ], workingDirectory: packagesDir); - }); - - setUp(() async { await createTempFixtures(); assetReader = FrontendServerAssetReader( outputPath: p.join(tempFixtures.path, 'main.dart.dill'), @@ -55,6 +54,7 @@ void main() { }); tearDown(() async { + await testProject.tearDown(); if (await tempFixtures.exists()) await tempFixtures.delete(recursive: true); }); diff --git a/dwds/test/run_request_test.dart b/dwds/test/run_request_test.dart index c3a538dfb..d5e00cbf2 100644 --- a/dwds/test/run_request_test.dart +++ b/dwds/test/run_request_test.dart @@ -19,7 +19,7 @@ import 'fixtures/utilities.dart'; void main() { // Enable verbose logging for debugging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/test/variable_scope_test.dart b/dwds/test/variable_scope_test.dart index e55e423ec..22880ec8e 100644 --- a/dwds/test/variable_scope_test.dart +++ b/dwds/test/variable_scope_test.dart @@ -19,7 +19,7 @@ import 'fixtures/utilities.dart'; void main() { // set to true for debug logging. - final debug = false; + const debug = false; final provider = TestSdkConfigurationProvider(verbose: debug); tearDownAll(provider.dispose); diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 16daa027a..b824cf5e9 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -63,16 +63,14 @@ Future? main() { final manager = ReloadingManager(client, restarter); - hotReloadJs = + hotReloadStartJs = () { - return manager.hotReload().toJS; + return manager.hotReloadStart(hotReloadSourcesPath).toJS; }.toJS; - fetchLibrariesForHotReloadJs = + hotReloadEndJs = () { - return manager - .fetchLibrariesForHotReload(hotReloadSourcesPath) - .toJS; + return manager.hotReloadEnd().toJS; }.toJS; Completer? readyToRunMainCompleter; @@ -184,8 +182,8 @@ Future? main() { 'ReloadConfiguration.hotRestart') { await manager.hotRestart(); } else if (reloadConfiguration == 'ReloadConfiguration.hotReload') { - await manager.fetchLibrariesForHotReload(hotReloadSourcesPath); - await manager.hotReload(); + await manager.hotReloadStart(hotReloadSourcesPath); + await manager.hotReloadEnd(); } } else if (event is DevToolsResponse) { if (!event.success) { @@ -425,8 +423,8 @@ Future handleWebSocketHotReloadRequest( ) async { final requestId = event.id; try { - await manager.fetchLibrariesForHotReload(hotReloadSourcesPath); - await manager.hotReload(); + await manager.hotReloadStart(hotReloadSourcesPath); + await manager.hotReloadEnd(); _sendHotReloadResponse(clientSink, requestId, success: true); } catch (e) { _sendHotReloadResponse( @@ -453,11 +451,11 @@ external set dartAppInstanceId(String? id); @JS(r'$dartModuleStrategy') external String get dartModuleStrategy; -@JS(r'$dartHotReloadDwds') -external set hotReloadJs(JSFunction cb); +@JS(r'$dartHotReloadStartDwds') +external set hotReloadStartJs(JSFunction cb); -@JS(r'$fetchLibrariesForHotReload') -external set fetchLibrariesForHotReloadJs(JSFunction cb); +@JS(r'$dartHotReloadEndDwds') +external set hotReloadEndJs(JSFunction cb); @JS(r'$hotReloadSourcesPath') external String? get _hotReloadSourcesPath; diff --git a/dwds/web/reloader/ddc_library_bundle_restarter.dart b/dwds/web/reloader/ddc_library_bundle_restarter.dart index 77f2eab9f..b9bffc843 100644 --- a/dwds/web/reloader/ddc_library_bundle_restarter.dart +++ b/dwds/web/reloader/ddc_library_bundle_restarter.dart @@ -25,6 +25,7 @@ extension type _DartDevEmbedder._(JSObject _) implements JSObject { extension type _DartDevEmbedderConfig._(JSObject _) implements JSObject { external JSFunction? capturedMainHandler; + external JSFunction? capturedHotReloadEndHandler; } extension type _Debugger._(JSObject _) implements JSObject { @@ -57,6 +58,8 @@ extension on JSArray { } class DdcLibraryBundleRestarter implements Restarter { + JSFunction? _capturedHotReloadEndCallback; + Future _runMainWhenReady( Future? readyToRunMain, JSFunction runMain, @@ -81,25 +84,8 @@ class DdcLibraryBundleRestarter implements Restarter { return true; } - late ({JSArray sources, JSArray libraries})? - _sourcesAndLibrariesToReload; - - @override - Future reload() async { - // Requires a previous call to `fetchLibrariesForHotReload`. - await _dartDevEmbedder - .hotReload( - _sourcesAndLibrariesToReload!.sources, - _sourcesAndLibrariesToReload!.libraries, - ) - .toDart; - _sourcesAndLibrariesToReload = null; - } - @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) async { + Future> hotReloadStart(String hotReloadSourcesPath) async { final completer = Completer(); final xhr = _XMLHttpRequest(); xhr.withCredentials = true; @@ -126,10 +112,19 @@ class DdcLibraryBundleRestarter implements Restarter { librariesToReload.push(library.toJS); } } - _sourcesAndLibrariesToReload = ( - sources: filesToLoad, - libraries: librariesToReload, - ); + _dartDevEmbedder.config.capturedHotReloadEndHandler = + (JSFunction hotReloadEndCallback) { + _capturedHotReloadEndCallback = hotReloadEndCallback; + }.toJS; + await _dartDevEmbedder.hotReload(filesToLoad, librariesToReload).toDart; return librariesToReload; } + + @override + Future hotReloadEnd() async { + // Requires a previous call to `hotReloadStart`. + _capturedHotReloadEndCallback!.callAsFunction(); + _dartDevEmbedder.config.capturedHotReloadEndHandler = null; + _capturedHotReloadEndCallback = null; + } } diff --git a/dwds/web/reloader/ddc_restarter.dart b/dwds/web/reloader/ddc_restarter.dart index c3ce499e0..095f21ef1 100644 --- a/dwds/web/reloader/ddc_restarter.dart +++ b/dwds/web/reloader/ddc_restarter.dart @@ -41,15 +41,13 @@ class DdcRestarter implements Restarter { } @override - Future reload() => + Future hotReloadEnd() => throw UnimplementedError( 'Hot reload is not supported for the DDC module format.', ); @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => + Future> hotReloadStart(String hotReloadSourcesPath) => throw UnimplementedError( 'Hot reload is not supported for the DDC module format.', ); diff --git a/dwds/web/reloader/manager.dart b/dwds/web/reloader/manager.dart index 1142d8016..22c4b0fb4 100644 --- a/dwds/web/reloader/manager.dart +++ b/dwds/web/reloader/manager.dart @@ -36,15 +36,15 @@ class ReloadingManager { return result; } - /// Performs a hot reload using the sources and libraries computes in the - /// previous call to [fetchLibrariesForHotReload]. - Future hotReload() async { - await _restarter.reload(); + /// After a previous call to [hotReloadStart], completes the hot + /// reload by pushing the libraries into the Dart runtime. + Future hotReloadEnd() async { + await _restarter.hotReloadEnd(); } - /// Computes the sources and libraries to reload and returns the list of - /// libraries using [hotReloadSourcesPath] as the path to a JSONified list of - /// maps which follows the following format: + /// Computes the sources and libraries to reload, loads them into the page, + /// and returns the list of libraries using [hotReloadSourcesPath] as the path + /// to a JSONified list of maps which follows the following format: /// /// ```json /// [ @@ -59,9 +59,8 @@ class ReloadingManager { /// bundle. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => _restarter.fetchLibrariesForHotReload(hotReloadSourcesPath); + Future> hotReloadStart(String hotReloadSourcesPath) => + _restarter.hotReloadStart(hotReloadSourcesPath); /// Does a hard reload of the application. void reloadPage() { diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 6c94f5eb0..0e650629a 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -162,15 +162,13 @@ class RequireRestarter implements Restarter { } @override - Future reload() => + Future hotReloadEnd() => throw UnimplementedError( 'Hot reload is not supported for the AMD module format.', ); @override - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ) => + Future> hotReloadStart(String hotReloadSourcesPath) => throw UnimplementedError( 'Hot reload is not supported for the AMD module format.', ); diff --git a/dwds/web/reloader/restarter.dart b/dwds/web/reloader/restarter.dart index baa933a51..e3ca0f70f 100644 --- a/dwds/web/reloader/restarter.dart +++ b/dwds/web/reloader/restarter.dart @@ -9,13 +9,13 @@ abstract class Restarter { /// not. Future restart({String? runId, Future? readyToRunMain}); - /// Performs a hot reload using the sources and libraries computes in the - /// previous call to [fetchLibrariesForHotReload]. - Future reload(); + /// After a previous call to [hotReloadStart], completes the hot + /// reload by pushing the libraries into the Dart runtime. + Future hotReloadEnd(); - /// Computes the sources and libraries to reload and returns the list of - /// libraries using [hotReloadSourcesPath] as the path to a JSONified list of - /// maps which follows the following format: + /// Computes the sources and libraries to reload, loads them into the page, + /// and returns the list of libraries using [hotReloadSourcesPath] as the path + /// to a JSONified list of maps which follows the following format: /// /// ```json /// [ @@ -30,7 +30,5 @@ abstract class Restarter { /// bundle. /// `libraries`: An array of strings containing the libraries that were /// compiled in `src`. - Future> fetchLibrariesForHotReload( - String hotReloadSourcesPath, - ); + Future> hotReloadStart(String hotReloadSourcesPath); } diff --git a/fixtures/_testHotReload/web/main.dart b/fixtures/_testHotReload/web/main.dart index 03fe05d3b..fb4229367 100644 --- a/fixtures/_testHotReload/web/main.dart +++ b/fixtures/_testHotReload/web/main.dart @@ -10,11 +10,7 @@ import 'package:_test_hot_reload/library1.dart'; @JS('document.body.innerHTML') external set innerHtml(String html); -@JS('console.log') -external void log(String s); - void evaluate() { - log('evaluate called $reloadValue'); innerHtml = 'Program is running!\n $reloadValue}\n'; } diff --git a/fixtures/_testHotReloadBreakpoints/pubspec.yaml b/fixtures/_testHotReloadBreakpoints/pubspec.yaml new file mode 100644 index 000000000..b70a37343 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/pubspec.yaml @@ -0,0 +1,9 @@ +name: _test_hot_reload_breakpoints +version: 1.0.0 +description: >- + A fake package used for testing hot reload breakpoints. +publish_to: none + +environment: + sdk: ^3.7.0 + diff --git a/fixtures/_testHotReloadBreakpoints/web/index.html b/fixtures/_testHotReloadBreakpoints/web/index.html new file mode 100644 index 000000000..d93440a94 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/web/index.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fixtures/_testHotReloadBreakpoints/web/main.dart b/fixtures/_testHotReloadBreakpoints/web/main.dart new file mode 100644 index 000000000..2c9baa8d5 --- /dev/null +++ b/fixtures/_testHotReloadBreakpoints/web/main.dart @@ -0,0 +1,26 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js_interop'; + +@JS('console.log') +external void log(String _); + +String get mainValue => 'main gen0'; + +void evaluate() { + // Use a future instead of directly calling because evaluating this method + // with a breakpoint would never complete otherwise. + Future.delayed(Duration(milliseconds: 10), printToConsole); +} + +void printToConsole() { + log('$mainValue'); // Breakpoint: callLog +} + +final closure = () { + return 'captured closure gen0'; // Breakpoint: capturedString +}; + +void main() {} diff --git a/test_common/lib/utilities.dart b/test_common/lib/utilities.dart index 7ba1dca32..d4d3619be 100644 --- a/test_common/lib/utilities.dart +++ b/test_common/lib/utilities.dart @@ -16,7 +16,6 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev'; /// '/workstation/webdev'. String get webdevPath { final pathParts = p.split(p.current); - // We expect all tests to be run from the webdev mono-repo: assert(pathParts.contains(webdevDirName)); return p.joinAll( pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1), diff --git a/test_common/test/sdk_asset_generator_test.dart b/test_common/test/sdk_asset_generator_test.dart index da109dd29..21adc1058 100644 --- a/test_common/test/sdk_asset_generator_test.dart +++ b/test_common/test/sdk_asset_generator_test.dart @@ -16,7 +16,7 @@ import 'package:test_common/test_sdk_layout.dart'; void main() { group('SDK asset generator', () { - final debug = false; + const debug = false; late Directory tempDir; late String sdkDirectory; diff --git a/test_common/test/test_sdk_configuration_test.dart b/test_common/test/test_sdk_configuration_test.dart index ada3712cc..f061d58b3 100644 --- a/test_common/test/test_sdk_configuration_test.dart +++ b/test_common/test/test_sdk_configuration_test.dart @@ -14,7 +14,7 @@ import 'package:test_common/logging.dart'; import 'package:test_common/test_sdk_configuration.dart'; void main() { - final debug = false; + const debug = false; group('Test SDK configuration provider |', () { setUpAll(() { diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index b0c0634b2..87c07f74d 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -38,7 +38,7 @@ final _testItems = { void main() { // Change to true for debugging. - final debug = false; + const debug = false; final testRunner = TestRunner(); late String soundExampleDirectory; diff --git a/webdev/test/tls_test.dart b/webdev/test/tls_test.dart index 4aac11828..816ae0e79 100644 --- a/webdev/test/tls_test.dart +++ b/webdev/test/tls_test.dart @@ -19,7 +19,7 @@ import 'test_utils.dart'; void main() { group('serve app with TLS options', () { // Change to true for debugging. - final debug = false; + const debug = false; final testRunner = TestRunner(); late String exampleDirectory;