| Index: pkg/dev_compiler/lib/js/es6/dart_sdk.js
|
| diff --git a/pkg/dev_compiler/lib/js/es6/dart_sdk.js b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
|
| index 8e04bfc1d75c8383b38b0de694a111126c50aec1..19ffdbb8e840968187fa87a61b4f757e05d93f4f 100644
|
| --- a/pkg/dev_compiler/lib/js/es6/dart_sdk.js
|
| +++ b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
|
| @@ -68,6 +68,7 @@ let UnmodifiableListMixin = () => (UnmodifiableListMixin = dart.constFn(_interna
|
| let UnmodifiableListBase = () => (UnmodifiableListBase = dart.constFn(_internal.UnmodifiableListBase$()))();
|
| let StringToint = () => (StringToint = dart.constFn(dart.functionType(core.int, [core.String])))();
|
| let Iterable = () => (Iterable = dart.constFn(core.Iterable$()))();
|
| +let EfficientLengthIterable = () => (EfficientLengthIterable = dart.constFn(_internal.EfficientLengthIterable$()))();
|
| let ListIterable = () => (ListIterable = dart.constFn(_internal.ListIterable$()))();
|
| let SubListIterable = () => (SubListIterable = dart.constFn(_internal.SubListIterable$()))();
|
| let ListIterator = () => (ListIterator = dart.constFn(_internal.ListIterator$()))();
|
| @@ -152,7 +153,6 @@ let ListOfFloat64x2 = () => (ListOfFloat64x2 = dart.constFn(core.List$(typed_dat
|
| let IterableOfdouble = () => (IterableOfdouble = dart.constFn(core.Iterable$(core.double)))();
|
| let IterableOfint = () => (IterableOfint = dart.constFn(core.Iterable$(core.int)))();
|
| let ListOfdouble = () => (ListOfdouble = dart.constFn(core.List$(core.double)))();
|
| -let ZoneBinaryCallbackOfdynamic$dynamic$StackTrace = () => (ZoneBinaryCallbackOfdynamic$dynamic$StackTrace = dart.constFn(async.ZoneBinaryCallback$(dart.dynamic, dart.dynamic, core.StackTrace)))();
|
| let _StreamImpl = () => (_StreamImpl = dart.constFn(async._StreamImpl$()))();
|
| let _ControllerStream = () => (_ControllerStream = dart.constFn(async._ControllerStream$()))();
|
| let _BroadcastStream = () => (_BroadcastStream = dart.constFn(async._BroadcastStream$()))();
|
| @@ -210,8 +210,9 @@ let _BroadcastCallback = () => (_BroadcastCallback = dart.constFn(async._Broadca
|
| let _DoneStreamSubscription = () => (_DoneStreamSubscription = dart.constFn(async._DoneStreamSubscription$()))();
|
| let _AsBroadcastStream = () => (_AsBroadcastStream = dart.constFn(async._AsBroadcastStream$()))();
|
| let _BroadcastSubscriptionWrapper = () => (_BroadcastSubscriptionWrapper = dart.constFn(async._BroadcastSubscriptionWrapper$()))();
|
| -let _StreamIteratorImpl = () => (_StreamIteratorImpl = dart.constFn(async._StreamIteratorImpl$()))();
|
| +let _StreamIterator = () => (_StreamIterator = dart.constFn(async._StreamIterator$()))();
|
| let _EmptyStream = () => (_EmptyStream = dart.constFn(async._EmptyStream$()))();
|
| +let dynamicAndStackTraceTodynamic = () => (dynamicAndStackTraceTodynamic = dart.constFn(dart.functionType(dart.dynamic, [dart.dynamic, core.StackTrace])))();
|
| let _ForwardingStream = () => (_ForwardingStream = dart.constFn(async._ForwardingStream$()))();
|
| let _ForwardingStreamSubscription = () => (_ForwardingStreamSubscription = dart.constFn(async._ForwardingStreamSubscription$()))();
|
| let _Predicate = () => (_Predicate = dart.constFn(async._Predicate$()))();
|
| @@ -313,7 +314,6 @@ let dynamicAnddynamicTovoid = () => (dynamicAnddynamicTovoid = dart.constFn(dart
|
| let Queue = () => (Queue = dart.constFn(collection.Queue$()))();
|
| let _DoubleLink = () => (_DoubleLink = dart.constFn(collection._DoubleLink$()))();
|
| let DoubleLinkedQueueEntry = () => (DoubleLinkedQueueEntry = dart.constFn(collection.DoubleLinkedQueueEntry$()))();
|
| -let _UserDoubleLinkedQueueEntry = () => (_UserDoubleLinkedQueueEntry = dart.constFn(collection._UserDoubleLinkedQueueEntry$()))();
|
| let _DoubleLinkedQueueEntry = () => (_DoubleLinkedQueueEntry = dart.constFn(collection._DoubleLinkedQueueEntry$()))();
|
| let _DoubleLinkedQueueElement = () => (_DoubleLinkedQueueElement = dart.constFn(collection._DoubleLinkedQueueElement$()))();
|
| let _DoubleLinkedQueueSentinel = () => (_DoubleLinkedQueueSentinel = dart.constFn(collection._DoubleLinkedQueueSentinel$()))();
|
| @@ -343,8 +343,10 @@ let List = () => (List = dart.constFn(core.List$()))();
|
| let StreamOfListOfint = () => (StreamOfListOfint = dart.constFn(async.Stream$(ListOfint())))();
|
| let MapOfString$Encoding = () => (MapOfString$Encoding = dart.constFn(core.Map$(core.String, convert.Encoding)))();
|
| let Converter = () => (Converter = dart.constFn(convert.Converter$()))();
|
| +let ChunkedConverterOfString$ListOfint$String$ListOfint = () => (ChunkedConverterOfString$ListOfint$String$ListOfint = dart.constFn(convert.ChunkedConverter$(core.String, ListOfint(), core.String, ListOfint())))();
|
| let SinkOfListOfint = () => (SinkOfListOfint = dart.constFn(core.Sink$(ListOfint())))();
|
| let StreamOfString = () => (StreamOfString = dart.constFn(async.Stream$(core.String)))();
|
| +let ChunkedConverterOfListOfint$String$ListOfint$String = () => (ChunkedConverterOfListOfint$String$ListOfint$String = dart.constFn(convert.ChunkedConverter$(ListOfint(), core.String, ListOfint(), core.String)))();
|
| let SinkOfString = () => (SinkOfString = dart.constFn(core.Sink$(core.String)))();
|
| let ChunkedConversionSink = () => (ChunkedConversionSink = dart.constFn(convert.ChunkedConversionSink$()))();
|
| let ListOfintTovoid = () => (ListOfintTovoid = dart.constFn(dart.functionType(dart.void, [ListOfint()])))();
|
| @@ -355,8 +357,12 @@ let _ConverterStreamEventSink = () => (_ConverterStreamEventSink = dart.constFn(
|
| let _FusedCodec = () => (_FusedCodec = dart.constFn(convert._FusedCodec$()))();
|
| let _InvertedCodec = () => (_InvertedCodec = dart.constFn(convert._InvertedCodec$()))();
|
| let _FusedConverter = () => (_FusedConverter = dart.constFn(convert._FusedConverter$()))();
|
| +let ChunkedConverterOfString$String$String$String = () => (ChunkedConverterOfString$String$String$String = dart.constFn(convert.ChunkedConverter$(core.String, core.String, core.String, core.String)))();
|
| +let ChunkedConverterOfObject$String$Object$String = () => (ChunkedConverterOfObject$String$Object$String = dart.constFn(convert.ChunkedConverter$(core.Object, core.String, core.Object, core.String)))();
|
| let StreamOfObject = () => (StreamOfObject = dart.constFn(async.Stream$(core.Object)))();
|
| let JSArrayOfListOfint = () => (JSArrayOfListOfint = dart.constFn(_interceptors.JSArray$(ListOfint())))();
|
| +let ChunkedConverterOfObject$ListOfint$Object$ListOfint = () => (ChunkedConverterOfObject$ListOfint$Object$ListOfint = dart.constFn(convert.ChunkedConverter$(core.Object, ListOfint(), core.Object, ListOfint())))();
|
| +let ChunkedConverterOfString$Object$String$Object = () => (ChunkedConverterOfString$Object$String$Object = dart.constFn(convert.ChunkedConverter$(core.String, core.Object, core.String, core.Object)))();
|
| let Uint8ListAndintAndintTovoid = () => (Uint8ListAndintAndintTovoid = dart.constFn(dart.functionType(dart.void, [typed_data.Uint8List, core.int, core.int])))();
|
| let EventSinkOfString = () => (EventSinkOfString = dart.constFn(async.EventSink$(core.String)))();
|
| let StreamTransformerOfString$String = () => (StreamTransformerOfString$String = dart.constFn(async.StreamTransformer$(core.String, core.String)))();
|
| @@ -367,40 +373,41 @@ let ComparableOfDuration = () => (ComparableOfDuration = dart.constFn(core.Compa
|
| let Expando = () => (Expando = dart.constFn(core.Expando$()))();
|
| let _Generator = () => (_Generator = dart.constFn(core._Generator$()))();
|
| let _GeneratorIterable = () => (_GeneratorIterable = dart.constFn(core._GeneratorIterable$()))();
|
| -let _GeneratorIterator = () => (_GeneratorIterator = dart.constFn(core._GeneratorIterator$()))();
|
| let BidirectionalIterator = () => (BidirectionalIterator = dart.constFn(core.BidirectionalIterator$()))();
|
| let Map = () => (Map = dart.constFn(core.Map$()))();
|
| let Set = () => (Set = dart.constFn(core.Set$()))();
|
| let Sink = () => (Sink = dart.constFn(core.Sink$()))();
|
| let BidirectionalIteratorOfint = () => (BidirectionalIteratorOfint = dart.constFn(core.BidirectionalIterator$(core.int)))();
|
| -let UnmodifiableMapViewOfString$String = () => (UnmodifiableMapViewOfString$String = dart.constFn(collection.UnmodifiableMapView$(core.String, core.String)))();
|
| -let MapOfString$ListOfString = () => (MapOfString$ListOfString = dart.constFn(core.Map$(core.String, ListOfString())))();
|
| let MapOfString$String = () => (MapOfString$String = dart.constFn(core.Map$(core.String, core.String)))();
|
| let IterableOfString = () => (IterableOfString = dart.constFn(core.Iterable$(core.String)))();
|
| let MapOfString$dynamic = () => (MapOfString$dynamic = dart.constFn(core.Map$(core.String, dart.dynamic)))();
|
| +let UnmodifiableMapViewOfString$String = () => (UnmodifiableMapViewOfString$String = dart.constFn(collection.UnmodifiableMapView$(core.String, core.String)))();
|
| +let MapOfString$ListOfString = () => (MapOfString$ListOfString = dart.constFn(core.Map$(core.String, ListOfString())))();
|
| +let ListOfUint8List = () => (ListOfUint8List = dart.constFn(core.List$(typed_data.Uint8List)))();
|
| let MapOfString$ServiceExtensionHandler = () => (MapOfString$ServiceExtensionHandler = dart.constFn(core.Map$(core.String, developer.ServiceExtensionHandler)))();
|
| let MapOfString$Metric = () => (MapOfString$Metric = dart.constFn(core.Map$(core.String, developer.Metric)))();
|
| let ListOf_SyncBlock = () => (ListOf_SyncBlock = dart.constFn(core.List$(developer._SyncBlock)))();
|
| let JSArrayOf_AsyncBlock = () => (JSArrayOf_AsyncBlock = dart.constFn(_interceptors.JSArray$(developer._AsyncBlock)))();
|
| let ListOf_AsyncBlock = () => (ListOf_AsyncBlock = dart.constFn(core.List$(developer._AsyncBlock)))();
|
| let CompleterOfUri = () => (CompleterOfUri = dart.constFn(async.Completer$(core.Uri)))();
|
| -let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
|
| -let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
|
| +let JSArrayOfUint8List = () => (JSArrayOfUint8List = dart.constFn(_interceptors.JSArray$(typed_data.Uint8List)))();
|
| +let ChunkedConverterOfListOfint$ListOfint$ListOfint$ListOfint = () => (ChunkedConverterOfListOfint$ListOfint$ListOfint$ListOfint = dart.constFn(convert.ChunkedConverter$(ListOfint(), ListOfint(), ListOfint(), ListOfint())))();
|
| let FutureOfDirectory = () => (FutureOfDirectory = dart.constFn(async.Future$(io.Directory)))();
|
| let FutureOrOfDirectory = () => (FutureOrOfDirectory = dart.constFn(async.FutureOr$(io.Directory)))();
|
| -let StreamOfFileSystemEntity = () => (StreamOfFileSystemEntity = dart.constFn(async.Stream$(io.FileSystemEntity)))();
|
| let JSArrayOfFileSystemEntity = () => (JSArrayOfFileSystemEntity = dart.constFn(_interceptors.JSArray$(io.FileSystemEntity)))();
|
| let FutureOrOfString = () => (FutureOrOfString = dart.constFn(async.FutureOr$(core.String)))();
|
| let FutureOrOfbool = () => (FutureOrOfbool = dart.constFn(async.FutureOr$(core.bool)))();
|
| let FutureOrOfint = () => (FutureOrOfint = dart.constFn(async.FutureOr$(core.int)))();
|
| let ListOfFileSystemEntity = () => (ListOfFileSystemEntity = dart.constFn(core.List$(io.FileSystemEntity)))();
|
| +let StreamControllerOfFileSystemEntity = () => (StreamControllerOfFileSystemEntity = dart.constFn(async.StreamController$(io.FileSystemEntity)))();
|
| let StreamControllerOfListOfint = () => (StreamControllerOfListOfint = dart.constFn(async.StreamController$(ListOfint())))();
|
| let FutureOfRandomAccessFile = () => (FutureOfRandomAccessFile = dart.constFn(async.Future$(io.RandomAccessFile)))();
|
| let CompleterOfFile = () => (CompleterOfFile = dart.constFn(async.Completer$(io.File)))();
|
| +let CompleterOfListOfint = () => (CompleterOfListOfint = dart.constFn(async.Completer$(ListOfint())))();
|
| let FutureOfListOfint = () => (FutureOfListOfint = dart.constFn(async.Future$(ListOfint())))();
|
| let FutureOrOfFile = () => (FutureOrOfFile = dart.constFn(async.FutureOr$(io.File)))();
|
| let FutureOfFile = () => (FutureOfFile = dart.constFn(async.Future$(io.File)))();
|
| -let FutureOrOfListOfint = () => (FutureOrOfListOfint = dart.constFn(async.FutureOr$(ListOfint())))();
|
| +let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
|
| let ListOfFileSystemEntityType = () => (ListOfFileSystemEntityType = dart.constFn(core.List$(io.FileSystemEntityType)))();
|
| let StreamOfHttpRequest = () => (StreamOfHttpRequest = dart.constFn(async.Stream$(io.HttpRequest)))();
|
| let ListOfRedirectInfo = () => (ListOfRedirectInfo = dart.constFn(core.List$(io.RedirectInfo)))();
|
| @@ -408,7 +415,6 @@ let HashMapOfString$ListOfString = () => (HashMapOfString$ListOfString = dart.co
|
| let ListOfCookie = () => (ListOfCookie = dart.constFn(core.List$(io.Cookie)))();
|
| let StringAndListOfStringTovoid = () => (StringAndListOfStringTovoid = dart.constFn(dart.functionType(dart.void, [core.String, ListOfString()])))();
|
| let FutureOfHttpClientResponse = () => (FutureOfHttpClientResponse = dart.constFn(async.Future$(io.HttpClientResponse)))();
|
| -let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
|
| let FutureOrOfHttpClientResponse = () => (FutureOrOfHttpClientResponse = dart.constFn(async.FutureOr$(io.HttpClientResponse)))();
|
| let _StreamSinkImpl = () => (_StreamSinkImpl = dart.constFn(io._StreamSinkImpl$()))();
|
| let StreamConsumerOfListOfint = () => (StreamConsumerOfListOfint = dart.constFn(async.StreamConsumer$(ListOfint())))();
|
| @@ -416,11 +422,14 @@ let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOu
|
| let CompleterOfHttpClientResponse = () => (CompleterOfHttpClientResponse = dart.constFn(async.Completer$(io.HttpClientResponse)))();
|
| let JSArrayOfRedirectInfo = () => (JSArrayOfRedirectInfo = dart.constFn(_interceptors.JSArray$(io.RedirectInfo)))();
|
| let JSArrayOfFuture = () => (JSArrayOfFuture = dart.constFn(_interceptors.JSArray$(async.Future)))();
|
| +let CompleterOfSocket = () => (CompleterOfSocket = dart.constFn(async.Completer$(io.Socket)))();
|
| let CompleterOf_HttpIncoming = () => (CompleterOf_HttpIncoming = dart.constFn(async.Completer$(io._HttpIncoming)))();
|
| -let X509CertificateTobool = () => (X509CertificateTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate])))();
|
| let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
|
| +let X509CertificateTobool = () => (X509CertificateTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate])))();
|
| +let FutureOfSocket = () => (FutureOfSocket = dart.constFn(async.Future$(io.Socket)))();
|
| let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
|
| let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(io._ConnectionInfo)))();
|
| +let CompleterOf_ConnectionInfo = () => (CompleterOf_ConnectionInfo = dart.constFn(async.Completer$(io._ConnectionInfo)))();
|
| let FutureOrOf_ConnectionInfo = () => (FutureOrOf_ConnectionInfo = dart.constFn(async.FutureOr$(io._ConnectionInfo)))();
|
| let SetOf_HttpClientConnection = () => (SetOf_HttpClientConnection = dart.constFn(core.Set$(io._HttpClientConnection)))();
|
| let HashMapOfString$_ConnectionTarget = () => (HashMapOfString$_ConnectionTarget = dart.constFn(collection.HashMap$(core.String, io._ConnectionTarget)))();
|
| @@ -443,9 +452,8 @@ let StreamControllerOfHttpRequest = () => (StreamControllerOfHttpRequest = dart.
|
| let HttpRequestTovoid = () => (HttpRequestTovoid = dart.constFn(dart.functionType(dart.void, [io.HttpRequest])))();
|
| let MapOfint$_HttpServer = () => (MapOfint$_HttpServer = dart.constFn(core.Map$(core.int, io._HttpServer)))();
|
| let ListOf_Proxy = () => (ListOf_Proxy = dart.constFn(core.List$(io._Proxy)))();
|
| -let FutureOfSocket = () => (FutureOfSocket = dart.constFn(async.Future$(io.Socket)))();
|
| let ListOfbool = () => (ListOfbool = dart.constFn(core.List$(core.bool)))();
|
| -let StreamOfint = () => (StreamOfint = dart.constFn(async.Stream$(core.int)))();
|
| +let StreamSubscriptionOfListOfint = () => (StreamSubscriptionOfListOfint = dart.constFn(async.StreamSubscription$(ListOfint())))();
|
| let StreamControllerOf_HttpIncoming = () => (StreamControllerOf_HttpIncoming = dart.constFn(async.StreamController$(io._HttpIncoming)))();
|
| let _HttpIncomingTovoid = () => (_HttpIncomingTovoid = dart.constFn(dart.functionType(dart.void, [io._HttpIncoming])))();
|
| let MapOfString$_HttpSession = () => (MapOfString$_HttpSession = dart.constFn(core.Map$(core.String, io._HttpSession)))();
|
| @@ -456,14 +464,16 @@ let MapOfint$_ProcessResourceInfo = () => (MapOfint$_ProcessResourceInfo = dart.
|
| let MapOfint$_SocketResourceInfo = () => (MapOfint$_SocketResourceInfo = dart.constFn(core.Map$(core.int, io._SocketResourceInfo)))();
|
| let StreamSinkOfListOfint = () => (StreamSinkOfListOfint = dart.constFn(async.StreamSink$(ListOfint())))();
|
| let FutureOfLink = () => (FutureOfLink = dart.constFn(async.Future$(io.Link)))();
|
| +let _CaseInsensitiveStringMapOfString = () => (_CaseInsensitiveStringMapOfString = dart.constFn(io._CaseInsensitiveStringMap$(core.String)))();
|
| let _CaseInsensitiveStringMap = () => (_CaseInsensitiveStringMap = dart.constFn(io._CaseInsensitiveStringMap$()))();
|
| +let StreamSubscriptionOfRawSocketEvent = () => (StreamSubscriptionOfRawSocketEvent = dart.constFn(async.StreamSubscription$(io.RawSocketEvent)))();
|
| let FutureOfRawSecureSocket = () => (FutureOfRawSecureSocket = dart.constFn(async.Future$(io.RawSecureSocket)))();
|
| let SecureSocketTovoid = () => (SecureSocketTovoid = dart.constFn(dart.functionType(dart.void, [io.SecureSocket])))();
|
| let StreamControllerOfRawSecureSocket = () => (StreamControllerOfRawSecureSocket = dart.constFn(async.StreamController$(io.RawSecureSocket)))();
|
| let RawSecureSocketTovoid = () => (RawSecureSocketTovoid = dart.constFn(dart.functionType(dart.void, [io.RawSecureSocket])))();
|
| let StreamSubscriptionOfRawSocket = () => (StreamSubscriptionOfRawSocket = dart.constFn(async.StreamSubscription$(io.RawSocket)))();
|
| -let StreamSubscriptionOfRawSocketEvent = () => (StreamSubscriptionOfRawSocketEvent = dart.constFn(async.StreamSubscription$(io.RawSocketEvent)))();
|
| let CompleterOf_RawSecureSocket = () => (CompleterOf_RawSecureSocket = dart.constFn(async.Completer$(io._RawSecureSocket)))();
|
| +let CompleterOfRawSecureSocket = () => (CompleterOfRawSecureSocket = dart.constFn(async.Completer$(io.RawSecureSocket)))();
|
| let StreamControllerOfRawSocketEvent = () => (StreamControllerOfRawSocketEvent = dart.constFn(async.StreamController$(io.RawSocketEvent)))();
|
| let RawSocketEventTovoid = () => (RawSocketEventTovoid = dart.constFn(dart.functionType(dart.void, [io.RawSocketEvent])))();
|
| let StreamOfRawSocketEvent = () => (StreamOfRawSocketEvent = dart.constFn(async.Stream$(io.RawSocketEvent)))();
|
| @@ -473,12 +483,11 @@ let StreamOfRawSocket = () => (StreamOfRawSocket = dart.constFn(async.Stream$(io
|
| let StreamOfSocket = () => (StreamOfSocket = dart.constFn(async.Stream$(io.Socket)))();
|
| let StreamTransformerOfHttpRequest$WebSocket = () => (StreamTransformerOfHttpRequest$WebSocket = dart.constFn(async.StreamTransformer$(io.HttpRequest, io.WebSocket)))();
|
| let ListOfStringTodynamic = () => (ListOfStringTodynamic = dart.constFn(dart.functionType(dart.dynamic, [ListOfString()])))();
|
| +let EventSinkOfListOfint = () => (EventSinkOfListOfint = dart.constFn(async.EventSink$(ListOfint())))();
|
| let StreamTransformerOfListOfint$dynamic = () => (StreamTransformerOfListOfint$dynamic = dart.constFn(async.StreamTransformer$(ListOfint(), dart.dynamic)))();
|
| -let EventSinkOfUint8List = () => (EventSinkOfUint8List = dart.constFn(async.EventSink$(typed_data.Uint8List)))();
|
| let StreamControllerOfWebSocket = () => (StreamControllerOfWebSocket = dart.constFn(async.StreamController$(io.WebSocket)))();
|
| let FutureOfWebSocket = () => (FutureOfWebSocket = dart.constFn(async.Future$(io.WebSocket)))();
|
| -let EventSinkOfListOfint = () => (EventSinkOfListOfint = dart.constFn(async.EventSink$(ListOfint())))();
|
| -let JSArrayOfUint8List = () => (JSArrayOfUint8List = dart.constFn(_interceptors.JSArray$(typed_data.Uint8List)))();
|
| +let FutureOfString = () => (FutureOfString = dart.constFn(async.Future$(core.String)))();
|
| let StreamTransformerOfdynamic$ListOfint = () => (StreamTransformerOfdynamic$ListOfint = dart.constFn(async.StreamTransformer$(dart.dynamic, ListOfint())))();
|
| let MapOfint$_WebSocketImpl = () => (MapOfint$_WebSocketImpl = dart.constFn(core.Map$(core.int, io._WebSocketImpl)))();
|
| let FutureOfIsolate = () => (FutureOfIsolate = dart.constFn(async.Future$(isolate.Isolate)))();
|
| @@ -686,10 +695,11 @@ let ListToNull = () => (ListToNull = dart.constFn(dart.definiteFunctionType(core
|
| let StringToNull = () => (StringToNull = dart.constFn(dart.definiteFunctionType(core.Null, [core.String])))();
|
| let dynamicToNull = () => (dynamicToNull = dart.constFn(dart.definiteFunctionType(core.Null, [dart.dynamic])))();
|
| let TimerToNull = () => (TimerToNull = dart.constFn(dart.definiteFunctionType(core.Null, [async.Timer])))();
|
| +let VoidTo_Future = () => (VoidTo_Future = dart.constFn(dart.definiteFunctionType(async._Future, [])))();
|
| +let VoidToFuture = () => (VoidToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [])))();
|
| let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
|
| let boolToNull = () => (boolToNull = dart.constFn(dart.definiteFunctionType(core.Null, [core.bool])))();
|
| let dynamicAndStackTraceTovoid = () => (dynamicAndStackTraceTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [dart.dynamic, core.StackTrace])))();
|
| -let VoidToFuture = () => (VoidToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [])))();
|
| let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core.int, [])))();
|
| let dynamicAnddynamicToError = () => (dynamicAnddynamicToError = dart.constFn(dart.definiteFunctionType(core.Error, [dart.dynamic, dart.dynamic])))();
|
| let dynamicAnddynamicAnddynamicToError = () => (dynamicAnddynamicAnddynamicToError = dart.constFn(dart.definiteFunctionType(core.Error, [dart.dynamic, dart.dynamic, dart.dynamic])))();
|
| @@ -750,7 +760,7 @@ let FnToNull = () => (FnToNull = dart.constFn(dart.definiteFunctionType(core.Nul
|
| let _NotificationHandlerToFuture = () => (_NotificationHandlerToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [async._NotificationHandler])))();
|
| let dynamicAndStackTraceToNull = () => (dynamicAndStackTraceToNull = dart.constFn(dart.definiteFunctionType(core.Null, [dart.dynamic, core.StackTrace])))();
|
| let dynamic__Tovoid = () => (dynamic__Tovoid = dart.constFn(dart.definiteFunctionType(dart.void, [dart.dynamic], [core.StackTrace])))();
|
| -let FnAndFnAndFnTodynamic = () => (FnAndFnAndFnTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [VoidTodynamic(), dynamicTodynamic(), ZoneBinaryCallbackOfdynamic$dynamic$StackTrace()])))();
|
| +let FnAndFnAndFnTodynamic = () => (FnAndFnAndFnTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [VoidTodynamic(), dynamicTodynamic(), dynamicAndStackTraceTodynamic()])))();
|
| let StreamSubscriptionAnd_FutureAnddynamic__Tovoid = () => (StreamSubscriptionAnd_FutureAnddynamic__Tovoid = dart.constFn(dart.definiteFunctionType(dart.void, [async.StreamSubscription, async._Future, dart.dynamic, core.StackTrace])))();
|
| let StreamSubscriptionAnd_FutureTo_ErrorCallback = () => (StreamSubscriptionAnd_FutureTo_ErrorCallback = dart.constFn(dart.definiteFunctionType(async._ErrorCallback, [async.StreamSubscription, async._Future])))();
|
| let StreamSubscriptionAnd_FutureAnddynamicTovoid = () => (StreamSubscriptionAnd_FutureAnddynamicTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [async.StreamSubscription, async._Future, dart.dynamic])))();
|
| @@ -788,12 +798,19 @@ let intToString = () => (intToString = dart.constFn(dart.definiteFunctionType(co
|
| let ObjectAndObjectTobool = () => (ObjectAndObjectTobool = dart.constFn(dart.definiteFunctionType(core.bool, [core.Object, core.Object])))();
|
| let ObjectToint = () => (ObjectToint = dart.constFn(dart.definiteFunctionType(core.int, [core.Object])))();
|
| let ObjectTovoid = () => (ObjectTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.Object])))();
|
| +let MapOfString$StringAndStringToMapOfString$String = () => (MapOfString$StringAndStringToMapOfString$String = dart.constFn(dart.definiteFunctionType(MapOfString$String(), [MapOfString$String(), core.String])))();
|
| +let StringAndintTovoid = () => (StringAndintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, core.int])))();
|
| +let String__Tovoid = () => (String__Tovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String], [dart.dynamic])))();
|
| let StringAndStringTovoid = () => (StringAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, core.String])))();
|
| let StringAnddynamicToNull = () => (StringAnddynamicToNull = dart.constFn(dart.definiteFunctionType(core.Null, [core.String, dart.dynamic])))();
|
| -let MapOfString$StringAndStringToMapOfString$String = () => (MapOfString$StringAndStringToMapOfString$String = dart.constFn(dart.definiteFunctionType(MapOfString$String(), [MapOfString$String(), core.String])))();
|
| let intAndintAndintTovoid = () => (intAndintAndintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int, core.int, core.int])))();
|
| -let String__Tovoid = () => (String__Tovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String], [dart.dynamic])))();
|
| let StringAndStringToNull = () => (StringAndStringToNull = dart.constFn(dart.definiteFunctionType(core.Null, [core.String, core.String])))();
|
| +let intToUint8List = () => (intToUint8List = dart.constFn(dart.definiteFunctionType(typed_data.Uint8List, [core.int])))();
|
| +let dynamicAnddynamicToUint8List = () => (dynamicAnddynamicToUint8List = dart.constFn(dart.definiteFunctionType(typed_data.Uint8List, [dart.dynamic, dart.dynamic])))();
|
| +let Uint8ListAndStringAndintTovoid = () => (Uint8ListAndStringAndintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [typed_data.Uint8List, core.String, core.int])))();
|
| +let VoidToListOfUint8List = () => (VoidToListOfUint8List = dart.constFn(dart.definiteFunctionType(ListOfUint8List(), [])))();
|
| +let StringAndintAndint__Toint = () => (StringAndintAndint__Toint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.int, core.int, core.int, ListOfint()])))();
|
| +let StringAndintToint = () => (StringAndintToint = dart.constFn(dart.definiteFunctionType(core.int, [core.String, core.int])))();
|
| let __Tobool = () => (__Tobool = dart.constFn(dart.definiteFunctionType(core.bool, [], {when: core.bool, message: core.String})))();
|
| let String__Tovoid = () => (String__Tovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String], {time: core.DateTime, sequenceNumber: core.int, level: core.int, name: core.String, zone: async.Zone, error: core.Object, stackTrace: core.StackTrace})))();
|
| let StringAndServiceExtensionHandlerTovoid = () => (StringAndServiceExtensionHandlerTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, developer.ServiceExtensionHandler])))();
|
| @@ -808,8 +825,9 @@ let intAndStringAndString__Tovoid = () => (intAndStringAndString__Tovoid = dart.
|
| let UriTovoid = () => (UriTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.Uri])))();
|
| let SendPortTovoid = () => (SendPortTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [isolate.SendPort])))();
|
| let SendPortAndboolTovoid = () => (SendPortAndboolTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [isolate.SendPort, core.bool])))();
|
| +let SendPortToString = () => (SendPortToString = dart.constFn(dart.definiteFunctionType(core.String, [isolate.SendPort])))();
|
| let dynamicAndStringAndStringTodynamic = () => (dynamicAndStringAndStringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, core.String, core.String])))();
|
| -let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int, core.int])))();
|
| +let ListOfintAndintAndintTo_BufferAndStart = () => (ListOfintAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [ListOfint(), core.int, core.int])))();
|
| let intTovoid = () => (intTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.int])))();
|
| let DirectoryToFutureOfDirectory = () => (DirectoryToFutureOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOfDirectory(), [io.Directory])))();
|
| let boolToFutureOrOfDirectory = () => (boolToFutureOrOfDirectory = dart.constFn(dart.definiteFunctionType(FutureOrOfDirectory(), [core.bool])))();
|
| @@ -828,17 +846,15 @@ let FileSystemEntityTo_File = () => (FileSystemEntityTo_File = dart.constFn(dart
|
| let dynamicToFile = () => (dynamicToFile = dart.constFn(dart.definiteFunctionType(io.File, [dart.dynamic])))();
|
| let dynamicTo_RandomAccessFile = () => (dynamicTo_RandomAccessFile = dart.constFn(dart.definiteFunctionType(io._RandomAccessFile, [dart.dynamic])))();
|
| let dynamicToDateTime = () => (dynamicToDateTime = dart.constFn(dart.definiteFunctionType(core.DateTime, [dart.dynamic])))();
|
| -let dynamicToFutureOfListOfint = () => (dynamicToFutureOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOfListOfint(), [dart.dynamic])))();
|
| -let intToFutureOfListOfint = () => (intToFutureOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOfListOfint(), [core.int])))();
|
| let RandomAccessFileToFutureOfListOfint = () => (RandomAccessFileToFutureOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOfListOfint(), [io.RandomAccessFile])))();
|
| +let intToFutureOfListOfint = () => (intToFutureOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOfListOfint(), [core.int])))();
|
| let ListOfintToString = () => (ListOfintToString = dart.constFn(dart.definiteFunctionType(core.String, [ListOfint()])))();
|
| let RandomAccessFileTo_File = () => (RandomAccessFileTo_File = dart.constFn(dart.definiteFunctionType(io._File, [io.RandomAccessFile])))();
|
| let RandomAccessFileToObject = () => (RandomAccessFileToObject = dart.constFn(dart.definiteFunctionType(core.Object, [io.RandomAccessFile])))();
|
| let RandomAccessFileToFutureOrOfFile = () => (RandomAccessFileToFutureOrOfFile = dart.constFn(dart.definiteFunctionType(FutureOrOfFile(), [io.RandomAccessFile])))();
|
| -let dynamicToFutureOrOfListOfint = () => (dynamicToFutureOrOfListOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfListOfint(), [dart.dynamic])))();
|
| +let dynamicToListOfint = () => (dynamicToListOfint = dart.constFn(dart.definiteFunctionType(ListOfint(), [dart.dynamic])))();
|
| let dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
|
| let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
|
| -let ListOfintTovoid = () => (ListOfintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
|
| let StringAndListOfStringToNull = () => (StringAndListOfStringToNull = dart.constFn(dart.definiteFunctionType(core.Null, [core.String, ListOfString()])))();
|
| let CookieToString = () => (CookieToString = dart.constFn(dart.definiteFunctionType(core.String, [io.Cookie])))();
|
| let CookieTobool = () => (CookieTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io.Cookie])))();
|
| @@ -854,11 +870,14 @@ let CookieToNull = () => (CookieToNull = dart.constFn(dart.definiteFunctionType(
|
| let ListToFutureOrOfHttpClientResponse = () => (ListToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [core.List])))();
|
| let HttpClientResponseTovoid = () => (HttpClientResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.HttpClientResponse])))();
|
| let dynamicToIterable = () => (dynamicToIterable = dart.constFn(dart.definiteFunctionType(core.Iterable, [dart.dynamic])))();
|
| +let ListOfintTovoid = () => (ListOfintTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
|
| let dynamicTo_HttpOutboundMessage = () => (dynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic])))();
|
| let dynamicAnddynamicTo_HttpOutboundMessage = () => (dynamicAnddynamicTo_HttpOutboundMessage = dart.constFn(dart.definiteFunctionType(io._HttpOutboundMessage, [dart.dynamic, dart.dynamic])))();
|
| let dynamic__ToNull = () => (dynamic__ToNull = dart.constFn(dart.definiteFunctionType(core.Null, [dart.dynamic], [core.StackTrace])))();
|
| let _HttpIncomingToNull = () => (_HttpIncomingToNull = dart.constFn(dart.definiteFunctionType(core.Null, [io._HttpIncoming])))();
|
| -let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
|
| +let SocketToSocket = () => (SocketToSocket = dart.constFn(dart.definiteFunctionType(io.Socket, [io.Socket])))();
|
| +let SocketTo_DetachedSocket = () => (SocketTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [io.Socket])))();
|
| +let SocketTovoid = () => (SocketTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Socket])))();
|
| let SecureSocketTo_HttpClientConnection = () => (SecureSocketTo_HttpClientConnection = dart.constFn(dart.definiteFunctionType(io._HttpClientConnection, [io.SecureSocket])))();
|
| let HttpClientResponseToFutureOfSecureSocket = () => (HttpClientResponseToFutureOfSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfSecureSocket(), [io.HttpClientResponse])))();
|
| let X509CertificateTobool = () => (X509CertificateTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io.X509Certificate])))();
|
| @@ -872,14 +891,15 @@ let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart
|
| let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
|
| let VoidToFutureOf_ConnectionInfo = () => (VoidToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [])))();
|
| let _SiteCredentialsAnd_CredentialsTo_SiteCredentials = () => (_SiteCredentialsAnd_CredentialsTo_SiteCredentials = dart.constFn(dart.definiteFunctionType(io._SiteCredentials, [io._SiteCredentials, io._Credentials])))();
|
| +let SocketToNull = () => (SocketToNull = dart.constFn(dart.definiteFunctionType(core.Null, [io.Socket])))();
|
| +let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
|
| let ServerSocketTo_HttpServer = () => (ServerSocketTo_HttpServer = dart.constFn(dart.definiteFunctionType(io._HttpServer, [io.ServerSocket])))();
|
| let SecureServerSocketTo_HttpServer = () => (SecureServerSocketTo_HttpServer = dart.constFn(dart.definiteFunctionType(io._HttpServer, [io.SecureServerSocket])))();
|
| -let SocketToNull = () => (SocketToNull = dart.constFn(dart.definiteFunctionType(core.Null, [io.Socket])))();
|
| let _HttpConnectionToNull = () => (_HttpConnectionToNull = dart.constFn(dart.definiteFunctionType(core.Null, [io._HttpConnection])))();
|
| let _HttpConnectionToMap = () => (_HttpConnectionToMap = dart.constFn(dart.definiteFunctionType(core.Map, [io._HttpConnection])))();
|
| -let _FileResourceInfoToMapOfString$String = () => (_FileResourceInfoToMapOfString$String = dart.constFn(dart.definiteFunctionType(MapOfString$String(), [io._FileResourceInfo])))();
|
| -let _ProcessResourceInfoToMapOfString$String = () => (_ProcessResourceInfoToMapOfString$String = dart.constFn(dart.definiteFunctionType(MapOfString$String(), [io._ProcessResourceInfo])))();
|
| -let _SocketResourceInfoToMapOfString$String = () => (_SocketResourceInfoToMapOfString$String = dart.constFn(dart.definiteFunctionType(MapOfString$String(), [io._SocketResourceInfo])))();
|
| +let _FileResourceInfoToMapOfString$dynamic = () => (_FileResourceInfoToMapOfString$dynamic = dart.constFn(dart.definiteFunctionType(MapOfString$dynamic(), [io._FileResourceInfo])))();
|
| +let _ProcessResourceInfoToMapOfString$dynamic = () => (_ProcessResourceInfoToMapOfString$dynamic = dart.constFn(dart.definiteFunctionType(MapOfString$dynamic(), [io._ProcessResourceInfo])))();
|
| +let _SocketResourceInfoToMapOfString$dynamic = () => (_SocketResourceInfoToMapOfString$dynamic = dart.constFn(dart.definiteFunctionType(MapOfString$dynamic(), [io._SocketResourceInfo])))();
|
| let dynamicTo_Link = () => (dynamicTo_Link = dart.constFn(dart.definiteFunctionType(io._Link, [dart.dynamic])))();
|
| let FileSystemEntityToFutureOfLink = () => (FileSystemEntityToFutureOfLink = dart.constFn(dart.definiteFunctionType(FutureOfLink(), [io.FileSystemEntity])))();
|
| let FileSystemEntityTo_Link = () => (FileSystemEntityTo_Link = dart.constFn(dart.definiteFunctionType(io._Link, [io.FileSystemEntity])))();
|
| @@ -900,9 +920,8 @@ let EventSinkTo_WebSocketProtocolTransformer = () => (EventSinkTo_WebSocketProto
|
| let WebSocketTovoid = () => (WebSocketTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.WebSocket])))();
|
| let HttpRequestToNull = () => (HttpRequestToNull = dart.constFn(dart.definiteFunctionType(core.Null, [io.HttpRequest])))();
|
| let SocketTo_WebSocketImpl = () => (SocketTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [io.Socket])))();
|
| -let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [core.String])))();
|
| +let StringToFutureOfWebSocket = () => (StringToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [core.String])))();
|
| let EventSinkOfListOfintTo_WebSocketOutgoingTransformer = () => (EventSinkOfListOfintTo_WebSocketOutgoingTransformer = dart.constFn(dart.definiteFunctionType(io._WebSocketOutgoingTransformer, [EventSinkOfListOfint()])))();
|
| -let dynamicTo_WebSocketImpl = () => (dynamicTo_WebSocketImpl = dart.constFn(dart.definiteFunctionType(io._WebSocketImpl, [dart.dynamic])))();
|
| let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
|
| let StringAnddynamicTovoid = () => (StringAnddynamicTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, dart.dynamic])))();
|
| let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
|
| @@ -2046,7 +2065,7 @@ dart._toDisplayName = function(name) {
|
| return name;
|
| };
|
| dart._dartSymbol = function(name) {
|
| - return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.Symbol.es6(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
|
| + return core.Symbol._check(typeof name === "symbol" ? dart.const(new _internal.PrivateSymbol(dart._toSymbolName(name), name)) : dart.const(core.Symbol.new(dart._toDisplayName(name))));
|
| };
|
| dart.extractNamedArgs = function(args) {
|
| if (args.length > 0) {
|
| @@ -4410,7 +4429,7 @@ _interceptors.JSArray$ = dart.generic(E => {
|
| IterableOfE()._check(iterable);
|
| this[dartx.checkGrowable]('insertAll');
|
| core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "index");
|
| - if (!_internal.EfficientLength.is(iterable)) {
|
| + if (!_internal.EfficientLengthIterable.is(iterable)) {
|
| iterable = iterable[dartx.toList]();
|
| }
|
| let insertionLength = iterable[dartx.length];
|
| @@ -4683,7 +4702,7 @@ _interceptors.JSArray$ = dart.generic(E => {
|
| IterableOfE()._check(replacement);
|
| this[dartx.checkGrowable]('replace range');
|
| core.RangeError.checkValidRange(start, end, this[dartx.length]);
|
| - if (!_internal.EfficientLength.is(replacement)) {
|
| + if (!_internal.EfficientLengthIterable.is(replacement)) {
|
| replacement = replacement[dartx.toList]();
|
| }
|
| let removeLength = dart.notNull(end) - dart.notNull(start);
|
| @@ -6119,7 +6138,6 @@ dart.defineLazy(core.double, {
|
| });
|
| _internal.POWERS_OF_TEN = dart.constList([1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0, 100000000000000.0, 1000000000000000.0, 10000000000000000.0, 100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0, 1e+21, 1e+22], core.double);
|
| const _string = Symbol('_string');
|
| -const _filter = Symbol('_filter');
|
| collection.ListMixin$ = dart.generic(E => {
|
| let ListIteratorOfE = () => (ListIteratorOfE = dart.constFn(_internal.ListIterator$(E)))();
|
| let VoidToE = () => (VoidToE = dart.constFn(dart.functionType(E, [])))();
|
| @@ -6131,7 +6149,6 @@ collection.ListMixin$ = dart.generic(E => {
|
| let ListOfE = () => (ListOfE = dart.constFn(core.List$(E)))();
|
| let SetOfE = () => (SetOfE = dart.constFn(core.Set$(E)))();
|
| let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| - let JSArrayOfE = () => (JSArrayOfE = dart.constFn(_interceptors.JSArray$(E)))();
|
| let ListMapViewOfE = () => (ListMapViewOfE = dart.constFn(_internal.ListMapView$(E)))();
|
| let ReversedListIterableOfE = () => (ReversedListIterableOfE = dart.constFn(_internal.ReversedListIterable$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| @@ -6413,14 +6430,13 @@ collection.ListMixin$ = dart.generic(E => {
|
| return false;
|
| }
|
| removeWhere(test) {
|
| - this[_filter](test, false);
|
| + collection.ListMixin._filter(this, test, false);
|
| }
|
| retainWhere(test) {
|
| - this[_filter](test, true);
|
| + collection.ListMixin._filter(this, test, true);
|
| }
|
| - [_filter](test, retainMatching) {
|
| - let source = this;
|
| - let retained = JSArrayOfE().of([]);
|
| + static _filter(source, test, retainMatching) {
|
| + let retained = [];
|
| let length = source[dartx.length];
|
| for (let i = 0; i < dart.notNull(length); i++) {
|
| let element = source[dartx._get](i);
|
| @@ -6450,7 +6466,7 @@ collection.ListMixin$ = dart.generic(E => {
|
| sort(compare) {
|
| if (compare === void 0) compare = null;
|
| if (compare == null) {
|
| - _internal.Sort.sort(E)(this, dart.fn((a, b) => core.Comparable.compare(core.Comparable._check(a), core.Comparable._check(b)), dynamicAnddynamicToint()));
|
| + _internal.Sort.sort(core.Comparable)(this, core.Comparable.compare);
|
| } else {
|
| _internal.Sort.sort(E)(this, compare);
|
| }
|
| @@ -6533,7 +6549,7 @@ collection.ListMixin$ = dart.generic(E => {
|
| replaceRange(start, end, newContents) {
|
| IterableOfE()._check(newContents);
|
| core.RangeError.checkValidRange(start, end, this[dartx.length]);
|
| - if (!_internal.EfficientLength.is(newContents)) {
|
| + if (!_internal.EfficientLengthIterable.is(newContents)) {
|
| newContents = newContents[dartx.toList]();
|
| }
|
| let removeLength = dart.notNull(end) - dart.notNull(start);
|
| @@ -6611,7 +6627,7 @@ collection.ListMixin$ = dart.generic(E => {
|
| insertAll(index, iterable) {
|
| IterableOfE()._check(iterable);
|
| core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "index");
|
| - if (!_internal.EfficientLength.is(iterable) || core.identical(iterable, this)) {
|
| + if (!_internal.EfficientLengthIterable.is(iterable) || core.identical(iterable, this)) {
|
| iterable = iterable[dartx.toList]();
|
| }
|
| let insertionLength = iterable[dartx.length];
|
| @@ -6682,7 +6698,6 @@ collection.ListMixin$ = dart.generic(E => {
|
| remove: dart.definiteFunctionType(core.bool, [core.Object]),
|
| removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
|
| retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
|
| - [_filter]: dart.definiteFunctionType(dart.void, [dynamicTobool(), core.bool]),
|
| clear: dart.definiteFunctionType(dart.void, []),
|
| removeLast: dart.definiteFunctionType(E, []),
|
| sort: dart.definiteFunctionType(dart.void, [], [EAndEToint()]),
|
| @@ -6700,7 +6715,9 @@ collection.ListMixin$ = dart.generic(E => {
|
| removeAt: dart.definiteFunctionType(E, [core.int]),
|
| insertAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfE()]),
|
| setAll: dart.definiteFunctionType(dart.void, [core.int, IterableOfE()])
|
| - })
|
| + }),
|
| + statics: () => ({_filter: dart.definiteFunctionType(dart.void, [core.List, dynamicTobool(), core.bool])}),
|
| + names: ['_filter']
|
| });
|
| dart.defineExtensionMembers(ListMixin, [
|
| 'elementAt',
|
| @@ -6961,7 +6978,49 @@ dart.setSignature(_internal.CodeUnits, {
|
| names: ['stringOf']
|
| });
|
| dart.defineExtensionMembers(_internal.CodeUnits, ['_get', 'length']);
|
| -_internal.EfficientLength = class EfficientLength extends core.Object {};
|
| +_internal.ExternalName = class ExternalName extends core.Object {
|
| + new(name) {
|
| + this.name = name;
|
| + }
|
| +};
|
| +dart.setSignature(_internal.ExternalName, {
|
| + constructors: () => ({new: dart.definiteFunctionType(_internal.ExternalName, [core.String])}),
|
| + fields: () => ({name: core.String})
|
| +});
|
| +const _name = Symbol('_name');
|
| +const _nativeSymbol = Symbol('_nativeSymbol');
|
| +_internal.PrivateSymbol = class PrivateSymbol extends core.Object {
|
| + new(name, nativeSymbol) {
|
| + this[_name] = name;
|
| + this[_nativeSymbol] = nativeSymbol;
|
| + }
|
| + static getName(symbol) {
|
| + return _internal.PrivateSymbol.as(symbol)[_name];
|
| + }
|
| + static getNativeSymbol(symbol) {
|
| + if (_internal.PrivateSymbol.is(symbol)) return symbol[_nativeSymbol];
|
| + return null;
|
| + }
|
| + ['=='](other) {
|
| + return _internal.PrivateSymbol.is(other) && core.identical(this[_nativeSymbol], other[_nativeSymbol]);
|
| + }
|
| + toString() {
|
| + return dart.str`Symbol("${this[_name]}")`;
|
| + }
|
| +};
|
| +_internal.PrivateSymbol[dart.implements] = () => [core.Symbol];
|
| +dart.setSignature(_internal.PrivateSymbol, {
|
| + constructors: () => ({new: dart.definiteFunctionType(_internal.PrivateSymbol, [core.String, core.Object])}),
|
| + fields: () => ({
|
| + [_name]: core.String,
|
| + [_nativeSymbol]: core.Object
|
| + }),
|
| + statics: () => ({
|
| + getName: dart.definiteFunctionType(core.String, [core.Symbol]),
|
| + getNativeSymbol: dart.definiteFunctionType(core.Object, [core.Symbol])
|
| + }),
|
| + names: ['getName', 'getNativeSymbol']
|
| +});
|
| core.Iterable$ = dart.generic(E => {
|
| let EmptyIterableOfE = () => (EmptyIterableOfE = dart.constFn(_internal.EmptyIterable$(E)))();
|
| let _GeneratorIterableOfE = () => (_GeneratorIterableOfE = dart.constFn(core._GeneratorIterable$(E)))();
|
| @@ -7101,7 +7160,7 @@ core.Iterable$ = dart.generic(E => {
|
| return SetOfE().from(this);
|
| }
|
| get length() {
|
| - dart.assert(!_internal.EfficientLength.is(this));
|
| + dart.assert(!_internal.EfficientLengthIterable.is(this));
|
| let count = 0;
|
| let it = this[dartx.iterator];
|
| while (dart.test(it.moveNext())) {
|
| @@ -7275,6 +7334,18 @@ core.Iterable$ = dart.generic(E => {
|
| return Iterable;
|
| });
|
| core.Iterable = Iterable();
|
| +_internal.EfficientLengthIterable$ = dart.generic(T => {
|
| + class EfficientLengthIterable extends core.Iterable$(T) {
|
| + new() {
|
| + super.new();
|
| + }
|
| + }
|
| + dart.setSignature(EfficientLengthIterable, {
|
| + constructors: () => ({new: dart.definiteFunctionType(_internal.EfficientLengthIterable$(T), [])})
|
| + });
|
| + return EfficientLengthIterable;
|
| +});
|
| +_internal.EfficientLengthIterable = EfficientLengthIterable();
|
| _internal.ListIterable$ = dart.generic(E => {
|
| let ListIteratorOfE = () => (ListIteratorOfE = dart.constFn(_internal.ListIterator$(E)))();
|
| let VoidToE = () => (VoidToE = dart.constFn(dart.functionType(E, [])))();
|
| @@ -7284,7 +7355,7 @@ _internal.ListIterable$ = dart.generic(E => {
|
| let SetOfE = () => (SetOfE = dart.constFn(core.Set$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| let ETobool = () => (ETobool = dart.constFn(dart.functionType(core.bool, [E])))();
|
| - class ListIterable extends core.Iterable$(E) {
|
| + class ListIterable extends _internal.EfficientLengthIterable$(E) {
|
| new() {
|
| super.new();
|
| }
|
| @@ -7491,7 +7562,6 @@ _internal.ListIterable$ = dart.generic(E => {
|
| return result;
|
| }
|
| }
|
| - ListIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(ListIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.ListIterable$(E), [])}),
|
| getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
|
| @@ -7693,7 +7763,7 @@ _internal.MappedIterable$ = dart.generic((S, T) => {
|
| let _TransformationOfS$T = () => (_TransformationOfS$T = dart.constFn(_internal._Transformation$(S, T)))();
|
| class MappedIterable extends core.Iterable$(T) {
|
| static new(iterable, func) {
|
| - if (_internal.EfficientLength.is(iterable)) {
|
| + if (_internal.EfficientLengthIterable.is(iterable)) {
|
| return new (EfficientLengthMappedIterableOfS$T())(iterable, func);
|
| }
|
| return new (MappedIterableOfS$T())._(iterable, func);
|
| @@ -7752,12 +7822,13 @@ _internal.MappedIterable = MappedIterable();
|
| _internal.EfficientLengthMappedIterable$ = dart.generic((S, T) => {
|
| let IterableOfS = () => (IterableOfS = dart.constFn(core.Iterable$(S)))();
|
| let SToT = () => (SToT = dart.constFn(dart.functionType(T, [S])))();
|
| + let EfficientLengthIterableOfT = () => (EfficientLengthIterableOfT = dart.constFn(_internal.EfficientLengthIterable$(T)))();
|
| class EfficientLengthMappedIterable extends _internal.MappedIterable$(S, T) {
|
| new(iterable, func) {
|
| super._(iterable, func);
|
| }
|
| }
|
| - EfficientLengthMappedIterable[dart.implements] = () => [_internal.EfficientLength];
|
| + EfficientLengthMappedIterable[dart.implements] = () => [EfficientLengthIterableOfT()];
|
| dart.setSignature(EfficientLengthMappedIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.EfficientLengthMappedIterable$(S, T), [IterableOfS(), SToT()])})
|
| });
|
| @@ -7822,7 +7893,6 @@ _internal.MappedListIterable$ = dart.generic((S, T) => {
|
| return this[_f](this[_source][dartx.elementAt](index));
|
| }
|
| }
|
| - MappedListIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(MappedListIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.MappedListIterable$(S, T), [IterableOfS(), _TransformationOfS$T()])}),
|
| fields: () => ({
|
| @@ -7852,6 +7922,11 @@ _internal.WhereIterable$ = dart.generic(E => {
|
| get iterator() {
|
| return new (WhereIteratorOfE())(this[_iterable][dartx.iterator], this[_f]);
|
| }
|
| + map(T) {
|
| + return f => {
|
| + return new (_internal.MappedIterable$(E, T))._(this, f);
|
| + };
|
| + }
|
| }
|
| dart.setSignature(WhereIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.WhereIterable$(E), [IterableOfE(), _ElementPredicateOfE()])}),
|
| @@ -7861,13 +7936,13 @@ _internal.WhereIterable$ = dart.generic(E => {
|
| }),
|
| getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])})
|
| });
|
| - dart.defineExtensionMembers(WhereIterable, ['iterator']);
|
| + dart.defineExtensionMembers(WhereIterable, ['map', 'iterator']);
|
| return WhereIterable;
|
| });
|
| _internal.WhereIterable = WhereIterable();
|
| _internal.WhereIterator$ = dart.generic(E => {
|
| let IteratorOfE = () => (IteratorOfE = dart.constFn(core.Iterator$(E)))();
|
| - let _ElementPredicateOfE = () => (_ElementPredicateOfE = dart.constFn(_internal._ElementPredicate$(E)))();
|
| + let ETobool = () => (ETobool = dart.constFn(dart.functionType(core.bool, [E])))();
|
| class WhereIterator extends core.Iterator$(E) {
|
| new(iterator, f) {
|
| this[_iterator] = iterator;
|
| @@ -7875,7 +7950,7 @@ _internal.WhereIterator$ = dart.generic(E => {
|
| }
|
| moveNext() {
|
| while (dart.test(this[_iterator].moveNext())) {
|
| - if (dart.test(this[_f](this[_iterator].current))) {
|
| + if (dart.test(dart.dcall(this[_f], this[_iterator].current))) {
|
| return true;
|
| }
|
| }
|
| @@ -7886,10 +7961,10 @@ _internal.WhereIterator$ = dart.generic(E => {
|
| }
|
| }
|
| dart.setSignature(WhereIterator, {
|
| - constructors: () => ({new: dart.definiteFunctionType(_internal.WhereIterator$(E), [IteratorOfE(), _ElementPredicateOfE()])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(_internal.WhereIterator$(E), [IteratorOfE(), ETobool()])}),
|
| fields: () => ({
|
| [_iterator]: IteratorOfE(),
|
| - [_f]: _ElementPredicateOfE()
|
| + [_f]: _internal._ElementPredicate
|
| }),
|
| getters: () => ({current: dart.definiteFunctionType(E, [])}),
|
| methods: () => ({moveNext: dart.definiteFunctionType(core.bool, [])})
|
| @@ -7988,7 +8063,7 @@ _internal.TakeIterable$ = dart.generic(E => {
|
| if (!(typeof takeCount == 'number') || dart.notNull(takeCount) < 0) {
|
| dart.throw(new core.ArgumentError(takeCount));
|
| }
|
| - if (_internal.EfficientLength.is(iterable)) {
|
| + if (_internal.EfficientLengthIterable.is(iterable)) {
|
| return new (EfficientLengthTakeIterableOfE())(iterable, takeCount);
|
| }
|
| return new (TakeIterableOfE())._(iterable, takeCount);
|
| @@ -8019,6 +8094,7 @@ _internal.TakeIterable$ = dart.generic(E => {
|
| });
|
| _internal.TakeIterable = TakeIterable();
|
| _internal.EfficientLengthTakeIterable$ = dart.generic(E => {
|
| + let EfficientLengthIterableOfE = () => (EfficientLengthIterableOfE = dart.constFn(_internal.EfficientLengthIterable$(E)))();
|
| let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| class EfficientLengthTakeIterable extends _internal.TakeIterable$(E) {
|
| new(iterable, takeCount) {
|
| @@ -8030,7 +8106,7 @@ _internal.EfficientLengthTakeIterable$ = dart.generic(E => {
|
| return iterableLength;
|
| }
|
| }
|
| - EfficientLengthTakeIterable[dart.implements] = () => [_internal.EfficientLength];
|
| + EfficientLengthTakeIterable[dart.implements] = () => [EfficientLengthIterableOfE()];
|
| dart.setSignature(EfficientLengthTakeIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.EfficientLengthTakeIterable$(E), [IterableOfE(), core.int])})
|
| });
|
| @@ -8142,7 +8218,7 @@ _internal.SkipIterable$ = dart.generic(E => {
|
| let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| class SkipIterable extends core.Iterable$(E) {
|
| static new(iterable, count) {
|
| - if (_internal.EfficientLength.is(iterable)) {
|
| + if (_internal.EfficientLengthIterable.is(iterable)) {
|
| return new (EfficientLengthSkipIterableOfE())(iterable, count);
|
| }
|
| return new (SkipIterableOfE())._(iterable, count);
|
| @@ -8184,6 +8260,7 @@ _internal.SkipIterable$ = dart.generic(E => {
|
| });
|
| _internal.SkipIterable = SkipIterable();
|
| _internal.EfficientLengthSkipIterable$ = dart.generic(E => {
|
| + let EfficientLengthIterableOfE = () => (EfficientLengthIterableOfE = dart.constFn(_internal.EfficientLengthIterable$(E)))();
|
| let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| class EfficientLengthSkipIterable extends _internal.SkipIterable$(E) {
|
| new(iterable, skipCount) {
|
| @@ -8195,7 +8272,7 @@ _internal.EfficientLengthSkipIterable$ = dart.generic(E => {
|
| return 0;
|
| }
|
| }
|
| - EfficientLengthSkipIterable[dart.implements] = () => [_internal.EfficientLength];
|
| + EfficientLengthSkipIterable[dart.implements] = () => [EfficientLengthIterableOfE()];
|
| dart.setSignature(EfficientLengthSkipIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.EfficientLengthSkipIterable$(E), [IterableOfE(), core.int])})
|
| });
|
| @@ -8304,7 +8381,7 @@ _internal.EmptyIterable$ = dart.generic(E => {
|
| let SetOfE = () => (SetOfE = dart.constFn(core.Set$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| let ETobool = () => (ETobool = dart.constFn(dart.functionType(core.bool, [E])))();
|
| - class EmptyIterable extends core.Iterable$(E) {
|
| + class EmptyIterable extends _internal.EfficientLengthIterable$(E) {
|
| new() {
|
| super.new();
|
| }
|
| @@ -8400,7 +8477,6 @@ _internal.EmptyIterable$ = dart.generic(E => {
|
| return SetOfE().new();
|
| }
|
| }
|
| - EmptyIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(EmptyIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_internal.EmptyIterable$(E), [])}),
|
| getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
|
| @@ -9113,27 +9189,18 @@ dart.setSignature(_internal.Sort, {
|
| names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuicksort']
|
| });
|
| _internal.Sort._INSERTION_SORT_THRESHOLD = 32;
|
| -const _name = Symbol('_name');
|
| -const _nativeSymbol = Symbol('_nativeSymbol');
|
| _internal.Symbol = class Symbol extends core.Object {
|
| new(name) {
|
| this[_name] = name;
|
| - this[_nativeSymbol] = null;
|
| - }
|
| - es6(name, nativeSymbol) {
|
| - this[_name] = name;
|
| - this[_nativeSymbol] = nativeSymbol;
|
| }
|
| unvalidated(name) {
|
| this[_name] = name;
|
| - this[_nativeSymbol] = null;
|
| }
|
| validated(name) {
|
| this[_name] = _internal.Symbol.validatePublicSymbol(name);
|
| - this[_nativeSymbol] = null;
|
| }
|
| ['=='](other) {
|
| - return _internal.Symbol.is(other) && this[_name] == other[_name] && dart.equals(this[_nativeSymbol], other[_nativeSymbol]);
|
| + return _internal.Symbol.is(other) && this[_name] == other[_name];
|
| }
|
| get hashCode() {
|
| let hash = this._hashCode;
|
| @@ -9149,9 +9216,6 @@ _internal.Symbol = class Symbol extends core.Object {
|
| static getName(symbol) {
|
| return symbol[_name];
|
| }
|
| - static getNativeSymbol(symbol) {
|
| - return symbol[_nativeSymbol];
|
| - }
|
| static validatePublicSymbol(name) {
|
| if (dart.test(name[dartx.isEmpty]) || dart.test(_internal.Symbol.publicSymbolPattern.hasMatch(name))) return name;
|
| if (dart.test(name[dartx.startsWith]('_'))) {
|
| @@ -9163,22 +9227,16 @@ _internal.Symbol = class Symbol extends core.Object {
|
| return dart.test(name[dartx.isEmpty]) || dart.test(_internal.Symbol.symbolPattern.hasMatch(name));
|
| }
|
| };
|
| -dart.defineNamedConstructor(_internal.Symbol, 'es6');
|
| dart.defineNamedConstructor(_internal.Symbol, 'unvalidated');
|
| dart.defineNamedConstructor(_internal.Symbol, 'validated');
|
| _internal.Symbol[dart.implements] = () => [core.Symbol];
|
| dart.setSignature(_internal.Symbol, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(_internal.Symbol, [core.String]),
|
| - es6: dart.definiteFunctionType(_internal.Symbol, [core.String, dart.dynamic]),
|
| unvalidated: dart.definiteFunctionType(_internal.Symbol, [core.String]),
|
| validated: dart.definiteFunctionType(_internal.Symbol, [core.String])
|
| }),
|
| - fields: () => ({
|
| - [_name]: core.String,
|
| - [_nativeSymbol]: dart.dynamic
|
| - }),
|
| - methods: () => ({'==': dart.definiteFunctionType(core.bool, [core.Object])}),
|
| + fields: () => ({[_name]: core.String}),
|
| sfields: () => ({
|
| reservedWordRE: core.String,
|
| publicIdentifierRE: core.String,
|
| @@ -9189,11 +9247,10 @@ dart.setSignature(_internal.Symbol, {
|
| }),
|
| statics: () => ({
|
| getName: dart.definiteFunctionType(core.String, [_internal.Symbol]),
|
| - getNativeSymbol: dart.definiteFunctionType(dart.dynamic, [_internal.Symbol]),
|
| validatePublicSymbol: dart.definiteFunctionType(core.String, [core.String]),
|
| isValidSymbol: dart.definiteFunctionType(core.bool, [core.String])
|
| }),
|
| - names: ['getName', 'getNativeSymbol', 'validatePublicSymbol', 'isValidSymbol']
|
| + names: ['getName', 'validatePublicSymbol', 'isValidSymbol']
|
| });
|
| _internal.Symbol.reservedWordRE = '(?:assert|break|c(?:a(?:se|tch)|lass|on(?:st|tinue))|d(?:efault|o)|' + 'e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?:ew|ull)|' + 'ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|' + 'v(?:ar|oid)|w(?:hile|ith))';
|
| _internal.Symbol.operatorRE = '(?:[\\-+*/%&|^]|\\[\\]=?|==|~/?|<[<=]?|>[>=]?|unary-)';
|
| @@ -9433,10 +9490,6 @@ _isolate_helper._IsolateContext = class _IsolateContext extends core.Object {
|
| responsePort.send(null);
|
| }
|
| dart.fn(respond, VoidTovoid());
|
| - if (pingType == isolate.Isolate.AS_EVENT) {
|
| - _isolate_helper._globalState.topEventLoop.enqueue(this, respond, "ping");
|
| - return;
|
| - }
|
| dart.assert(pingType == isolate.Isolate.BEFORE_NEXT_EVENT);
|
| if (this[_scheduledControlEvents] == null) {
|
| this[_scheduledControlEvents] = collection.Queue.new();
|
| @@ -9449,10 +9502,6 @@ _isolate_helper._IsolateContext = class _IsolateContext extends core.Object {
|
| this.kill();
|
| return;
|
| }
|
| - if (priority == isolate.Isolate.AS_EVENT) {
|
| - _isolate_helper._globalState.topEventLoop.enqueue(this, dart.bind(this, 'kill'), "kill");
|
| - return;
|
| - }
|
| dart.assert(priority == isolate.Isolate.BEFORE_NEXT_EVENT);
|
| if (this[_scheduledControlEvents] == null) {
|
| this[_scheduledControlEvents] = collection.Queue.new();
|
| @@ -10394,7 +10443,8 @@ async.Stream$ = dart.generic(T => {
|
| }, VoidToNull()), onCancel: dart.fn(() => {
|
| if (timer != null) timer.cancel();
|
| timer = null;
|
| - }, VoidToNull())});
|
| + return async.Future._nullFuture;
|
| + }, VoidTo_Future())});
|
| return controller.stream;
|
| }
|
| static eventTransformed(source, mapSink) {
|
| @@ -10453,9 +10503,7 @@ async.Stream$ = dart.generic(T => {
|
| subscription.pause();
|
| }, VoidToNull()), onResume: dart.fn(() => {
|
| subscription.resume();
|
| - }, VoidToNull()), onCancel: dart.fn(() => {
|
| - subscription.cancel();
|
| - }, VoidToNull()), sync: true});
|
| + }, VoidToNull()), onCancel: dart.fn(() => subscription.cancel(), VoidToFuture()), sync: true});
|
| }
|
| return controller.stream;
|
| };
|
| @@ -10493,9 +10541,7 @@ async.Stream$ = dart.generic(T => {
|
| subscription.pause();
|
| }, VoidToNull()), onResume: dart.fn(() => {
|
| subscription.resume();
|
| - }, VoidToNull()), onCancel: dart.fn(() => {
|
| - subscription.cancel();
|
| - }, VoidToNull()), sync: true});
|
| + }, VoidToNull()), onCancel: dart.fn(() => subscription.cancel(), VoidToFuture()), sync: true});
|
| }
|
| return controller.stream;
|
| };
|
| @@ -12267,6 +12313,9 @@ core.FallThroughError = class FallThroughError extends core.Error {
|
| new() {
|
| super.new();
|
| }
|
| + toString() {
|
| + return super.toString();
|
| + }
|
| };
|
| dart.setSignature(core.FallThroughError, {
|
| constructors: () => ({new: dart.definiteFunctionType(core.FallThroughError, [])})
|
| @@ -12296,7 +12345,9 @@ dart.setSignature(_js_helper.RuntimeError, {
|
| fields: () => ({message: dart.dynamic})
|
| });
|
| core.AssertionError = class AssertionError extends core.Error {
|
| - new() {
|
| + new(message) {
|
| + if (message === void 0) message = null;
|
| + this.message = message;
|
| super.new();
|
| }
|
| toString() {
|
| @@ -12304,7 +12355,8 @@ core.AssertionError = class AssertionError extends core.Error {
|
| }
|
| };
|
| dart.setSignature(core.AssertionError, {
|
| - constructors: () => ({new: dart.definiteFunctionType(core.AssertionError, [])})
|
| + constructors: () => ({new: dart.definiteFunctionType(core.AssertionError, [], [core.Object])}),
|
| + fields: () => ({message: core.Object})
|
| });
|
| _js_helper.AssertionErrorWithMessage = class AssertionErrorWithMessage extends core.AssertionError {
|
| new(message) {
|
| @@ -12930,7 +12982,7 @@ _js_helper.LinkedHashMapKeyIterable$ = dart.generic(E => {
|
| let LinkedHashMapKeyIteratorOfE = () => (LinkedHashMapKeyIteratorOfE = dart.constFn(_js_helper.LinkedHashMapKeyIterator$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| let JsLinkedHashMapOfE$dynamic = () => (JsLinkedHashMapOfE$dynamic = dart.constFn(_js_helper.JsLinkedHashMap$(E, dart.dynamic)))();
|
| - class LinkedHashMapKeyIterable extends core.Iterable$(E) {
|
| + class LinkedHashMapKeyIterable extends _internal.EfficientLengthIterable$(E) {
|
| new(map) {
|
| this[_map] = map;
|
| super.new();
|
| @@ -12959,7 +13011,6 @@ _js_helper.LinkedHashMapKeyIterable$ = dart.generic(E => {
|
| }
|
| }
|
| }
|
| - LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(LinkedHashMapKeyIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(_js_helper.LinkedHashMapKeyIterable$(E), [JsLinkedHashMapOfE$dynamic()])}),
|
| fields: () => ({[_map]: JsLinkedHashMapOfE$dynamic()}),
|
| @@ -13639,7 +13690,11 @@ _js_helper.isJsArray = function(value) {
|
| };
|
| dart.lazyFn(_js_helper.isJsArray, () => dynamicTobool());
|
| _js_mirrors.getName = function(symbol) {
|
| - return _internal.Symbol.getName(_internal.Symbol.as(symbol));
|
| + if (_internal.PrivateSymbol.is(symbol)) {
|
| + return _internal.PrivateSymbol.getName(symbol);
|
| + } else {
|
| + return _internal.Symbol.getName(_internal.Symbol.as(symbol));
|
| + }
|
| };
|
| dart.lazyFn(_js_mirrors.getName, () => SymbolToString());
|
| _js_mirrors.getSymbol = function(name, library) {
|
| @@ -13718,7 +13773,7 @@ _js_mirrors._Lazy$ = dart.generic(T => {
|
| });
|
| _js_mirrors._Lazy = _Lazy();
|
| _js_mirrors._getESSymbol = function(symbol) {
|
| - return _internal.Symbol.getNativeSymbol(_internal.Symbol.as(symbol));
|
| + return _internal.PrivateSymbol.getNativeSymbol(symbol);
|
| };
|
| dart.lazyFn(_js_mirrors._getESSymbol, () => SymbolTodynamic());
|
| _js_mirrors._getMember = function(symbol) {
|
| @@ -13762,7 +13817,7 @@ _js_mirrors._getNameForESSymbol = function(member) {
|
| dart.lazyFn(_js_mirrors._getNameForESSymbol, () => dynamicToString());
|
| _js_mirrors._getSymbolForESSymbol = function(member) {
|
| let name = _js_mirrors._getNameForESSymbol(member);
|
| - return new _internal.Symbol.es6(name, member);
|
| + return new _internal.PrivateSymbol(name, member);
|
| };
|
| dart.lazyFn(_js_mirrors._getSymbolForESSymbol, () => dynamicToSymbol());
|
| _js_mirrors._getSymbolForMember = function(member) {
|
| @@ -13770,7 +13825,7 @@ _js_mirrors._getSymbolForMember = function(member) {
|
| return core.Symbol.new(member);
|
| } else {
|
| let name = _js_mirrors._getNameForESSymbol(member);
|
| - return new _internal.Symbol.es6(name, member);
|
| + return new _internal.PrivateSymbol(name, member);
|
| }
|
| };
|
| dart.lazyFn(_js_mirrors._getSymbolForMember, () => dynamicToSymbol());
|
| @@ -14099,7 +14154,7 @@ _js_mirrors.JsClassMirror = class JsClassMirror extends _js_mirrors.JsMirror {
|
| let setters = _js_mirrors._getSetters(unwrapped);
|
| setters[dartx.forEach](dart.fn((symbol, ft) => {
|
| let name = dart.notNull(_js_mirrors.getName(symbol)) + '=';
|
| - symbol = new _internal.Symbol.es6(name, _js_mirrors._getESSymbol(symbol));
|
| + symbol = new _internal.PrivateSymbol(name, _js_mirrors._getESSymbol(symbol));
|
| this[_declarations][dartx._set](symbol, new _js_mirrors.JsMethodMirror._instanceMethod(this, symbol, ft));
|
| }, SymbolAnddynamicToNull()));
|
| let staticFields = _js_mirrors._getStaticFields(unwrapped);
|
| @@ -17725,9 +17780,9 @@ dart.lazyFn(async._invokeErrorHandler, () => FunctionAndObjectAndStackTraceTodyn
|
| async._registerErrorHandler = function(R) {
|
| return (errorHandler, zone) => {
|
| if (async.ZoneBinaryCallback.is(errorHandler)) {
|
| - return zone.registerBinaryCallback(dart.dynamic, dart.dynamic, core.StackTrace)(ZoneBinaryCallbackOfdynamic$dynamic$StackTrace().as(errorHandler));
|
| + return zone.registerBinaryCallback(R, dart.dynamic, core.StackTrace)(async.ZoneBinaryCallback$(R, dart.dynamic, core.StackTrace).as(errorHandler));
|
| } else {
|
| - return zone.registerUnaryCallback(dart.dynamic, dart.dynamic)(async.ZoneUnaryCallback.as(errorHandler));
|
| + return zone.registerUnaryCallback(R, dart.dynamic)(async.ZoneUnaryCallback$(R, dart.dynamic).as(errorHandler));
|
| }
|
| };
|
| };
|
| @@ -17888,7 +17943,6 @@ const _isClosed = Symbol('_isClosed');
|
| const _waitsForCancel = Symbol('_waitsForCancel');
|
| const _canFire = Symbol('_canFire');
|
| const _cancelOnError = Symbol('_cancelOnError');
|
| -const _incrementPauseCount = Symbol('_incrementPauseCount');
|
| const _sendData = Symbol('_sendData');
|
| const _addPending = Symbol('_addPending');
|
| const _sendError = Symbol('_sendError');
|
| @@ -17933,7 +17987,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| }
|
| onError(handleError) {
|
| if (handleError == null) handleError = async._nullErrorHandler;
|
| - this[_onError] = async._registerErrorHandler(T)(handleError, this[_zone]);
|
| + this[_onError] = async._registerErrorHandler(dart.dynamic)(handleError, this[_zone]);
|
| }
|
| onDone(handleDone) {
|
| if (handleDone == null) handleDone = async._nullDoneHandler;
|
| @@ -17966,9 +18020,11 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| }
|
| cancel() {
|
| this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL) >>> 0;
|
| - if (dart.test(this[_isCanceled])) return this[_cancelFuture];
|
| - this[_cancel]();
|
| - return this[_cancelFuture];
|
| + if (!dart.test(this[_isCanceled])) {
|
| + this[_cancel]();
|
| + }
|
| + let l = this[_cancelFuture];
|
| + return l != null ? l : async.Future._nullFuture;
|
| }
|
| asFuture(E) {
|
| return futureValue => {
|
| @@ -17978,8 +18034,14 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| result[_complete](futureValue);
|
| }, VoidToNull());
|
| this[_onError] = dart.fn((error, stackTrace) => {
|
| - this.cancel();
|
| - result[_completeError](error, core.StackTrace._check(stackTrace));
|
| + let cancelFuture = this.cancel();
|
| + if (!core.identical(cancelFuture, async.Future._nullFuture)) {
|
| + cancelFuture.whenComplete(dart.fn(() => {
|
| + result[_completeError](error, core.StackTrace._check(stackTrace));
|
| + }, VoidToNull()));
|
| + } else {
|
| + result[_completeError](error, core.StackTrace._check(stackTrace));
|
| + }
|
| }, dynamicAnddynamicToNull());
|
| return result;
|
| };
|
| @@ -18025,9 +18087,6 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| if (!dart.test(this[_inCallback])) this[_pending] = null;
|
| this[_cancelFuture] = this[_onCancel]();
|
| }
|
| - [_incrementPauseCount]() {
|
| - this[_state] = (dart.notNull(this[_state]) + async._BufferingStreamSubscription._STATE_PAUSE_COUNT | async._BufferingStreamSubscription._STATE_INPUT_PAUSED) >>> 0;
|
| - }
|
| [_decrementPauseCount]() {
|
| dart.assert(this[_isPaused]);
|
| this[_state] = dart.notNull(this[_state]) - async._BufferingStreamSubscription._STATE_PAUSE_COUNT;
|
| @@ -18114,7 +18173,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| if (dart.test(this[_cancelOnError])) {
|
| this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL) >>> 0;
|
| this[_cancel]();
|
| - if (async.Future.is(this[_cancelFuture])) {
|
| + if (async.Future.is(this[_cancelFuture]) && !core.identical(this[_cancelFuture], async.Future._nullFuture)) {
|
| this[_cancelFuture].whenComplete(sendError);
|
| } else {
|
| sendError();
|
| @@ -18137,7 +18196,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| dart.fn(sendDone, VoidTovoid());
|
| this[_cancel]();
|
| this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL) >>> 0;
|
| - if (async.Future.is(this[_cancelFuture])) {
|
| + if (async.Future.is(this[_cancelFuture]) && !core.identical(this[_cancelFuture], async.Future._nullFuture)) {
|
| this[_cancelFuture].whenComplete(sendDone);
|
| } else {
|
| sendDone();
|
| @@ -18147,7 +18206,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| dart.assert(!dart.test(this[_inCallback]));
|
| let wasInputPaused = this[_isInputPaused];
|
| this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
|
| - callback();
|
| + dart.dcall(callback);
|
| this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
|
| this[_checkState](wasInputPaused);
|
| }
|
| @@ -18216,7 +18275,6 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| cancel: dart.definiteFunctionType(async.Future, []),
|
| asFuture: dart.definiteFunctionType(E => [async.Future$(E), [], [E]]),
|
| [_cancel]: dart.definiteFunctionType(dart.void, []),
|
| - [_incrementPauseCount]: dart.definiteFunctionType(dart.void, []),
|
| [_decrementPauseCount]: dart.definiteFunctionType(dart.void, []),
|
| [_add]: dart.definiteFunctionType(dart.void, [T]),
|
| [_addError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
|
| @@ -18228,7 +18286,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| [_sendData]: dart.definiteFunctionType(dart.void, [T]),
|
| [_sendError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
|
| [_sendDone]: dart.definiteFunctionType(dart.void, []),
|
| - [_guardCallback]: dart.definiteFunctionType(dart.void, [VoidTovoid()]),
|
| + [_guardCallback]: dart.definiteFunctionType(dart.void, [dart.dynamic]),
|
| [_checkState]: dart.definiteFunctionType(dart.void, [core.bool])
|
| }),
|
| sfields: () => ({
|
| @@ -18239,8 +18297,7 @@ async._BufferingStreamSubscription$ = dart.generic(T => {
|
| _STATE_WAIT_FOR_CANCEL: core.int,
|
| _STATE_IN_CALLBACK: core.int,
|
| _STATE_HAS_PENDING: core.int,
|
| - _STATE_PAUSE_COUNT: core.int,
|
| - _STATE_PAUSE_COUNT_SHIFT: core.int
|
| + _STATE_PAUSE_COUNT: core.int
|
| })
|
| });
|
| return _BufferingStreamSubscription;
|
| @@ -18254,7 +18311,6 @@ async._BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL = 16;
|
| async._BufferingStreamSubscription._STATE_IN_CALLBACK = 32;
|
| async._BufferingStreamSubscription._STATE_HAS_PENDING = 64;
|
| async._BufferingStreamSubscription._STATE_PAUSE_COUNT = 128;
|
| -async._BufferingStreamSubscription._STATE_PAUSE_COUNT_SHIFT = 7;
|
| async._ControllerSubscription$ = dart.generic(T => {
|
| let _StreamControllerLifecycleOfT = () => (_StreamControllerLifecycleOfT = dart.constFn(async._StreamControllerLifecycle$(T)))();
|
| let TTovoid = () => (TTovoid = dart.constFn(dart.functionType(dart.void, [T])))();
|
| @@ -19092,12 +19148,14 @@ async.Future$ = dart.flattenFutures(dart.generic(T => {
|
| return completer.future;
|
| };
|
| }
|
| - static forEach(input, f) {
|
| - let iterator = input[dartx.iterator];
|
| - return async.Future.doWhile(dart.fn(() => {
|
| - if (!dart.test(iterator.moveNext())) return false;
|
| - return async.Future.sync(dart.fn(() => dart.dcall(f, iterator.current), VoidTodynamic())).then(core.bool)(dart.fn(_ => true, dynamicTobool()));
|
| - }, VoidToObject()));
|
| + static forEach(T) {
|
| + return (input, f) => {
|
| + let iterator = input[dartx.iterator];
|
| + return async.Future.doWhile(dart.fn(() => {
|
| + if (!dart.test(iterator.moveNext())) return false;
|
| + return async.Future.sync(dart.fn(() => f(iterator.current), VoidTodynamic())).then(core.bool)(dart.fn(_ => true, dynamicTobool()));
|
| + }, VoidToObject()));
|
| + };
|
| }
|
| static doWhile(f) {
|
| let doneSignal = new async._Future();
|
| @@ -19127,7 +19185,7 @@ async.Future$ = dart.flattenFutures(dart.generic(T => {
|
| statics: () => ({
|
| wait: dart.definiteFunctionType(T => [async.Future$(core.List$(T)), [core.Iterable$(async.Future$(T))], {eagerError: core.bool, cleanUp: dart.functionType(dart.void, [T])}]),
|
| any: dart.definiteFunctionType(T => [async.Future$(T), [core.Iterable$(async.Future$(T))]]),
|
| - forEach: dart.definiteFunctionType(async.Future, [core.Iterable, dynamicTodynamic()]),
|
| + forEach: dart.definiteFunctionType(T => [async.Future, [core.Iterable$(T), dart.functionType(dart.dynamic, [T])]]),
|
| doWhile: dart.definiteFunctionType(async.Future, [VoidTodynamic()])
|
| }),
|
| names: ['wait', 'any', 'forEach', 'doWhile']
|
| @@ -20241,11 +20299,11 @@ async.StreamTransformer$ = dart.generic((S, T) => {
|
| });
|
| async.StreamTransformer = StreamTransformer();
|
| async.StreamIterator$ = dart.generic(T => {
|
| - let _StreamIteratorImplOfT = () => (_StreamIteratorImplOfT = dart.constFn(async._StreamIteratorImpl$(T)))();
|
| + let _StreamIteratorOfT = () => (_StreamIteratorOfT = dart.constFn(async._StreamIterator$(T)))();
|
| let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
|
| class StreamIterator extends core.Object {
|
| static new(stream) {
|
| - return new (_StreamIteratorImplOfT())(stream);
|
| + return new (_StreamIteratorOfT())(stream);
|
| }
|
| }
|
| dart.addTypeTests(StreamIterator);
|
| @@ -21148,36 +21206,6 @@ async._StreamImplEvents$ = dart.generic(T => {
|
| return _StreamImplEvents;
|
| });
|
| async._StreamImplEvents = _StreamImplEvents();
|
| -const _unlink = Symbol('_unlink');
|
| -const _insertBefore = Symbol('_insertBefore');
|
| -async._BroadcastLinkedList = class _BroadcastLinkedList extends core.Object {
|
| - new() {
|
| - this[_next] = null;
|
| - this[_previous] = null;
|
| - }
|
| - [_unlink]() {
|
| - this[_previous][_next] = this[_next];
|
| - this[_next][_previous] = this[_previous];
|
| - this[_next] = this[_previous] = this;
|
| - }
|
| - [_insertBefore](newNext) {
|
| - let newPrevious = newNext[_previous];
|
| - newPrevious[_next] = this;
|
| - newNext[_previous] = this[_previous];
|
| - this[_previous][_next] = newNext;
|
| - this[_previous] = newPrevious;
|
| - }
|
| -};
|
| -dart.setSignature(async._BroadcastLinkedList, {
|
| - fields: () => ({
|
| - [_next]: async._BroadcastLinkedList,
|
| - [_previous]: async._BroadcastLinkedList
|
| - }),
|
| - methods: () => ({
|
| - [_unlink]: dart.definiteFunctionType(dart.void, []),
|
| - [_insertBefore]: dart.definiteFunctionType(dart.void, [async._BroadcastLinkedList])
|
| - })
|
| -});
|
| async._BroadcastCallback$ = dart.generic(T => {
|
| const _BroadcastCallback = dart.typedef('_BroadcastCallback', () => dart.functionType(dart.void, [async.StreamSubscription$(T)]));
|
| return _BroadcastCallback;
|
| @@ -21229,7 +21257,7 @@ async._DoneStreamSubscription$ = dart.generic(T => {
|
| }
|
| }
|
| cancel() {
|
| - return null;
|
| + return async.Future._nullFuture;
|
| }
|
| asFuture(E) {
|
| return futureValue => {
|
| @@ -21412,7 +21440,7 @@ async._BroadcastSubscriptionWrapper$ = dart.generic(T => {
|
| }
|
| cancel() {
|
| this[_stream][_cancelSubscription]();
|
| - return null;
|
| + return async.Future._nullFuture;
|
| }
|
| get isPaused() {
|
| return this[_stream][_isSubscriptionPaused];
|
| @@ -21443,156 +21471,110 @@ async._BroadcastSubscriptionWrapper$ = dart.generic(T => {
|
| return _BroadcastSubscriptionWrapper;
|
| });
|
| async._BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper();
|
| -const _current = Symbol('_current');
|
| -const _futureOrPrefetch = Symbol('_futureOrPrefetch');
|
| -const _clear = Symbol('_clear');
|
| -async._StreamIteratorImpl$ = dart.generic(T => {
|
| - let StreamIteratorOfT = () => (StreamIteratorOfT = dart.constFn(async.StreamIterator$(T)))();
|
| +const _stateData = Symbol('_stateData');
|
| +const _initializeOrDone = Symbol('_initializeOrDone');
|
| +async._StreamIterator$ = dart.generic(T => {
|
| let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
|
| - class _StreamIteratorImpl extends core.Object {
|
| + let StreamSubscriptionOfT = () => (StreamSubscriptionOfT = dart.constFn(async.StreamSubscription$(T)))();
|
| + let StreamIteratorOfT = () => (StreamIteratorOfT = dart.constFn(async.StreamIterator$(T)))();
|
| + class _StreamIterator extends core.Object {
|
| new(stream) {
|
| + this[_stateData] = stream;
|
| this[_subscription] = null;
|
| - this[_current] = null;
|
| - this[_futureOrPrefetch] = null;
|
| - this[_state] = async._StreamIteratorImpl._STATE_FOUND;
|
| - this[_subscription] = stream.listen(dart.bind(this, _onData), {onError: dart.bind(this, _onError), onDone: dart.bind(this, _onDone), cancelOnError: true});
|
| + this[_isPaused] = false;
|
| }
|
| get current() {
|
| - return this[_current];
|
| + if (this[_subscription] != null && dart.test(this[_isPaused])) {
|
| + return T.as(this[_stateData]);
|
| + }
|
| + return null;
|
| }
|
| moveNext() {
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_DONE) {
|
| - return new (_FutureOfbool()).immediate(false);
|
| - }
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_MOVING) {
|
| - dart.throw(new core.StateError("Already waiting for next."));
|
| - }
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_FOUND) {
|
| - this[_state] = async._StreamIteratorImpl._STATE_MOVING;
|
| - this[_current] = null;
|
| - let result = new (_FutureOfbool())();
|
| - this[_futureOrPrefetch] = result;
|
| - return result;
|
| - } else {
|
| - dart.assert(dart.notNull(this[_state]) >= async._StreamIteratorImpl._STATE_EXTRA_DATA);
|
| - switch (this[_state]) {
|
| - case async._StreamIteratorImpl._STATE_EXTRA_DATA:
|
| - {
|
| - this[_state] = async._StreamIteratorImpl._STATE_FOUND;
|
| - this[_current] = T.as(this[_futureOrPrefetch]);
|
| - this[_futureOrPrefetch] = null;
|
| - this[_subscription].resume();
|
| - return new (_FutureOfbool()).immediate(true);
|
| - }
|
| - case async._StreamIteratorImpl._STATE_EXTRA_ERROR:
|
| - {
|
| - let prefetch = async.AsyncError._check(this[_futureOrPrefetch]);
|
| - this[_clear]();
|
| - return new (_FutureOfbool()).immediateError(prefetch.error, prefetch.stackTrace);
|
| - }
|
| - case async._StreamIteratorImpl._STATE_EXTRA_DONE:
|
| - {
|
| - this[_clear]();
|
| - return new (_FutureOfbool()).immediate(false);
|
| - }
|
| + if (this[_subscription] != null) {
|
| + if (dart.test(this[_isPaused])) {
|
| + let future = new (_FutureOfbool())();
|
| + this[_stateData] = future;
|
| + this[_isPaused] = false;
|
| + this[_subscription].resume();
|
| + return future;
|
| }
|
| + dart.throw(new core.StateError("Already waiting for next."));
|
| }
|
| + return this[_initializeOrDone]();
|
| }
|
| - [_clear]() {
|
| - this[_subscription] = null;
|
| - this[_futureOrPrefetch] = null;
|
| - this[_current] = null;
|
| - this[_state] = async._StreamIteratorImpl._STATE_DONE;
|
| + [_initializeOrDone]() {
|
| + dart.assert(this[_subscription] == null);
|
| + let stateData = this[_stateData];
|
| + if (stateData != null) {
|
| + let stream = StreamOfT().as(stateData);
|
| + this[_subscription] = stream.listen(dart.bind(this, _onData), {onError: dart.bind(this, _onError), onDone: dart.bind(this, _onDone), cancelOnError: true});
|
| + let future = new (_FutureOfbool())();
|
| + this[_stateData] = future;
|
| + return future;
|
| + }
|
| + return new (_FutureOfbool()).immediate(false);
|
| }
|
| cancel() {
|
| - let subscription = this[_subscription];
|
| - if (subscription == null) return null;
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_MOVING) {
|
| - let hasNext = _FutureOfbool().as(this[_futureOrPrefetch]);
|
| - this[_clear]();
|
| - hasNext[_complete](false);
|
| - } else {
|
| - this[_clear]();
|
| + let subscription = StreamSubscriptionOfT()._check(this[_subscription]);
|
| + let stateData = this[_stateData];
|
| + this[_stateData] = null;
|
| + if (subscription != null) {
|
| + this[_subscription] = null;
|
| + if (!dart.test(this[_isPaused])) {
|
| + let future = _FutureOfbool().as(stateData);
|
| + future[_asyncComplete](false);
|
| + }
|
| + return subscription.cancel();
|
| }
|
| - return subscription.cancel();
|
| + return async.Future._nullFuture;
|
| }
|
| [_onData](data) {
|
| T._check(data);
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_MOVING) {
|
| - this[_current] = data;
|
| - let hasNext = _FutureOfbool().as(this[_futureOrPrefetch]);
|
| - this[_futureOrPrefetch] = null;
|
| - this[_state] = async._StreamIteratorImpl._STATE_FOUND;
|
| - hasNext[_complete](true);
|
| - return;
|
| - }
|
| - this[_subscription].pause();
|
| - dart.assert(this[_futureOrPrefetch] == null);
|
| - this[_futureOrPrefetch] = data;
|
| - this[_state] = async._StreamIteratorImpl._STATE_EXTRA_DATA;
|
| + dart.assert(this[_subscription] != null && !dart.test(this[_isPaused]));
|
| + let moveNextFuture = _FutureOfbool().as(this[_stateData]);
|
| + this[_stateData] = data;
|
| + this[_isPaused] = true;
|
| + moveNextFuture[_complete](true);
|
| + if (this[_subscription] != null && dart.test(this[_isPaused])) this[_subscription].pause();
|
| }
|
| [_onError](error, stackTrace) {
|
| if (stackTrace === void 0) stackTrace = null;
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_MOVING) {
|
| - let hasNext = _FutureOfbool().as(this[_futureOrPrefetch]);
|
| - this[_clear]();
|
| - hasNext[_completeError](error, stackTrace);
|
| - return;
|
| - }
|
| - this[_subscription].pause();
|
| - dart.assert(this[_futureOrPrefetch] == null);
|
| - this[_futureOrPrefetch] = new async.AsyncError(error, stackTrace);
|
| - this[_state] = async._StreamIteratorImpl._STATE_EXTRA_ERROR;
|
| + dart.assert(this[_subscription] != null && !dart.test(this[_isPaused]));
|
| + let moveNextFuture = _FutureOfbool().as(this[_stateData]);
|
| + this[_subscription] = null;
|
| + this[_stateData] = null;
|
| + moveNextFuture[_completeError](error, stackTrace);
|
| }
|
| [_onDone]() {
|
| - if (this[_state] == async._StreamIteratorImpl._STATE_MOVING) {
|
| - let hasNext = _FutureOfbool().as(this[_futureOrPrefetch]);
|
| - this[_clear]();
|
| - hasNext[_complete](false);
|
| - return;
|
| - }
|
| - this[_subscription].pause();
|
| - this[_futureOrPrefetch] = null;
|
| - this[_state] = async._StreamIteratorImpl._STATE_EXTRA_DONE;
|
| + dart.assert(this[_subscription] != null && !dart.test(this[_isPaused]));
|
| + let moveNextFuture = _FutureOfbool().as(this[_stateData]);
|
| + this[_subscription] = null;
|
| + this[_stateData] = null;
|
| + moveNextFuture[_complete](false);
|
| }
|
| }
|
| - dart.addTypeTests(_StreamIteratorImpl);
|
| - _StreamIteratorImpl[dart.implements] = () => [StreamIteratorOfT()];
|
| - dart.setSignature(_StreamIteratorImpl, {
|
| - constructors: () => ({new: dart.definiteFunctionType(async._StreamIteratorImpl$(T), [StreamOfT()])}),
|
| + dart.addTypeTests(_StreamIterator);
|
| + _StreamIterator[dart.implements] = () => [StreamIteratorOfT()];
|
| + dart.setSignature(_StreamIterator, {
|
| + constructors: () => ({new: dart.definiteFunctionType(async._StreamIterator$(T), [StreamOfT()])}),
|
| fields: () => ({
|
| [_subscription]: async.StreamSubscription,
|
| - [_current]: T,
|
| - [_futureOrPrefetch]: dart.dynamic,
|
| - [_state]: core.int
|
| + [_stateData]: core.Object,
|
| + [_isPaused]: core.bool
|
| }),
|
| getters: () => ({current: dart.definiteFunctionType(T, [])}),
|
| methods: () => ({
|
| moveNext: dart.definiteFunctionType(async.Future$(core.bool), []),
|
| - [_clear]: dart.definiteFunctionType(dart.void, []),
|
| + [_initializeOrDone]: dart.definiteFunctionType(async.Future$(core.bool), []),
|
| cancel: dart.definiteFunctionType(async.Future, []),
|
| [_onData]: dart.definiteFunctionType(dart.void, [T]),
|
| [_onError]: dart.definiteFunctionType(dart.void, [core.Object], [core.StackTrace]),
|
| [_onDone]: dart.definiteFunctionType(dart.void, [])
|
| - }),
|
| - sfields: () => ({
|
| - _STATE_FOUND: core.int,
|
| - _STATE_DONE: core.int,
|
| - _STATE_MOVING: core.int,
|
| - _STATE_EXTRA_DATA: core.int,
|
| - _STATE_EXTRA_ERROR: core.int,
|
| - _STATE_EXTRA_DONE: core.int
|
| })
|
| });
|
| - return _StreamIteratorImpl;
|
| -});
|
| -async._StreamIteratorImpl = _StreamIteratorImpl();
|
| -async._StreamIteratorImpl._STATE_FOUND = 0;
|
| -async._StreamIteratorImpl._STATE_DONE = 1;
|
| -async._StreamIteratorImpl._STATE_MOVING = 2;
|
| -async._StreamIteratorImpl._STATE_EXTRA_DATA = 3;
|
| -async._StreamIteratorImpl._STATE_EXTRA_ERROR = 4;
|
| -async._StreamIteratorImpl._STATE_EXTRA_DONE = 5;
|
| + return _StreamIterator;
|
| +});
|
| +async._StreamIterator = _StreamIterator();
|
| async._EmptyStream$ = dart.generic(T => {
|
| let _DoneStreamSubscriptionOfT = () => (_DoneStreamSubscriptionOfT = dart.constFn(async._DoneStreamSubscription$(T)))();
|
| let TTovoid = () => (TTovoid = dart.constFn(dart.functionType(dart.void, [T])))();
|
| @@ -21636,7 +21618,7 @@ async._runUserCode = function(userCode, onSuccess, onError) {
|
| dart.lazyFn(async._runUserCode, () => FnAndFnAndFnTodynamic());
|
| async._cancelAndError = function(subscription, future, error, stackTrace) {
|
| let cancelFuture = subscription.cancel();
|
| - if (async.Future.is(cancelFuture)) {
|
| + if (async.Future.is(cancelFuture) && !core.identical(cancelFuture, async.Future._nullFuture)) {
|
| cancelFuture.whenComplete(dart.fn(() => future[_completeError](error, stackTrace), VoidTovoid()));
|
| } else {
|
| future[_completeError](error, stackTrace);
|
| @@ -21661,7 +21643,7 @@ async._cancelAndErrorClosure = function(subscription, future) {
|
| dart.fn(async._cancelAndErrorClosure, StreamSubscriptionAnd_FutureTo_ErrorCallback());
|
| async._cancelAndValue = function(subscription, future, value) {
|
| let cancelFuture = subscription.cancel();
|
| - if (async.Future.is(cancelFuture)) {
|
| + if (async.Future.is(cancelFuture) && !core.identical(cancelFuture, async.Future._nullFuture)) {
|
| cancelFuture.whenComplete(dart.fn(() => future[_complete](value), VoidTovoid()));
|
| } else {
|
| future[_complete](value);
|
| @@ -21955,6 +21937,7 @@ async._HandleErrorStream$ = dart.generic(T => {
|
| async._HandleErrorStream = _HandleErrorStream();
|
| const _count = Symbol('_count');
|
| async._TakeStream$ = dart.generic(T => {
|
| + let _DoneStreamSubscriptionOfT = () => (_DoneStreamSubscriptionOfT = dart.constFn(async._DoneStreamSubscription$(T)))();
|
| let _StateStreamSubscriptionOfT = () => (_StateStreamSubscriptionOfT = dart.constFn(async._StateStreamSubscription$(T)))();
|
| let _EventSinkOfT = () => (_EventSinkOfT = dart.constFn(async._EventSink$(T)))();
|
| let TTovoid = () => (TTovoid = dart.constFn(dart.functionType(dart.void, [T])))();
|
| @@ -21966,6 +21949,10 @@ async._TakeStream$ = dart.generic(T => {
|
| if (!(typeof count == 'number')) dart.throw(new core.ArgumentError(count));
|
| }
|
| [_createSubscription](onData, onError, onDone, cancelOnError) {
|
| + if (this[_count] == 0) {
|
| + this[_source].listen(null).cancel();
|
| + return new (_DoneStreamSubscriptionOfT())(onDone);
|
| + }
|
| return new (_StateStreamSubscriptionOfT())(this, onData, onError, onDone, cancelOnError, this[_count]);
|
| }
|
| [_handleData](inputEvent, sink) {
|
| @@ -22285,7 +22272,7 @@ async._SinkTransformerStreamSubscription$ = dart.generic((S, T) => {
|
| if (dart.test(this[_isSubscribed])) {
|
| let subscription = this[_subscription];
|
| this[_subscription] = null;
|
| - subscription.cancel();
|
| + return subscription.cancel();
|
| }
|
| return null;
|
| }
|
| @@ -23625,8 +23612,8 @@ async.runZoned = function(R) {
|
| if (onError != null) {
|
| errorHandler = dart.fn((self, parent, zone, error, stackTrace) => {
|
| try {
|
| - if (ZoneBinaryCallbackOfdynamic$dynamic$StackTrace().is(onError)) {
|
| - return R.as(self.parent.runBinary(dart.dynamic, dart.dynamic, core.StackTrace)(onError, error, stackTrace));
|
| + if (async.ZoneBinaryCallback$(R, dart.dynamic, core.StackTrace).is(onError)) {
|
| + return self.parent.runBinary(R, dart.dynamic, core.StackTrace)(onError, error, stackTrace);
|
| }
|
| return self.parent.runUnary(dart.dynamic, dart.dynamic)(dynamicTodynamic()._check(onError), error);
|
| } catch (e) {
|
| @@ -24090,7 +24077,7 @@ collection._HashMapKeyIterable$ = dart.generic(E => {
|
| let _HashMapKeyIteratorOfE = () => (_HashMapKeyIteratorOfE = dart.constFn(collection._HashMapKeyIterator$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| let _HashMapOfE$dynamic = () => (_HashMapOfE$dynamic = dart.constFn(collection._HashMap$(E, dart.dynamic)))();
|
| - class _HashMapKeyIterable extends core.Iterable$(E) {
|
| + class _HashMapKeyIterable extends _internal.EfficientLengthIterable$(E) {
|
| new(map) {
|
| this[_map] = map;
|
| super.new();
|
| @@ -24117,7 +24104,6 @@ collection._HashMapKeyIterable$ = dart.generic(E => {
|
| }
|
| }
|
| }
|
| - _HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(_HashMapKeyIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._HashMapKeyIterable$(E), [_HashMapOfE$dynamic()])}),
|
| fields: () => ({[_map]: _HashMapOfE$dynamic()}),
|
| @@ -24343,7 +24329,7 @@ const _isKeys = Symbol('_isKeys');
|
| collection._Es6MapIterable$ = dart.generic(E => {
|
| let _Es6MapIteratorOfE = () => (_Es6MapIteratorOfE = dart.constFn(collection._Es6MapIterator$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| - class _Es6MapIterable extends core.Iterable$(E) {
|
| + class _Es6MapIterable extends _internal.EfficientLengthIterable$(E) {
|
| new(map, isKeys) {
|
| this[_map] = map;
|
| this[_isKeys] = isKeys;
|
| @@ -24381,7 +24367,6 @@ collection._Es6MapIterable$ = dart.generic(E => {
|
| }
|
| }
|
| }
|
| - _Es6MapIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(_Es6MapIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._Es6MapIterable$(E), [dart.dynamic, core.bool])}),
|
| fields: () => ({
|
| @@ -26047,7 +26032,7 @@ collection.IterableMixin$ = dart.generic(E => {
|
| return SetOfE().from(this);
|
| }
|
| get length() {
|
| - dart.assert(!_internal.EfficientLength.is(this));
|
| + dart.assert(!_internal.EfficientLengthIterable.is(this));
|
| let count = 0;
|
| let it = this[dartx.iterator];
|
| while (dart.test(it.moveNext())) {
|
| @@ -26725,11 +26710,11 @@ collection.LinkedListEntry$ = dart.generic(E => {
|
| this[_list][_unlink](E._check(this));
|
| }
|
| get next() {
|
| - if (core.identical(this, this[_next])) return null;
|
| + if (this[_list] == null || core.identical(this[_list].first, this[_next])) return null;
|
| return this[_next];
|
| }
|
| get previous() {
|
| - if (core.identical(this, this[_previous])) return null;
|
| + if (this[_list] == null || core.identical(this, this[_list].first)) return null;
|
| return this[_previous];
|
| }
|
| insertAfter(entry) {
|
| @@ -26907,7 +26892,7 @@ collection.UnmodifiableMapBase = UnmodifiableMapBase();
|
| collection._MapBaseValueIterable$ = dart.generic((K, V) => {
|
| let _MapBaseValueIteratorOfK$V = () => (_MapBaseValueIteratorOfK$V = dart.constFn(collection._MapBaseValueIterator$(K, V)))();
|
| let MapOfK$V = () => (MapOfK$V = dart.constFn(core.Map$(K, V)))();
|
| - class _MapBaseValueIterable extends core.Iterable$(V) {
|
| + class _MapBaseValueIterable extends _internal.EfficientLengthIterable$(V) {
|
| new(map) {
|
| this[_map] = map;
|
| super.new();
|
| @@ -26934,7 +26919,6 @@ collection._MapBaseValueIterable$ = dart.generic((K, V) => {
|
| return new (_MapBaseValueIteratorOfK$V())(this[_map]);
|
| }
|
| }
|
| - _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(_MapBaseValueIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._MapBaseValueIterable$(K, V), [MapOfK$V()])}),
|
| fields: () => ({[_map]: MapOfK$V()}),
|
| @@ -27218,7 +27202,7 @@ dart.setSignature(collection.Maps, {
|
| });
|
| collection.Queue$ = dart.generic(E => {
|
| let ListQueueOfE = () => (ListQueueOfE = dart.constFn(collection.ListQueue$(E)))();
|
| - let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| + let EfficientLengthIterableOfE = () => (EfficientLengthIterableOfE = dart.constFn(_internal.EfficientLengthIterable$(E)))();
|
| class Queue extends core.Object {
|
| static new() {
|
| return new (ListQueueOfE())();
|
| @@ -27226,12 +27210,9 @@ collection.Queue$ = dart.generic(E => {
|
| static from(elements) {
|
| return ListQueueOfE().from(elements);
|
| }
|
| - [Symbol.iterator]() {
|
| - return new dart.JsIterator(this.iterator);
|
| - }
|
| }
|
| dart.addTypeTests(Queue);
|
| - Queue[dart.implements] = () => [IterableOfE(), _internal.EfficientLength];
|
| + Queue[dart.implements] = () => [EfficientLengthIterableOfE()];
|
| dart.setSignature(Queue, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(collection.Queue$(E), []),
|
| @@ -27244,15 +27225,15 @@ collection.Queue = Queue();
|
| const _previousLink = Symbol('_previousLink');
|
| const _nextLink = Symbol('_nextLink');
|
| const _link = Symbol('_link');
|
| -collection._DoubleLink$ = dart.generic(E => {
|
| +collection._DoubleLink$ = dart.generic(Link => {
|
| class _DoubleLink extends core.Object {
|
| new() {
|
| this[_previousLink] = null;
|
| this[_nextLink] = null;
|
| }
|
| [_link](previous, next) {
|
| - E._check(previous);
|
| - E._check(next);
|
| + Link._check(previous);
|
| + Link._check(next);
|
| this[_nextLink] = next;
|
| this[_previousLink] = previous;
|
| if (previous != null) previous[_nextLink] = this;
|
| @@ -27268,11 +27249,11 @@ collection._DoubleLink$ = dart.generic(E => {
|
| dart.addTypeTests(_DoubleLink);
|
| dart.setSignature(_DoubleLink, {
|
| fields: () => ({
|
| - [_previousLink]: E,
|
| - [_nextLink]: E
|
| + [_previousLink]: Link,
|
| + [_nextLink]: Link
|
| }),
|
| methods: () => ({
|
| - [_link]: dart.definiteFunctionType(dart.void, [E, E]),
|
| + [_link]: dart.definiteFunctionType(dart.void, [Link, Link]),
|
| [_unlink]: dart.definiteFunctionType(dart.void, [])
|
| })
|
| });
|
| @@ -27280,34 +27261,19 @@ collection._DoubleLink$ = dart.generic(E => {
|
| });
|
| collection._DoubleLink = _DoubleLink();
|
| collection.DoubleLinkedQueueEntry$ = dart.generic(E => {
|
| - let _UserDoubleLinkedQueueEntryOfE = () => (_UserDoubleLinkedQueueEntryOfE = dart.constFn(collection._UserDoubleLinkedQueueEntry$(E)))();
|
| - class DoubleLinkedQueueEntry extends core.Object {
|
| - static new(element) {
|
| - return new (_UserDoubleLinkedQueueEntryOfE())(element);
|
| - }
|
| - }
|
| - dart.addTypeTests(DoubleLinkedQueueEntry);
|
| - dart.setSignature(DoubleLinkedQueueEntry, {
|
| - constructors: () => ({new: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), [E])})
|
| - });
|
| - return DoubleLinkedQueueEntry;
|
| -});
|
| -collection.DoubleLinkedQueueEntry = DoubleLinkedQueueEntry();
|
| -collection._UserDoubleLinkedQueueEntry$ = dart.generic(E => {
|
| - let _UserDoubleLinkedQueueEntryOfE = () => (_UserDoubleLinkedQueueEntryOfE = dart.constFn(collection._UserDoubleLinkedQueueEntry$(E)))();
|
| let DoubleLinkedQueueEntryOfE = () => (DoubleLinkedQueueEntryOfE = dart.constFn(collection.DoubleLinkedQueueEntry$(E)))();
|
| - class _UserDoubleLinkedQueueEntry extends collection._DoubleLink {
|
| + class DoubleLinkedQueueEntry extends collection._DoubleLink {
|
| new(element) {
|
| this.element = element;
|
| super.new();
|
| }
|
| append(e) {
|
| E._check(e);
|
| - new (_UserDoubleLinkedQueueEntryOfE())(e)[_link](this, this[_nextLink]);
|
| + new (DoubleLinkedQueueEntryOfE())(e)[_link](this, this[_nextLink]);
|
| }
|
| prepend(e) {
|
| E._check(e);
|
| - new (_UserDoubleLinkedQueueEntryOfE())(e)[_link](this[_previousLink], this);
|
| + new (DoubleLinkedQueueEntryOfE())(e)[_link](this[_previousLink], this);
|
| }
|
| remove() {
|
| this[_unlink]();
|
| @@ -27320,9 +27286,8 @@ collection._UserDoubleLinkedQueueEntry$ = dart.generic(E => {
|
| return this[_nextLink];
|
| }
|
| }
|
| - _UserDoubleLinkedQueueEntry[dart.implements] = () => [DoubleLinkedQueueEntryOfE()];
|
| - dart.setSignature(_UserDoubleLinkedQueueEntry, {
|
| - constructors: () => ({new: dart.definiteFunctionType(collection._UserDoubleLinkedQueueEntry$(E), [E])}),
|
| + dart.setSignature(DoubleLinkedQueueEntry, {
|
| + constructors: () => ({new: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), [E])}),
|
| fields: () => ({element: E}),
|
| methods: () => ({
|
| append: dart.definiteFunctionType(dart.void, [E]),
|
| @@ -27332,22 +27297,23 @@ collection._UserDoubleLinkedQueueEntry$ = dart.generic(E => {
|
| nextEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), [])
|
| })
|
| });
|
| - return _UserDoubleLinkedQueueEntry;
|
| -}, _UserDoubleLinkedQueueEntry => {
|
| - dart.setBaseClass(_UserDoubleLinkedQueueEntry, collection._DoubleLink$(_UserDoubleLinkedQueueEntry));
|
| + return DoubleLinkedQueueEntry;
|
| +}, DoubleLinkedQueueEntry => {
|
| + dart.setBaseClass(DoubleLinkedQueueEntry, collection._DoubleLink$(DoubleLinkedQueueEntry));
|
| });
|
| -collection._UserDoubleLinkedQueueEntry = _UserDoubleLinkedQueueEntry();
|
| +collection.DoubleLinkedQueueEntry = DoubleLinkedQueueEntry();
|
| const _queue = Symbol('_queue');
|
| const _append = Symbol('_append');
|
| const _prepend = Symbol('_prepend');
|
| const _asNonSentinelEntry = Symbol('_asNonSentinelEntry');
|
| collection._DoubleLinkedQueueEntry$ = dart.generic(E => {
|
| let _DoubleLinkedQueueElementOfE = () => (_DoubleLinkedQueueElementOfE = dart.constFn(collection._DoubleLinkedQueueElement$(E)))();
|
| + let _DoubleLinkedQueueEntryOfE = () => (_DoubleLinkedQueueEntryOfE = dart.constFn(collection._DoubleLinkedQueueEntry$(E)))();
|
| let DoubleLinkedQueueOfE = () => (DoubleLinkedQueueOfE = dart.constFn(collection.DoubleLinkedQueue$(E)))();
|
| - class _DoubleLinkedQueueEntry extends collection._DoubleLink {
|
| - new(queue) {
|
| + class _DoubleLinkedQueueEntry extends collection.DoubleLinkedQueueEntry$(E) {
|
| + new(element, queue) {
|
| this[_queue] = queue;
|
| - super.new();
|
| + super.new(element);
|
| }
|
| [_append](e) {
|
| E._check(e);
|
| @@ -27357,36 +27323,36 @@ collection._DoubleLinkedQueueEntry$ = dart.generic(E => {
|
| E._check(e);
|
| new (_DoubleLinkedQueueElementOfE())(e, this[_queue])[_link](this[_previousLink], this);
|
| }
|
| + get [_element]() {
|
| + return this.element;
|
| + }
|
| nextEntry() {
|
| - return this[_nextLink][_asNonSentinelEntry]();
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_nextLink]);
|
| + return entry[_asNonSentinelEntry]();
|
| }
|
| previousEntry() {
|
| - return this[_previousLink][_asNonSentinelEntry]();
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_previousLink]);
|
| + return entry[_asNonSentinelEntry]();
|
| }
|
| }
|
| dart.setSignature(_DoubleLinkedQueueEntry, {
|
| - constructors: () => ({new: dart.definiteFunctionType(collection._DoubleLinkedQueueEntry$(E), [DoubleLinkedQueueOfE()])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(collection._DoubleLinkedQueueEntry$(E), [E, DoubleLinkedQueueOfE()])}),
|
| fields: () => ({[_queue]: DoubleLinkedQueueOfE()}),
|
| + getters: () => ({[_element]: dart.definiteFunctionType(E, [])}),
|
| methods: () => ({
|
| [_append]: dart.definiteFunctionType(dart.void, [E]),
|
| - [_prepend]: dart.definiteFunctionType(dart.void, [E]),
|
| - nextEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), []),
|
| - previousEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), [])
|
| + [_prepend]: dart.definiteFunctionType(dart.void, [E])
|
| })
|
| });
|
| return _DoubleLinkedQueueEntry;
|
| -}, _DoubleLinkedQueueEntry => {
|
| - dart.setBaseClass(_DoubleLinkedQueueEntry, collection._DoubleLink$(_DoubleLinkedQueueEntry));
|
| });
|
| collection._DoubleLinkedQueueEntry = _DoubleLinkedQueueEntry();
|
| const _elementCount = Symbol('_elementCount');
|
| collection._DoubleLinkedQueueElement$ = dart.generic(E => {
|
| - let DoubleLinkedQueueEntryOfE = () => (DoubleLinkedQueueEntryOfE = dart.constFn(collection.DoubleLinkedQueueEntry$(E)))();
|
| let DoubleLinkedQueueOfE = () => (DoubleLinkedQueueOfE = dart.constFn(collection.DoubleLinkedQueue$(E)))();
|
| class _DoubleLinkedQueueElement extends collection._DoubleLinkedQueueEntry$(E) {
|
| new(element, queue) {
|
| - this.element = element;
|
| - super.new(queue);
|
| + super.new(element, queue);
|
| }
|
| append(e) {
|
| E._check(e);
|
| @@ -27420,15 +27386,10 @@ collection._DoubleLinkedQueueElement$ = dart.generic(E => {
|
| return this;
|
| }
|
| }
|
| - _DoubleLinkedQueueElement[dart.implements] = () => [DoubleLinkedQueueEntryOfE()];
|
| dart.setSignature(_DoubleLinkedQueueElement, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._DoubleLinkedQueueElement$(E), [E, DoubleLinkedQueueOfE()])}),
|
| - fields: () => ({element: E}),
|
| methods: () => ({
|
| - append: dart.definiteFunctionType(dart.void, [E]),
|
| - prepend: dart.definiteFunctionType(dart.void, [E]),
|
| [_remove]: dart.definiteFunctionType(E, []),
|
| - remove: dart.definiteFunctionType(E, []),
|
| [_asNonSentinelEntry]: dart.definiteFunctionType(collection._DoubleLinkedQueueElement$(E), [])
|
| })
|
| });
|
| @@ -27439,7 +27400,7 @@ collection._DoubleLinkedQueueSentinel$ = dart.generic(E => {
|
| let DoubleLinkedQueueOfE = () => (DoubleLinkedQueueOfE = dart.constFn(collection.DoubleLinkedQueue$(E)))();
|
| class _DoubleLinkedQueueSentinel extends collection._DoubleLinkedQueueEntry$(E) {
|
| new(queue) {
|
| - super.new(queue);
|
| + super.new(null, queue);
|
| this[_previousLink] = this;
|
| this[_nextLink] = this;
|
| }
|
| @@ -27449,13 +27410,12 @@ collection._DoubleLinkedQueueSentinel$ = dart.generic(E => {
|
| [_remove]() {
|
| dart.throw(_internal.IterableElementError.noElement());
|
| }
|
| - get element() {
|
| + get [_element]() {
|
| dart.throw(_internal.IterableElementError.noElement());
|
| }
|
| }
|
| dart.setSignature(_DoubleLinkedQueueSentinel, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._DoubleLinkedQueueSentinel$(E), [DoubleLinkedQueueOfE()])}),
|
| - getters: () => ({element: dart.definiteFunctionType(E, [])}),
|
| methods: () => ({
|
| [_asNonSentinelEntry]: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), []),
|
| [_remove]: dart.definiteFunctionType(E, [])
|
| @@ -27465,10 +27425,12 @@ collection._DoubleLinkedQueueSentinel$ = dart.generic(E => {
|
| });
|
| collection._DoubleLinkedQueueSentinel = _DoubleLinkedQueueSentinel();
|
| const _sentinel = Symbol('_sentinel');
|
| +const _filter = Symbol('_filter');
|
| collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| let _DoubleLinkedQueueSentinelOfE = () => (_DoubleLinkedQueueSentinelOfE = dart.constFn(collection._DoubleLinkedQueueSentinel$(E)))();
|
| let DoubleLinkedQueueOfE = () => (DoubleLinkedQueueOfE = dart.constFn(collection.DoubleLinkedQueue$(E)))();
|
| let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| + let _DoubleLinkedQueueEntryOfE = () => (_DoubleLinkedQueueEntryOfE = dart.constFn(collection._DoubleLinkedQueueEntry$(E)))();
|
| let _DoubleLinkedQueueElementOfE = () => (_DoubleLinkedQueueElementOfE = dart.constFn(collection._DoubleLinkedQueueElement$(E)))();
|
| let _DoubleLinkedQueueIteratorOfE = () => (_DoubleLinkedQueueIteratorOfE = dart.constFn(collection._DoubleLinkedQueueIterator$(E)))();
|
| let QueueOfE = () => (QueueOfE = dart.constFn(collection.Queue$(E)))();
|
| @@ -27516,34 +27478,42 @@ collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| }
|
| }
|
| removeLast() {
|
| - let lastEntry = this[_sentinel][_previousLink];
|
| + let lastEntry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_previousLink]);
|
| let result = lastEntry[_remove]();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| return result;
|
| }
|
| removeFirst() {
|
| - let firstEntry = this[_sentinel][_nextLink];
|
| + let firstEntry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| let result = firstEntry[_remove]();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| return result;
|
| }
|
| remove(o) {
|
| - let entry = this[_sentinel][_nextLink];
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| while (!core.identical(entry, this[_sentinel])) {
|
| - if (dart.equals(entry.element, o)) {
|
| + let equals = dart.equals(entry[_element], o);
|
| + if (!core.identical(this, entry[_queue])) {
|
| + dart.throw(new core.ConcurrentModificationError(this));
|
| + }
|
| + if (equals) {
|
| entry[_remove]();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| return true;
|
| }
|
| - entry = entry[_nextLink];
|
| + entry = _DoubleLinkedQueueEntryOfE()._check(entry[_nextLink]);
|
| }
|
| return false;
|
| }
|
| [_filter](test, removeMatching) {
|
| - let entry = this[_sentinel][_nextLink];
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| while (!core.identical(entry, this[_sentinel])) {
|
| - let next = entry[_nextLink];
|
| - if (core.identical(removeMatching, test(entry.element))) {
|
| + let matches = test(entry[_element]);
|
| + if (!core.identical(this, entry[_queue])) {
|
| + dart.throw(new core.ConcurrentModificationError(this));
|
| + }
|
| + let next = _DoubleLinkedQueueEntryOfE()._check(entry[_nextLink]);
|
| + if (core.identical(removeMatching, matches)) {
|
| entry[_remove]();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| }
|
| @@ -27557,26 +27527,26 @@ collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| this[_filter](test, false);
|
| }
|
| get first() {
|
| - let firstEntry = this[_sentinel][_nextLink];
|
| - return firstEntry.element;
|
| + let firstEntry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| + return firstEntry[_element];
|
| }
|
| get last() {
|
| - let lastEntry = this[_sentinel][_previousLink];
|
| - return lastEntry.element;
|
| + let lastEntry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_previousLink]);
|
| + return lastEntry[_element];
|
| }
|
| get single() {
|
| if (core.identical(this[_sentinel][_nextLink], this[_sentinel][_previousLink])) {
|
| - let entry = this[_sentinel][_nextLink];
|
| - return entry.element;
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| + return entry[_element];
|
| }
|
| dart.throw(_internal.IterableElementError.tooMany());
|
| }
|
| - lastEntry() {
|
| - return this[_sentinel].previousEntry();
|
| - }
|
| firstEntry() {
|
| return this[_sentinel].nextEntry();
|
| }
|
| + lastEntry() {
|
| + return this[_sentinel].previousEntry();
|
| + }
|
| get isEmpty() {
|
| return core.identical(this[_sentinel][_nextLink], this[_sentinel]);
|
| }
|
| @@ -27585,13 +27555,18 @@ collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| this[_sentinel][_previousLink] = this[_sentinel];
|
| this[_elementCount] = 0;
|
| }
|
| - forEachEntry(f) {
|
| - let entry = this[_sentinel][_nextLink];
|
| + forEachEntry(action) {
|
| + let entry = _DoubleLinkedQueueEntryOfE()._check(this[_sentinel][_nextLink]);
|
| while (!core.identical(entry, this[_sentinel])) {
|
| - let nextEntry = entry[_nextLink];
|
| let element = _DoubleLinkedQueueElementOfE()._check(entry);
|
| - f(element);
|
| - entry = nextEntry;
|
| + let next = _DoubleLinkedQueueEntryOfE()._check(element[_nextLink]);
|
| + action(element);
|
| + if (core.identical(this, entry[_queue])) {
|
| + next = _DoubleLinkedQueueEntryOfE()._check(entry[_nextLink]);
|
| + } else if (!core.identical(this, next[_queue])) {
|
| + dart.throw(new core.ConcurrentModificationError(this));
|
| + }
|
| + entry = next;
|
| }
|
| }
|
| get iterator() {
|
| @@ -27623,8 +27598,8 @@ collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| [_filter]: dart.definiteFunctionType(dart.void, [ETobool(), core.bool]),
|
| removeWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
|
| retainWhere: dart.definiteFunctionType(dart.void, [ETobool()]),
|
| - lastEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), []),
|
| firstEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), []),
|
| + lastEntry: dart.definiteFunctionType(collection.DoubleLinkedQueueEntry$(E), []),
|
| clear: dart.definiteFunctionType(dart.void, []),
|
| forEachEntry: dart.definiteFunctionType(dart.void, [DoubleLinkedQueueEntryOfETovoid()])
|
| })
|
| @@ -27643,14 +27618,14 @@ collection.DoubleLinkedQueue$ = dart.generic(E => {
|
| collection.DoubleLinkedQueue = DoubleLinkedQueue();
|
| const _nextEntry = Symbol('_nextEntry');
|
| collection._DoubleLinkedQueueIterator$ = dart.generic(E => {
|
| + let _DoubleLinkedQueueEntryOfE = () => (_DoubleLinkedQueueEntryOfE = dart.constFn(collection._DoubleLinkedQueueEntry$(E)))();
|
| let _DoubleLinkedQueueElementOfE = () => (_DoubleLinkedQueueElementOfE = dart.constFn(collection._DoubleLinkedQueueElement$(E)))();
|
| let IteratorOfE = () => (IteratorOfE = dart.constFn(core.Iterator$(E)))();
|
| let _DoubleLinkedQueueSentinelOfE = () => (_DoubleLinkedQueueSentinelOfE = dart.constFn(collection._DoubleLinkedQueueSentinel$(E)))();
|
| - let _DoubleLinkedQueueEntryOfE = () => (_DoubleLinkedQueueEntryOfE = dart.constFn(collection._DoubleLinkedQueueEntry$(E)))();
|
| class _DoubleLinkedQueueIterator extends core.Object {
|
| new(sentinel) {
|
| this[_sentinel] = sentinel;
|
| - this[_nextEntry] = sentinel[_nextLink];
|
| + this[_nextEntry] = _DoubleLinkedQueueEntryOfE()._check(sentinel[_nextLink]);
|
| this[_current] = null;
|
| }
|
| moveNext() {
|
| @@ -27661,11 +27636,11 @@ collection._DoubleLinkedQueueIterator$ = dart.generic(E => {
|
| return false;
|
| }
|
| let elementEntry = _DoubleLinkedQueueElementOfE()._check(this[_nextEntry]);
|
| - if (elementEntry[_queue] == null) {
|
| + if (!core.identical(this[_sentinel][_queue], elementEntry[_queue])) {
|
| dart.throw(new core.ConcurrentModificationError(this[_sentinel][_queue]));
|
| }
|
| - this[_current] = elementEntry.element;
|
| - this[_nextEntry] = elementEntry[_nextLink];
|
| + this[_current] = elementEntry[_element];
|
| + this[_nextEntry] = _DoubleLinkedQueueEntryOfE()._check(elementEntry[_nextLink]);
|
| return true;
|
| }
|
| get current() {
|
| @@ -27702,7 +27677,7 @@ collection.ListQueue$ = dart.generic(E => {
|
| let QueueOfE = () => (QueueOfE = dart.constFn(collection.Queue$(E)))();
|
| let ETovoid = () => (ETovoid = dart.constFn(dart.functionType(dart.void, [E])))();
|
| let ETobool = () => (ETobool = dart.constFn(dart.functionType(core.bool, [E])))();
|
| - class ListQueue extends core.Iterable$(E) {
|
| + class ListQueue extends _internal.ListIterable$(E) {
|
| new(initialCapacity) {
|
| if (initialCapacity === void 0) initialCapacity = null;
|
| this[_head] = 0;
|
| @@ -27730,7 +27705,7 @@ collection.ListQueue$ = dart.generic(E => {
|
| return queue;
|
| } else {
|
| let capacity = collection.ListQueue._INITIAL_CAPACITY;
|
| - if (_internal.EfficientLength.is(elements)) {
|
| + if (_internal.EfficientLengthIterable.is(elements)) {
|
| capacity = elements[dartx.length];
|
| }
|
| let result = new (ListQueueOfE())(capacity);
|
| @@ -27983,7 +27958,6 @@ collection.ListQueue$ = dart.generic(E => {
|
| [_tail]: core.int,
|
| [_modificationCount]: core.int
|
| }),
|
| - getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
|
| methods: () => ({
|
| add: dart.definiteFunctionType(dart.void, [E]),
|
| addAll: dart.definiteFunctionType(dart.void, [IterableOfE()]),
|
| @@ -28660,7 +28634,7 @@ collection._SplayTreeKeyIterable$ = dart.generic(K => {
|
| let SplayTreeSetOfK = () => (SplayTreeSetOfK = dart.constFn(collection.SplayTreeSet$(K)))();
|
| let _SplayTreeNodeOfK = () => (_SplayTreeNodeOfK = dart.constFn(collection._SplayTreeNode$(K)))();
|
| let _SplayTreeOfK$_SplayTreeNodeOfK = () => (_SplayTreeOfK$_SplayTreeNodeOfK = dart.constFn(collection._SplayTree$(K, _SplayTreeNodeOfK())))();
|
| - class _SplayTreeKeyIterable extends core.Iterable$(K) {
|
| + class _SplayTreeKeyIterable extends _internal.EfficientLengthIterable$(K) {
|
| new(tree) {
|
| this[_tree] = tree;
|
| super.new();
|
| @@ -28681,7 +28655,6 @@ collection._SplayTreeKeyIterable$ = dart.generic(K => {
|
| return set;
|
| }
|
| }
|
| - _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(_SplayTreeKeyIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeKeyIterable$(K), [_SplayTreeOfK$_SplayTreeNodeOfK()])}),
|
| fields: () => ({[_tree]: _SplayTreeOfK$_SplayTreeNodeOfK()}),
|
| @@ -28694,7 +28667,7 @@ collection._SplayTreeKeyIterable = _SplayTreeKeyIterable();
|
| collection._SplayTreeValueIterable$ = dart.generic((K, V) => {
|
| let _SplayTreeValueIteratorOfK$V = () => (_SplayTreeValueIteratorOfK$V = dart.constFn(collection._SplayTreeValueIterator$(K, V)))();
|
| let SplayTreeMapOfK$V = () => (SplayTreeMapOfK$V = dart.constFn(collection.SplayTreeMap$(K, V)))();
|
| - class _SplayTreeValueIterable extends core.Iterable$(V) {
|
| + class _SplayTreeValueIterable extends _internal.EfficientLengthIterable$(V) {
|
| new(map) {
|
| this[_map] = map;
|
| super.new();
|
| @@ -28709,7 +28682,6 @@ collection._SplayTreeValueIterable$ = dart.generic((K, V) => {
|
| return new (_SplayTreeValueIteratorOfK$V())(this[_map]);
|
| }
|
| }
|
| - _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(_SplayTreeValueIterable, {
|
| constructors: () => ({new: dart.definiteFunctionType(collection._SplayTreeValueIterable$(K, V), [SplayTreeMapOfK$V()])}),
|
| fields: () => ({[_map]: SplayTreeMapOfK$V()}),
|
| @@ -29486,7 +29458,7 @@ dart.setSignature(core.String, {
|
| core.List$ = dart.generic(E => {
|
| let JSArrayOfE = () => (JSArrayOfE = dart.constFn(_interceptors.JSArray$(E)))();
|
| let ListOfE = () => (ListOfE = dart.constFn(core.List$(E)))();
|
| - let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| + let EfficientLengthIterableOfE = () => (EfficientLengthIterableOfE = dart.constFn(_internal.EfficientLengthIterable$(E)))();
|
| let intToE = () => (intToE = dart.constFn(dart.functionType(E, [core.int])))();
|
| class List extends core.Object {
|
| static new(length) {
|
| @@ -29538,12 +29510,9 @@ core.List$ = dart.generic(E => {
|
| let result = ListOfE().from(elements, {growable: false});
|
| return _internal.makeFixedListUnmodifiable(E)(result);
|
| }
|
| - [Symbol.iterator]() {
|
| - return new dart.JsIterator(this[dartx.iterator]);
|
| - }
|
| }
|
| dart.addTypeTests(List);
|
| - List[dart.implements] = () => [IterableOfE(), _internal.EfficientLength];
|
| + List[dart.implements] = () => [EfficientLengthIterableOfE()];
|
| dart.setSignature(List, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(core.List$(E), [], [core.int]),
|
| @@ -29695,6 +29664,7 @@ convert._UnicodeSubsetEncoder = class _UnicodeSubsetEncoder extends convert.Conv
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert._UnicodeSubsetEncoder);
|
| +convert._UnicodeSubsetEncoder[dart.implements] = () => [ChunkedConverterOfString$ListOfint$String$ListOfint()];
|
| dart.setSignature(convert._UnicodeSubsetEncoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert._UnicodeSubsetEncoder, [core.int])}),
|
| fields: () => ({[_subsetMask]: core.int}),
|
| @@ -29782,6 +29752,7 @@ convert._UnicodeSubsetDecoder = class _UnicodeSubsetDecoder extends convert.Conv
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert._UnicodeSubsetDecoder);
|
| +convert._UnicodeSubsetDecoder[dart.implements] = () => [ChunkedConverterOfListOfint$String$ListOfint$String()];
|
| dart.setSignature(convert._UnicodeSubsetDecoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert._UnicodeSubsetDecoder, [core.bool, core.int])}),
|
| fields: () => ({
|
| @@ -29967,6 +29938,7 @@ convert.Base64Encoder = class Base64Encoder extends convert.Converter$(core.List
|
| };
|
| dart.addSimpleTypeTests(convert.Base64Encoder);
|
| dart.defineNamedConstructor(convert.Base64Encoder, 'urlSafe');
|
| +convert.Base64Encoder[dart.implements] = () => [ChunkedConverterOfListOfint$String$ListOfint$String()];
|
| dart.setSignature(convert.Base64Encoder, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(convert.Base64Encoder, []),
|
| @@ -30284,6 +30256,7 @@ convert.Base64Decoder = class Base64Decoder extends convert.Converter$(core.Stri
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.Base64Decoder);
|
| +convert.Base64Decoder[dart.implements] = () => [ChunkedConverterOfString$ListOfint$String$ListOfint()];
|
| dart.setSignature(convert.Base64Decoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.Base64Decoder, [])}),
|
| methods: () => ({
|
| @@ -30835,6 +30808,7 @@ convert._InvertedCodec$ = dart.generic((T, S) => {
|
| });
|
| convert._InvertedCodec = _InvertedCodec();
|
| convert._FusedConverter$ = dart.generic((S, M, T) => {
|
| + let ChunkedConverterOfS$T$S$T = () => (ChunkedConverterOfS$T$S$T = dart.constFn(convert.ChunkedConverter$(S, T, S, T)))();
|
| let ConverterOfS$M = () => (ConverterOfS$M = dart.constFn(convert.Converter$(S, M)))();
|
| let ConverterOfM$T = () => (ConverterOfM$T = dart.constFn(convert.Converter$(M, T)))();
|
| let SinkOfT = () => (SinkOfT = dart.constFn(core.Sink$(T)))();
|
| @@ -30853,6 +30827,7 @@ convert._FusedConverter$ = dart.generic((S, M, T) => {
|
| return this[_first].startChunkedConversion(this[_second].startChunkedConversion(sink));
|
| }
|
| }
|
| + _FusedConverter[dart.implements] = () => [ChunkedConverterOfS$T$S$T()];
|
| dart.setSignature(_FusedConverter, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert._FusedConverter$(S, M, T), [ConverterOfS$M(), ConverterOfM$T()])}),
|
| fields: () => ({
|
| @@ -30998,6 +30973,7 @@ convert.HtmlEscape = class HtmlEscape extends convert.Converter$(core.String, co
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.HtmlEscape);
|
| +convert.HtmlEscape[dart.implements] = () => [ChunkedConverterOfString$String$String$String()];
|
| dart.setSignature(convert.HtmlEscape, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.HtmlEscape, [], [convert.HtmlEscapeMode])}),
|
| fields: () => ({mode: convert.HtmlEscapeMode}),
|
| @@ -31167,6 +31143,7 @@ convert.JsonEncoder = class JsonEncoder extends convert.Converter$(core.Object,
|
| };
|
| dart.addSimpleTypeTests(convert.JsonEncoder);
|
| dart.defineNamedConstructor(convert.JsonEncoder, 'withIndent');
|
| +convert.JsonEncoder[dart.implements] = () => [ChunkedConverterOfObject$String$Object$String()];
|
| dart.setSignature(convert.JsonEncoder, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(convert.JsonEncoder, [], [dynamicTodynamic()]),
|
| @@ -31243,6 +31220,7 @@ convert.JsonUtf8Encoder = class JsonUtf8Encoder extends convert.Converter$(core.
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.JsonUtf8Encoder);
|
| +convert.JsonUtf8Encoder[dart.implements] = () => [ChunkedConverterOfObject$ListOfint$Object$ListOfint()];
|
| dart.setSignature(convert.JsonUtf8Encoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.JsonUtf8Encoder, [], [core.String, dynamicTodynamic(), core.int])}),
|
| fields: () => ({
|
| @@ -31354,6 +31332,7 @@ convert.JsonDecoder = class JsonDecoder extends convert.Converter$(core.String,
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.JsonDecoder);
|
| +convert.JsonDecoder[dart.implements] = () => [ChunkedConverterOfString$Object$String$Object()];
|
| dart.setSignature(convert.JsonDecoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.JsonDecoder, [], [dynamicAnddynamicTodynamic()])}),
|
| fields: () => ({[_reviver]: convert._Reviver}),
|
| @@ -32540,6 +32519,7 @@ convert.Utf8Encoder = class Utf8Encoder extends convert.Converter$(core.String,
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.Utf8Encoder);
|
| +convert.Utf8Encoder[dart.implements] = () => [ChunkedConverterOfString$ListOfint$String$ListOfint()];
|
| dart.setSignature(convert.Utf8Encoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Encoder, [])}),
|
| methods: () => ({
|
| @@ -32759,7 +32739,7 @@ convert.Utf8Decoder = class Utf8Decoder extends convert.Converter$(core.List$(co
|
| let buffer = new core.StringBuffer();
|
| let decoder = new convert._Utf8Decoder(buffer, this[_allowMalformed]);
|
| decoder.convert(codeUnits, start, end);
|
| - decoder.close();
|
| + decoder.flush(codeUnits, end);
|
| return buffer.toString();
|
| }
|
| startChunkedConversion(sink) {
|
| @@ -32784,6 +32764,7 @@ convert.Utf8Decoder = class Utf8Decoder extends convert.Converter$(core.List$(co
|
| }
|
| };
|
| dart.addSimpleTypeTests(convert.Utf8Decoder);
|
| +convert.Utf8Decoder[dart.implements] = () => [ChunkedConverterOfListOfint$String$ListOfint$String()];
|
| dart.setSignature(convert.Utf8Decoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(convert.Utf8Decoder, [], {allowMalformed: core.bool})}),
|
| fields: () => ({[_allowMalformed]: core.bool}),
|
| @@ -32834,10 +32815,12 @@ convert._Utf8Decoder = class _Utf8Decoder extends core.Object {
|
| close() {
|
| this.flush();
|
| }
|
| - flush() {
|
| + flush(source, offset) {
|
| + if (source === void 0) source = null;
|
| + if (offset === void 0) offset = null;
|
| if (dart.test(this.hasPartialInput)) {
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException("Unfinished UTF-8 octet sequence"));
|
| + dart.throw(new core.FormatException("Unfinished UTF-8 octet sequence", source, offset));
|
| }
|
| this[_stringSink].writeCharCode(convert.UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| this[_value] = 0;
|
| @@ -32881,7 +32864,7 @@ convert._Utf8Decoder = class _Utf8Decoder extends core.Object {
|
| if ((dart.notNull(unit) & 192) != 128) {
|
| expectedUnits = 0;
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(dart.str`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(dart.str`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`, codeUnits, i));
|
| }
|
| this[_isFirstCharacter] = false;
|
| this[_stringSink].writeCharCode(convert.UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| @@ -32894,14 +32877,14 @@ convert._Utf8Decoder = class _Utf8Decoder extends core.Object {
|
| } while (dart.notNull(expectedUnits) > 0);
|
| if (dart.notNull(value) <= dart.notNull(convert._Utf8Decoder._LIMITS[dartx._get](dart.notNull(extraUnits) - 1))) {
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(dart.str`Overlong encoding of 0x${value[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(dart.str`Overlong encoding of 0x${value[dartx.toRadixString](16)}`, codeUnits, dart.notNull(i) - dart.notNull(extraUnits) - 1));
|
| }
|
| expectedUnits = extraUnits = 0;
|
| value = convert.UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| }
|
| if (dart.notNull(value) > convert._FOUR_BYTE_LIMIT) {
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException("Character outside valid Unicode range: " + dart.str`0x${value[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException("Character outside valid Unicode range: " + dart.str`0x${value[dartx.toRadixString](16)}`, codeUnits, dart.notNull(i) - dart.notNull(extraUnits) - 1));
|
| }
|
| value = convert.UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| }
|
| @@ -32925,7 +32908,7 @@ convert._Utf8Decoder = class _Utf8Decoder extends core.Object {
|
| })());
|
| if (dart.notNull(unit) < 0) {
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(dart.str`Negative UTF-8 code unit: -0x${(-dart.notNull(unit))[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(dart.str`Negative UTF-8 code unit: -0x${(-dart.notNull(unit))[dartx.toRadixString](16)}`, codeUnits, dart.notNull(i) - 1));
|
| }
|
| this[_stringSink].writeCharCode(convert.UNICODE_REPLACEMENT_CHARACTER_RUNE);
|
| } else {
|
| @@ -32946,7 +32929,7 @@ convert._Utf8Decoder = class _Utf8Decoder extends core.Object {
|
| continue loop;
|
| }
|
| if (!dart.test(this[_allowMalformed])) {
|
| - dart.throw(new core.FormatException(dart.str`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`));
|
| + dart.throw(new core.FormatException(dart.str`Bad UTF-8 encoding 0x${unit[dartx.toRadixString](16)}`, codeUnits, dart.notNull(i) - 1));
|
| }
|
| value = convert.UNICODE_REPLACEMENT_CHARACTER_RUNE;
|
| expectedUnits = extraUnits = 0;
|
| @@ -32976,7 +32959,7 @@ dart.setSignature(convert._Utf8Decoder, {
|
| getters: () => ({hasPartialInput: dart.definiteFunctionType(core.bool, [])}),
|
| methods: () => ({
|
| close: dart.definiteFunctionType(dart.void, []),
|
| - flush: dart.definiteFunctionType(dart.void, []),
|
| + flush: dart.definiteFunctionType(dart.void, [], [ListOfint(), core.int]),
|
| convert: dart.definiteFunctionType(dart.void, [ListOfint(), core.int, core.int])
|
| }),
|
| sfields: () => ({_LIMITS: ListOfint()})
|
| @@ -33021,6 +33004,7 @@ dart.setSignature(core._Proxy, {
|
| });
|
| core.proxy = dart.const(new core._Proxy());
|
| dart.defineExtensionNames([
|
| + 'hashCode',
|
| 'toString'
|
| ]);
|
| core.bool = class bool extends core.Object {
|
| @@ -33028,6 +33012,9 @@ core.bool = class bool extends core.Object {
|
| let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : false;
|
| dart.throw(new core.UnsupportedError('bool.fromEnvironment can only be used as a const constructor'));
|
| }
|
| + get [dartx.hashCode]() {
|
| + return super.hashCode;
|
| + }
|
| [dartx.toString]() {
|
| return this ? "true" : "false";
|
| }
|
| @@ -34248,113 +34235,43 @@ core._Generator$ = dart.generic(E => {
|
| return _Generator;
|
| });
|
| core._Generator = _Generator();
|
| -const _end = Symbol('_end');
|
| -const _start = Symbol('_start');
|
| const _generator = Symbol('_generator');
|
| core._GeneratorIterable$ = dart.generic(E => {
|
| let _GeneratorOfE = () => (_GeneratorOfE = dart.constFn(core._Generator$(E)))();
|
| - let _GeneratorIteratorOfE = () => (_GeneratorIteratorOfE = dart.constFn(core._GeneratorIterator$(E)))();
|
| - let EmptyIterableOfE = () => (EmptyIterableOfE = dart.constFn(_internal.EmptyIterable$(E)))();
|
| - let _GeneratorIterableOfE = () => (_GeneratorIterableOfE = dart.constFn(core._GeneratorIterable$(E)))();
|
| - class _GeneratorIterable extends core.Iterable$(E) {
|
| - new(end, generator) {
|
| - this[_end] = end;
|
| - this[_start] = 0;
|
| - this[_generator] = generator != null ? generator : _GeneratorOfE().as(core._GeneratorIterable._id);
|
| - super.new();
|
| - }
|
| - slice(start, end, generator) {
|
| - this[_start] = start;
|
| - this[_end] = end;
|
| - this[_generator] = generator;
|
| - super.new();
|
| - }
|
| - get iterator() {
|
| - return new (_GeneratorIteratorOfE())(this[_start], this[_end], this[_generator]);
|
| - }
|
| + class _GeneratorIterable extends _internal.ListIterable$(E) {
|
| get length() {
|
| - return dart.notNull(this[_end]) - dart.notNull(this[_start]);
|
| + return this[length$];
|
| }
|
| - skip(count) {
|
| - core.RangeError.checkNotNegative(count, "count");
|
| - if (count == 0) return this;
|
| - let newStart = dart.notNull(this[_start]) + dart.notNull(count);
|
| - if (newStart >= dart.notNull(this[_end])) return new (EmptyIterableOfE())();
|
| - return new (_GeneratorIterableOfE()).slice(newStart, this[_end], this[_generator]);
|
| + set length(value) {
|
| + super.length = value;
|
| }
|
| - take(count) {
|
| - core.RangeError.checkNotNegative(count, "count");
|
| - if (count == 0) return new (EmptyIterableOfE())();
|
| - let newEnd = dart.notNull(this[_start]) + dart.notNull(count);
|
| - if (newEnd >= dart.notNull(this[_end])) return this;
|
| - return new (_GeneratorIterableOfE()).slice(this[_start], newEnd, this[_generator]);
|
| + new(length, generator) {
|
| + this[length$] = length;
|
| + this[_generator] = generator != null ? generator : _GeneratorOfE().as(core._GeneratorIterable._id);
|
| + super.new();
|
| + }
|
| + elementAt(index) {
|
| + core.RangeError.checkValidIndex(index, this);
|
| + return this[_generator](index);
|
| }
|
| static _id(n) {
|
| return n;
|
| }
|
| }
|
| - dart.defineNamedConstructor(_GeneratorIterable, 'slice');
|
| - _GeneratorIterable[dart.implements] = () => [_internal.EfficientLength];
|
| + const length$ = Symbol(_GeneratorIterable.name + "." + 'length'.toString());
|
| dart.setSignature(_GeneratorIterable, {
|
| - constructors: () => ({
|
| - new: dart.definiteFunctionType(core._GeneratorIterable$(E), [core.int, _GeneratorOfE()]),
|
| - slice: dart.definiteFunctionType(core._GeneratorIterable$(E), [core.int, core.int, _GeneratorOfE()])
|
| - }),
|
| + constructors: () => ({new: dart.definiteFunctionType(core._GeneratorIterable$(E), [core.int, _GeneratorOfE()])}),
|
| fields: () => ({
|
| - [_start]: core.int,
|
| - [_end]: core.int,
|
| + length: core.int,
|
| [_generator]: _GeneratorOfE()
|
| }),
|
| - getters: () => ({iterator: dart.definiteFunctionType(core.Iterator$(E), [])}),
|
| statics: () => ({_id: dart.definiteFunctionType(core.int, [core.int])}),
|
| names: ['_id']
|
| });
|
| - dart.defineExtensionMembers(_GeneratorIterable, ['skip', 'take', 'iterator', 'length']);
|
| + dart.defineExtensionMembers(_GeneratorIterable, ['elementAt', 'length']);
|
| return _GeneratorIterable;
|
| });
|
| core._GeneratorIterable = _GeneratorIterable();
|
| -const _index = Symbol('_index');
|
| -const _current = Symbol('_current');
|
| -core._GeneratorIterator$ = dart.generic(E => {
|
| - let IteratorOfE = () => (IteratorOfE = dart.constFn(core.Iterator$(E)))();
|
| - let _GeneratorOfE = () => (_GeneratorOfE = dart.constFn(core._Generator$(E)))();
|
| - class _GeneratorIterator extends core.Object {
|
| - new(index, end, generator) {
|
| - this[_index] = index;
|
| - this[_end] = end;
|
| - this[_generator] = generator;
|
| - this[_current] = null;
|
| - }
|
| - moveNext() {
|
| - if (dart.notNull(this[_index]) < dart.notNull(this[_end])) {
|
| - this[_current] = this[_generator](this[_index]);
|
| - this[_index] = dart.notNull(this[_index]) + 1;
|
| - return true;
|
| - } else {
|
| - this[_current] = null;
|
| - return false;
|
| - }
|
| - }
|
| - get current() {
|
| - return this[_current];
|
| - }
|
| - }
|
| - dart.addTypeTests(_GeneratorIterator);
|
| - _GeneratorIterator[dart.implements] = () => [IteratorOfE()];
|
| - dart.setSignature(_GeneratorIterator, {
|
| - constructors: () => ({new: dart.definiteFunctionType(core._GeneratorIterator$(E), [core.int, core.int, _GeneratorOfE()])}),
|
| - fields: () => ({
|
| - [_end]: core.int,
|
| - [_generator]: _GeneratorOfE(),
|
| - [_index]: core.int,
|
| - [_current]: E
|
| - }),
|
| - getters: () => ({current: dart.definiteFunctionType(E, [])}),
|
| - methods: () => ({moveNext: dart.definiteFunctionType(core.bool, [])})
|
| - });
|
| - return _GeneratorIterator;
|
| -});
|
| -core._GeneratorIterator = _GeneratorIterator();
|
| core.BidirectionalIterator$ = dart.generic(E => {
|
| let IteratorOfE = () => (IteratorOfE = dart.constFn(core.Iterator$(E)))();
|
| class BidirectionalIterator extends core.Object {}
|
| @@ -34410,6 +34327,9 @@ core.Null = class Null extends core.Object {
|
| static _uninstantiable() {
|
| dart.throw(new core.UnsupportedError('class Null cannot be instantiated'));
|
| }
|
| + get hashCode() {
|
| + return super.hashCode;
|
| + }
|
| toString() {
|
| return "null";
|
| }
|
| @@ -34451,8 +34371,7 @@ dart.setSignature(core.RegExp, {
|
| });
|
| core.Set$ = dart.generic(E => {
|
| let LinkedHashSetOfE = () => (LinkedHashSetOfE = dart.constFn(collection.LinkedHashSet$(E)))();
|
| - let IterableOfE = () => (IterableOfE = dart.constFn(core.Iterable$(E)))();
|
| - class Set extends core.Iterable$(E) {
|
| + class Set extends _internal.EfficientLengthIterable$(E) {
|
| static new() {
|
| return LinkedHashSetOfE().new();
|
| }
|
| @@ -34463,12 +34382,11 @@ core.Set$ = dart.generic(E => {
|
| return LinkedHashSetOfE().from(elements);
|
| }
|
| }
|
| - Set[dart.implements] = () => [_internal.EfficientLength];
|
| dart.setSignature(Set, {
|
| constructors: () => ({
|
| new: dart.definiteFunctionType(core.Set$(E), []),
|
| identity: dart.definiteFunctionType(core.Set$(E), []),
|
| - from: dart.definiteFunctionType(core.Set$(E), [IterableOfE()])
|
| + from: dart.definiteFunctionType(core.Set$(E), [core.Iterable])
|
| })
|
| });
|
| return Set;
|
| @@ -34511,41 +34429,38 @@ dart.setSignature(core._StringStackTrace, {
|
| constructors: () => ({new: dart.definiteFunctionType(core._StringStackTrace, [core.String])}),
|
| fields: () => ({[_stackTrace]: core.String})
|
| });
|
| +const _start = Symbol('_start');
|
| const _stop = Symbol('_stop');
|
| core.Stopwatch = class Stopwatch extends core.Object {
|
| + new() {
|
| + this[_start] = 0;
|
| + this[_stop] = 0;
|
| + if (core.Stopwatch._frequency == null) core.Stopwatch._initTicker();
|
| + }
|
| get frequency() {
|
| return core.Stopwatch._frequency;
|
| }
|
| - new() {
|
| - this[_start] = null;
|
| - this[_stop] = null;
|
| - core.Stopwatch._initTicker();
|
| - }
|
| start() {
|
| - if (dart.test(this.isRunning)) return;
|
| - if (this[_start] == null) {
|
| - this[_start] = core.Stopwatch._now();
|
| - } else {
|
| - this[_start] = dart.notNull(core.Stopwatch._now()) - (dart.notNull(this[_stop]) - dart.notNull(this[_start]));
|
| + if (this[_stop] != null) {
|
| + this[_start] = dart.notNull(this[_start]) + (dart.notNull(core.Stopwatch._now()) - dart.notNull(this[_stop]));
|
| this[_stop] = null;
|
| }
|
| }
|
| stop() {
|
| - if (!dart.test(this.isRunning)) return;
|
| - this[_stop] = core.Stopwatch._now();
|
| + let t = this[_stop];
|
| + t == null ? this[_stop] = core.Stopwatch._now() : t;
|
| }
|
| reset() {
|
| - if (this[_start] == null) return;
|
| - this[_start] = core.Stopwatch._now();
|
| - if (this[_stop] != null) {
|
| - this[_stop] = this[_start];
|
| - }
|
| + this[_start] = (() => {
|
| + let l = this[_stop];
|
| + return l != null ? l : core.Stopwatch._now();
|
| + })();
|
| }
|
| get elapsedTicks() {
|
| - if (this[_start] == null) {
|
| - return 0;
|
| - }
|
| - return this[_stop] == null ? dart.notNull(core.Stopwatch._now()) - dart.notNull(this[_start]) : dart.notNull(this[_stop]) - dart.notNull(this[_start]);
|
| + return dart.notNull((() => {
|
| + let l = this[_stop];
|
| + return l != null ? l : core.Stopwatch._now();
|
| + })()) - dart.notNull(this[_start]);
|
| }
|
| get elapsed() {
|
| return new core.Duration({microseconds: this.elapsedMicroseconds});
|
| @@ -34557,7 +34472,7 @@ core.Stopwatch = class Stopwatch extends core.Object {
|
| return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequency))[dartx.truncate]();
|
| }
|
| get isRunning() {
|
| - return this[_start] != null && this[_stop] == null;
|
| + return this[_stop] == null;
|
| }
|
| static _initTicker() {
|
| _js_helper.Primitives.initTicker();
|
| @@ -34844,6 +34759,409 @@ core.Symbol = class Symbol extends core.Object {
|
| dart.setSignature(core.Symbol, {
|
| constructors: () => ({new: dart.definiteFunctionType(core.Symbol, [core.String])})
|
| });
|
| +core._SPACE = 32;
|
| +core._PERCENT = 37;
|
| +core._PLUS = 43;
|
| +core._DOT = 46;
|
| +core._SLASH = 47;
|
| +core._COLON = 58;
|
| +core._UPPER_CASE_A = 65;
|
| +core._UPPER_CASE_Z = 90;
|
| +core._LEFT_BRACKET = 91;
|
| +core._BACKSLASH = 92;
|
| +core._RIGHT_BRACKET = 93;
|
| +core._LOWER_CASE_A = 97;
|
| +core._LOWER_CASE_F = 102;
|
| +core._LOWER_CASE_Z = 122;
|
| +core._hexDigits = "0123456789ABCDEF";
|
| +core.Uri = class Uri extends core.Object {
|
| + static get base() {
|
| + let uri = _js_helper.Primitives.currentUri();
|
| + if (uri != null) return core.Uri.parse(uri);
|
| + dart.throw(new core.UnsupportedError("'Uri.base' is not supported"));
|
| + }
|
| + static new(opts) {
|
| + return core._Uri.new(opts);
|
| + }
|
| + static http(authority, unencodedPath, queryParameters) {
|
| + return core._Uri.http(authority, unencodedPath, queryParameters);
|
| + }
|
| + static https(authority, unencodedPath, queryParameters) {
|
| + return core._Uri.https(authority, unencodedPath, queryParameters);
|
| + }
|
| + static file(path, opts) {
|
| + return core._Uri.file(path, opts);
|
| + }
|
| + static directory(path, opts) {
|
| + return core._Uri.directory(path, opts);
|
| + }
|
| + static dataFromString(content, opts) {
|
| + let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null;
|
| + let encoding = opts && 'encoding' in opts ? opts.encoding : null;
|
| + let parameters = opts && 'parameters' in opts ? opts.parameters : null;
|
| + let base64 = opts && 'base64' in opts ? opts.base64 : false;
|
| + let data = core.UriData.fromString(content, {mimeType: mimeType, encoding: encoding, parameters: parameters, base64: base64});
|
| + return data.uri;
|
| + }
|
| + static dataFromBytes(bytes, opts) {
|
| + let mimeType = opts && 'mimeType' in opts ? opts.mimeType : "application/octet-stream";
|
| + let parameters = opts && 'parameters' in opts ? opts.parameters : null;
|
| + let percentEncoded = opts && 'percentEncoded' in opts ? opts.percentEncoded : false;
|
| + let data = core.UriData.fromBytes(bytes, {mimeType: mimeType, parameters: parameters, percentEncoded: percentEncoded});
|
| + return data.uri;
|
| + }
|
| + get hasScheme() {
|
| + return this.scheme[dartx.isNotEmpty];
|
| + }
|
| + static parse(uri, start, end) {
|
| + if (start === void 0) start = 0;
|
| + if (end === void 0) end = null;
|
| + let t = end;
|
| + t == null ? end = uri[dartx.length] : t;
|
| + if (dart.notNull(end) >= dart.notNull(start) + 5) {
|
| + let dataDelta = core._startsWithData(uri, start);
|
| + if (dataDelta == 0) {
|
| + if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(uri[dartx.length])) uri = uri[dartx.substring](start, end);
|
| + return core.UriData._parse(uri, 5, null).uri;
|
| + } else if (dataDelta == 32) {
|
| + return core.UriData._parse(uri[dartx.substring](dart.notNull(start) + 5, end), 0, null).uri;
|
| + }
|
| + }
|
| + let indices = ListOfint().new(8);
|
| + indices[dartx._set](0, 0);
|
| + indices[dartx._set](core._schemeEndIndex, dart.notNull(start) - 1);
|
| + indices[dartx._set](core._hostStartIndex, dart.notNull(start) - 1);
|
| + indices[dartx._set](core._notSimpleIndex, dart.notNull(start) - 1);
|
| + indices[dartx._set](core._portStartIndex, start);
|
| + indices[dartx._set](core._pathStartIndex, start);
|
| + indices[dartx._set](core._queryStartIndex, end);
|
| + indices[dartx._set](core._fragmentStartIndex, end);
|
| + let state = core._scan(uri, start, end, core._uriStart, indices);
|
| + if (dart.notNull(state) >= core._nonSimpleEndStates) {
|
| + indices[dartx._set](core._notSimpleIndex, end);
|
| + }
|
| + let schemeEnd = indices[dartx._get](core._schemeEndIndex);
|
| + if (dart.notNull(schemeEnd) >= dart.notNull(start)) {
|
| + state = core._scan(uri, start, schemeEnd, core._schemeStart, indices);
|
| + if (state == core._schemeStart) {
|
| + indices[dartx._set](core._notSimpleIndex, schemeEnd);
|
| + }
|
| + }
|
| + let hostStart = dart.notNull(indices[dartx._get](core._hostStartIndex)) + 1;
|
| + let portStart = indices[dartx._get](core._portStartIndex);
|
| + let pathStart = indices[dartx._get](core._pathStartIndex);
|
| + let queryStart = indices[dartx._get](core._queryStartIndex);
|
| + let fragmentStart = indices[dartx._get](core._fragmentStartIndex);
|
| + let scheme = null;
|
| + if (dart.notNull(fragmentStart) < dart.notNull(queryStart)) queryStart = fragmentStart;
|
| + if (dart.notNull(pathStart) < dart.notNull(hostStart) || dart.notNull(pathStart) <= dart.notNull(schemeEnd)) {
|
| + pathStart = queryStart;
|
| + }
|
| + if (dart.notNull(portStart) < dart.notNull(hostStart)) portStart = pathStart;
|
| + dart.assert(hostStart == start || dart.notNull(schemeEnd) <= dart.notNull(hostStart));
|
| + dart.assert(dart.notNull(hostStart) <= dart.notNull(portStart));
|
| + dart.assert(dart.notNull(schemeEnd) <= dart.notNull(pathStart));
|
| + dart.assert(dart.notNull(portStart) <= dart.notNull(pathStart));
|
| + dart.assert(dart.notNull(pathStart) <= dart.notNull(queryStart));
|
| + dart.assert(dart.notNull(queryStart) <= dart.notNull(fragmentStart));
|
| + let isSimple = dart.notNull(indices[dartx._get](core._notSimpleIndex)) < dart.notNull(start);
|
| + if (isSimple) {
|
| + if (dart.notNull(hostStart) > dart.notNull(schemeEnd) + 3) {
|
| + isSimple = false;
|
| + } else if (dart.notNull(portStart) > dart.notNull(start) && dart.notNull(portStart) + 1 == pathStart) {
|
| + isSimple = false;
|
| + } else if (dart.notNull(queryStart) < dart.notNull(end) && queryStart == dart.notNull(pathStart) + 2 && dart.test(uri[dartx.startsWith]("..", pathStart)) || dart.notNull(queryStart) > dart.notNull(pathStart) + 2 && dart.test(uri[dartx.startsWith]("/..", dart.notNull(queryStart) - 3))) {
|
| + isSimple = false;
|
| + } else {
|
| + if (schemeEnd == dart.notNull(start) + 4) {
|
| + if (dart.test(uri[dartx.startsWith]("file", start))) {
|
| + scheme = "file";
|
| + if (dart.notNull(hostStart) <= dart.notNull(start)) {
|
| + let schemeAuth = "file://";
|
| + let delta = 2;
|
| + if (!dart.test(uri[dartx.startsWith]("/", pathStart))) {
|
| + schemeAuth = "file:///";
|
| + delta = 3;
|
| + }
|
| + uri = schemeAuth + dart.notNull(uri[dartx.substring](pathStart, end));
|
| + schemeEnd = dart.notNull(schemeEnd) - dart.notNull(start);
|
| + hostStart = 7;
|
| + portStart = 7;
|
| + pathStart = 7;
|
| + queryStart = dart.notNull(queryStart) + (delta - dart.notNull(start));
|
| + fragmentStart = dart.notNull(fragmentStart) + (delta - dart.notNull(start));
|
| + start = 0;
|
| + end = uri[dartx.length];
|
| + } else if (pathStart == queryStart) {
|
| + if (start == 0 && end == uri[dartx.length]) {
|
| + uri = uri[dartx.replaceRange](pathStart, queryStart, "/");
|
| + queryStart = dart.notNull(queryStart) + 1;
|
| + fragmentStart = dart.notNull(fragmentStart) + 1;
|
| + end = dart.notNull(end) + 1;
|
| + } else {
|
| + uri = dart.str`${uri[dartx.substring](start, pathStart)}/` + dart.str`${uri[dartx.substring](queryStart, end)}`;
|
| + schemeEnd = dart.notNull(schemeEnd) - dart.notNull(start);
|
| + hostStart = dart.notNull(hostStart) - dart.notNull(start);
|
| + portStart = dart.notNull(portStart) - dart.notNull(start);
|
| + pathStart = dart.notNull(pathStart) - dart.notNull(start);
|
| + queryStart = dart.notNull(queryStart) + (1 - dart.notNull(start));
|
| + fragmentStart = dart.notNull(fragmentStart) + (1 - dart.notNull(start));
|
| + start = 0;
|
| + end = uri[dartx.length];
|
| + }
|
| + }
|
| + } else if (dart.test(uri[dartx.startsWith]("http", start))) {
|
| + scheme = "http";
|
| + if (dart.notNull(portStart) > dart.notNull(start) && dart.notNull(portStart) + 3 == pathStart && dart.test(uri[dartx.startsWith]("80", dart.notNull(portStart) + 1))) {
|
| + if (start == 0 && end == uri[dartx.length]) {
|
| + uri = uri[dartx.replaceRange](portStart, pathStart, "");
|
| + pathStart = dart.notNull(pathStart) - 3;
|
| + queryStart = dart.notNull(queryStart) - 3;
|
| + fragmentStart = dart.notNull(fragmentStart) - 3;
|
| + end = dart.notNull(end) - 3;
|
| + } else {
|
| + uri = dart.notNull(uri[dartx.substring](start, portStart)) + dart.notNull(uri[dartx.substring](pathStart, end));
|
| + schemeEnd = dart.notNull(schemeEnd) - dart.notNull(start);
|
| + hostStart = dart.notNull(hostStart) - dart.notNull(start);
|
| + portStart = dart.notNull(portStart) - dart.notNull(start);
|
| + pathStart = dart.notNull(pathStart) - (3 + dart.notNull(start));
|
| + queryStart = dart.notNull(queryStart) - (3 + dart.notNull(start));
|
| + fragmentStart = dart.notNull(fragmentStart) - (3 + dart.notNull(start));
|
| + start = 0;
|
| + end = uri[dartx.length];
|
| + }
|
| + }
|
| + }
|
| + } else if (schemeEnd == dart.notNull(start) + 5 && dart.test(uri[dartx.startsWith]("https", start))) {
|
| + scheme = "https";
|
| + if (dart.notNull(portStart) > dart.notNull(start) && dart.notNull(portStart) + 4 == pathStart && dart.test(uri[dartx.startsWith]("443", dart.notNull(portStart) + 1))) {
|
| + if (start == 0 && end == uri[dartx.length]) {
|
| + uri = uri[dartx.replaceRange](portStart, pathStart, "");
|
| + pathStart = dart.notNull(pathStart) - 4;
|
| + queryStart = dart.notNull(queryStart) - 4;
|
| + fragmentStart = dart.notNull(fragmentStart) - 4;
|
| + end = dart.notNull(end) - 3;
|
| + } else {
|
| + uri = dart.notNull(uri[dartx.substring](start, portStart)) + dart.notNull(uri[dartx.substring](pathStart, end));
|
| + schemeEnd = dart.notNull(schemeEnd) - dart.notNull(start);
|
| + hostStart = dart.notNull(hostStart) - dart.notNull(start);
|
| + portStart = dart.notNull(portStart) - dart.notNull(start);
|
| + pathStart = dart.notNull(pathStart) - (4 + dart.notNull(start));
|
| + queryStart = dart.notNull(queryStart) - (4 + dart.notNull(start));
|
| + fragmentStart = dart.notNull(fragmentStart) - (4 + dart.notNull(start));
|
| + start = 0;
|
| + end = uri[dartx.length];
|
| + }
|
| + }
|
| + }
|
| + }
|
| + }
|
| + if (isSimple) {
|
| + if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(uri[dartx.length])) {
|
| + uri = uri[dartx.substring](start, end);
|
| + schemeEnd = dart.notNull(schemeEnd) - dart.notNull(start);
|
| + hostStart = dart.notNull(hostStart) - dart.notNull(start);
|
| + portStart = dart.notNull(portStart) - dart.notNull(start);
|
| + pathStart = dart.notNull(pathStart) - dart.notNull(start);
|
| + queryStart = dart.notNull(queryStart) - dart.notNull(start);
|
| + fragmentStart = dart.notNull(fragmentStart) - dart.notNull(start);
|
| + }
|
| + return new core._SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme);
|
| + }
|
| + return core._Uri.notSimple(uri, start, end, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme);
|
| + }
|
| + static encodeComponent(component) {
|
| + return core._Uri._uriEncode(core._Uri._unreserved2396Table, component, convert.UTF8, false);
|
| + }
|
| + static encodeQueryComponent(component, opts) {
|
| + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| + return core._Uri._uriEncode(core._Uri._unreservedTable, component, encoding, true);
|
| + }
|
| + static decodeComponent(encodedComponent) {
|
| + return core._Uri._uriDecode(encodedComponent, 0, encodedComponent[dartx.length], convert.UTF8, false);
|
| + }
|
| + static decodeQueryComponent(encodedComponent, opts) {
|
| + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| + return core._Uri._uriDecode(encodedComponent, 0, encodedComponent[dartx.length], encoding, true);
|
| + }
|
| + static encodeFull(uri) {
|
| + return core._Uri._uriEncode(core._Uri._encodeFullTable, uri, convert.UTF8, false);
|
| + }
|
| + static decodeFull(uri) {
|
| + return core._Uri._uriDecode(uri, 0, uri[dartx.length], convert.UTF8, false);
|
| + }
|
| + static splitQueryString(query, opts) {
|
| + let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| + return query[dartx.split]("&")[dartx.fold](MapOfString$String())(dart.map({}, core.String, core.String), dart.fn((map, element) => {
|
| + let index = element[dartx.indexOf]("=");
|
| + if (index == -1) {
|
| + if (element != "") {
|
| + map[dartx._set](core.Uri.decodeQueryComponent(element, {encoding: encoding}), "");
|
| + }
|
| + } else if (index != 0) {
|
| + let key = element[dartx.substring](0, index);
|
| + let value = element[dartx.substring](dart.notNull(index) + 1);
|
| + map[dartx._set](core.Uri.decodeQueryComponent(key, {encoding: encoding}), core.Uri.decodeQueryComponent(value, {encoding: encoding}));
|
| + }
|
| + return map;
|
| + }, MapOfString$StringAndStringToMapOfString$String()));
|
| + }
|
| + static parseIPv4Address(host) {
|
| + return core.Uri._parseIPv4Address(host, 0, host[dartx.length]);
|
| + }
|
| + static _parseIPv4Address(host, start, end) {
|
| + function error(msg, position) {
|
| + dart.throw(new core.FormatException(dart.str`Illegal IPv4 address, ${msg}`, host, position));
|
| + }
|
| + dart.fn(error, StringAndintTovoid());
|
| + let result = typed_data.Uint8List.new(4);
|
| + let partIndex = 0;
|
| + let partStart = start;
|
| + for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| + let char = host[dartx.codeUnitAt](i);
|
| + if (char != core._DOT) {
|
| + if ((dart.notNull(char) ^ 48) >>> 0 > 9) {
|
| + error("invalid character", i);
|
| + }
|
| + } else {
|
| + if (partIndex == 3) {
|
| + error('IPv4 address should contain exactly 4 parts', i);
|
| + }
|
| + let part = core.int.parse(host[dartx.substring](partStart, i));
|
| + if (dart.notNull(part) > 255) {
|
| + error("each part must be in the range 0..255", partStart);
|
| + }
|
| + result[dartx._set](partIndex++, part);
|
| + partStart = dart.notNull(i) + 1;
|
| + }
|
| + }
|
| + if (partIndex != 3) {
|
| + error('IPv4 address should contain exactly 4 parts', end);
|
| + }
|
| + let part = core.int.parse(host[dartx.substring](partStart, end));
|
| + if (dart.notNull(part) > 255) {
|
| + error("each part must be in the range 0..255", partStart);
|
| + }
|
| + result[dartx._set](partIndex, part);
|
| + return result;
|
| + }
|
| + static parseIPv6Address(host, start, end) {
|
| + if (start === void 0) start = 0;
|
| + if (end === void 0) end = null;
|
| + if (end == null) end = host[dartx.length];
|
| + function error(msg, position) {
|
| + if (position === void 0) position = null;
|
| + dart.throw(new core.FormatException(dart.str`Illegal IPv6 address, ${msg}`, host, core.int._check(position)));
|
| + }
|
| + dart.fn(error, String__Tovoid());
|
| + function parseHex(start, end) {
|
| + if (dart.notNull(end) - dart.notNull(start) > 4) {
|
| + error('an IPv6 part can only contain a maximum of 4 hex digits', start);
|
| + }
|
| + let value = core.int.parse(host[dartx.substring](start, end), {radix: 16});
|
| + if (dart.notNull(value) < 0 || dart.notNull(value) > 65535) {
|
| + error('each part must be in the range of `0x0..0xFFFF`', start);
|
| + }
|
| + return value;
|
| + }
|
| + dart.fn(parseHex, intAndintToint());
|
| + if (dart.notNull(host[dartx.length]) < 2) error('address is too short');
|
| + let parts = JSArrayOfint().of([]);
|
| + let wildcardSeen = false;
|
| + let seenDot = false;
|
| + let partStart = start;
|
| + for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| + let char = host[dartx.codeUnitAt](i);
|
| + if (char == core._COLON) {
|
| + if (i == start) {
|
| + i = dart.notNull(i) + 1;
|
| + if (host[dartx.codeUnitAt](i) != core._COLON) {
|
| + error('invalid start colon.', i);
|
| + }
|
| + partStart = i;
|
| + }
|
| + if (i == partStart) {
|
| + if (wildcardSeen) {
|
| + error('only one wildcard `::` is allowed', i);
|
| + }
|
| + wildcardSeen = true;
|
| + parts[dartx.add](-1);
|
| + } else {
|
| + parts[dartx.add](parseHex(partStart, i));
|
| + }
|
| + partStart = dart.notNull(i) + 1;
|
| + } else if (char == core._DOT) {
|
| + seenDot = true;
|
| + }
|
| + }
|
| + if (parts[dartx.length] == 0) error('too few parts');
|
| + let atEnd = partStart == end;
|
| + let isLastWildcard = parts[dartx.last] == -1;
|
| + if (atEnd && !isLastWildcard) {
|
| + error('expected a part after last `:`', end);
|
| + }
|
| + if (!atEnd) {
|
| + if (!seenDot) {
|
| + parts[dartx.add](parseHex(partStart, end));
|
| + } else {
|
| + let last = core.Uri._parseIPv4Address(host, partStart, end);
|
| + parts[dartx.add]((dart.notNull(last[dartx._get](0)) << 8 | dart.notNull(last[dartx._get](1))) >>> 0);
|
| + parts[dartx.add]((dart.notNull(last[dartx._get](2)) << 8 | dart.notNull(last[dartx._get](3))) >>> 0);
|
| + }
|
| + }
|
| + if (wildcardSeen) {
|
| + if (dart.notNull(parts[dartx.length]) > 7) {
|
| + error('an address with a wildcard must have less than 7 parts');
|
| + }
|
| + } else if (parts[dartx.length] != 8) {
|
| + error('an address without a wildcard must contain exactly 8 parts');
|
| + }
|
| + let bytes = typed_data.Uint8List.new(16);
|
| + for (let i = 0, index = 0; i < dart.notNull(parts[dartx.length]); i++) {
|
| + let value = parts[dartx._get](i);
|
| + if (value == -1) {
|
| + let wildCardLength = 9 - dart.notNull(parts[dartx.length]);
|
| + for (let j = 0; j < wildCardLength; j++) {
|
| + bytes[dartx._set](index, 0);
|
| + bytes[dartx._set](index + 1, 0);
|
| + index = index + 2;
|
| + }
|
| + } else {
|
| + bytes[dartx._set](index, value[dartx['>>']](8));
|
| + bytes[dartx._set](index + 1, dart.notNull(value) & 255);
|
| + index = index + 2;
|
| + }
|
| + }
|
| + return bytes;
|
| + }
|
| +};
|
| +dart.setSignature(core.Uri, {
|
| + constructors: () => ({
|
| + new: dart.definiteFunctionType(core.Uri, [], {scheme: core.String, userInfo: core.String, host: core.String, port: core.int, path: core.String, pathSegments: IterableOfString(), query: core.String, queryParameters: MapOfString$dynamic(), fragment: core.String}),
|
| + http: dart.definiteFunctionType(core.Uri, [core.String, core.String], [MapOfString$String()]),
|
| + https: dart.definiteFunctionType(core.Uri, [core.String, core.String], [MapOfString$String()]),
|
| + file: dart.definiteFunctionType(core.Uri, [core.String], {windows: core.bool}),
|
| + directory: dart.definiteFunctionType(core.Uri, [core.String], {windows: core.bool}),
|
| + dataFromString: dart.definiteFunctionType(core.Uri, [core.String], {mimeType: core.String, encoding: convert.Encoding, parameters: MapOfString$String(), base64: core.bool}),
|
| + dataFromBytes: dart.definiteFunctionType(core.Uri, [ListOfint()], {mimeType: dart.dynamic, parameters: MapOfString$String(), percentEncoded: dart.dynamic})
|
| + }),
|
| + getters: () => ({hasScheme: dart.definiteFunctionType(core.bool, [])}),
|
| + sgetters: () => ({base: dart.definiteFunctionType(core.Uri, [])}),
|
| + statics: () => ({
|
| + parse: dart.definiteFunctionType(core.Uri, [core.String], [core.int, core.int]),
|
| + encodeComponent: dart.definiteFunctionType(core.String, [core.String]),
|
| + encodeQueryComponent: dart.definiteFunctionType(core.String, [core.String], {encoding: convert.Encoding}),
|
| + decodeComponent: dart.definiteFunctionType(core.String, [core.String]),
|
| + decodeQueryComponent: dart.definiteFunctionType(core.String, [core.String], {encoding: convert.Encoding}),
|
| + encodeFull: dart.definiteFunctionType(core.String, [core.String]),
|
| + decodeFull: dart.definiteFunctionType(core.String, [core.String]),
|
| + splitQueryString: dart.definiteFunctionType(core.Map$(core.String, core.String), [core.String], {encoding: convert.Encoding}),
|
| + parseIPv4Address: dart.definiteFunctionType(core.List$(core.int), [core.String]),
|
| + _parseIPv4Address: dart.definiteFunctionType(core.List$(core.int), [core.String, core.int, core.int]),
|
| + parseIPv6Address: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int])
|
| + }),
|
| + names: ['parse', 'encodeComponent', 'encodeQueryComponent', 'decodeComponent', 'decodeQueryComponent', 'encodeFull', 'decodeFull', 'splitQueryString', 'parseIPv4Address', '_parseIPv4Address', 'parseIPv6Address']
|
| +});
|
| const _userInfo = Symbol('_userInfo');
|
| const _host = Symbol('_host');
|
| const _port = Symbol('_port');
|
| @@ -34851,15 +35169,17 @@ const _path = Symbol('_path');
|
| const _query = Symbol('_query');
|
| const _fragment = Symbol('_fragment');
|
| const _pathSegments = Symbol('_pathSegments');
|
| +const _text = Symbol('_text');
|
| +const _hashCodeCache = Symbol('_hashCodeCache');
|
| const _queryParameters = Symbol('_queryParameters');
|
| const _queryParameterLists = Symbol('_queryParameterLists');
|
| const _writeAuthority = Symbol('_writeAuthority');
|
| let const;
|
| const _mergePaths = Symbol('_mergePaths');
|
| -const _toWindowsFilePath = Symbol('_toWindowsFilePath');
|
| const _toFilePath = Symbol('_toFilePath');
|
| const _isPathAbsolute = Symbol('_isPathAbsolute');
|
| -core.Uri = class Uri extends core.Object {
|
| +const _initializeText = Symbol('_initializeText');
|
| +core._Uri = class _Uri extends core.Object {
|
| _internal(scheme, userInfo, host, port, path, query, fragment) {
|
| this.scheme = scheme;
|
| this[_userInfo] = userInfo;
|
| @@ -34869,12 +35189,50 @@ core.Uri = class Uri extends core.Object {
|
| this[_query] = query;
|
| this[_fragment] = fragment;
|
| this[_pathSegments] = null;
|
| + this[_text] = null;
|
| + this[_hashCodeCache] = null;
|
| this[_queryParameters] = null;
|
| this[_queryParameterLists] = null;
|
| }
|
| + static notSimple(uri, start, end, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, scheme) {
|
| + if (scheme == null) {
|
| + scheme = "";
|
| + if (dart.notNull(schemeEnd) > dart.notNull(start)) {
|
| + scheme = core._Uri._makeScheme(uri, start, schemeEnd);
|
| + } else if (schemeEnd == start) {
|
| + core._Uri._fail(uri, start, "Invalid empty scheme");
|
| + }
|
| + }
|
| + let userInfo = "";
|
| + let host = null;
|
| + let port = null;
|
| + if (dart.notNull(hostStart) > dart.notNull(start)) {
|
| + let userInfoStart = dart.notNull(schemeEnd) + 3;
|
| + if (userInfoStart < dart.notNull(hostStart)) {
|
| + userInfo = core._Uri._makeUserInfo(uri, userInfoStart, dart.notNull(hostStart) - 1);
|
| + }
|
| + host = core._Uri._makeHost(uri, hostStart, portStart, false);
|
| + if (dart.notNull(portStart) + 1 < dart.notNull(pathStart)) {
|
| + port = core.int.parse(uri[dartx.substring](dart.notNull(portStart) + 1, pathStart), {onError: dart.fn(_ => {
|
| + dart.throw(new core.FormatException("Invalid port", uri, dart.notNull(portStart) + 1));
|
| + }, StringToNull())});
|
| + port = core._Uri._makePort(port, scheme);
|
| + }
|
| + }
|
| + let path = core._Uri._makePath(uri, pathStart, queryStart, null, scheme, host != null);
|
| + let query = null;
|
| + if (dart.notNull(queryStart) < dart.notNull(fragmentStart)) {
|
| + query = core._Uri._makeQuery(uri, dart.notNull(queryStart) + 1, fragmentStart, null);
|
| + }
|
| + let fragment = null;
|
| + if (dart.notNull(fragmentStart) < dart.notNull(end)) {
|
| + fragment = core._Uri._makeFragment(uri, dart.notNull(fragmentStart) + 1, end);
|
| + }
|
| + return new core._Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| + }
|
| static new(opts) {
|
| - let scheme = opts && 'scheme' in opts ? opts.scheme : "";
|
| - let userInfo = opts && 'userInfo' in opts ? opts.userInfo : "";
|
| + let scheme = opts && 'scheme' in opts ? opts.scheme : null;
|
| + let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null;
|
| let host = opts && 'host' in opts ? opts.host : null;
|
| let port = opts && 'port' in opts ? opts.port : null;
|
| let path = opts && 'path' in opts ? opts.path : null;
|
| @@ -34882,33 +35240,37 @@ core.Uri = class Uri extends core.Object {
|
| let query = opts && 'query' in opts ? opts.query : null;
|
| let queryParameters = opts && 'queryParameters' in opts ? opts.queryParameters : null;
|
| let fragment = opts && 'fragment' in opts ? opts.fragment : null;
|
| - scheme = core.Uri._makeScheme(scheme, 0, core.Uri._stringOrNullLength(scheme));
|
| - userInfo = core.Uri._makeUserInfo(userInfo, 0, core.Uri._stringOrNullLength(userInfo));
|
| - host = core.Uri._makeHost(host, 0, core.Uri._stringOrNullLength(host), false);
|
| + scheme = core._Uri._makeScheme(scheme, 0, core._stringOrNullLength(scheme));
|
| + userInfo = core._Uri._makeUserInfo(userInfo, 0, core._stringOrNullLength(userInfo));
|
| + host = core._Uri._makeHost(host, 0, core._stringOrNullLength(host), false);
|
| if (query == "") query = null;
|
| - query = core.Uri._makeQuery(query, 0, core.Uri._stringOrNullLength(query), queryParameters);
|
| - fragment = core.Uri._makeFragment(fragment, 0, core.Uri._stringOrNullLength(fragment));
|
| - port = core.Uri._makePort(port, scheme);
|
| + query = core._Uri._makeQuery(query, 0, core._stringOrNullLength(query), queryParameters);
|
| + fragment = core._Uri._makeFragment(fragment, 0, core._stringOrNullLength(fragment));
|
| + port = core._Uri._makePort(port, scheme);
|
| let isFile = scheme == "file";
|
| if (host == null && (dart.test(userInfo[dartx.isNotEmpty]) || port != null || isFile)) {
|
| host = "";
|
| }
|
| let hasAuthority = host != null;
|
| - path = core.Uri._makePath(path, 0, core.Uri._stringOrNullLength(path), pathSegments, scheme, hasAuthority);
|
| + path = core._Uri._makePath(path, 0, core._stringOrNullLength(path), pathSegments, scheme, hasAuthority);
|
| if (dart.test(scheme[dartx.isEmpty]) && host == null && !dart.test(path[dartx.startsWith]('/'))) {
|
| - path = core.Uri._normalizeRelativePath(path);
|
| + let allowScheme = dart.test(scheme[dartx.isNotEmpty]) || host != null;
|
| + path = core._Uri._normalizeRelativePath(path, allowScheme);
|
| } else {
|
| - path = core.Uri._removeDotSegments(path);
|
| + path = core._Uri._removeDotSegments(path);
|
| }
|
| - return new core.Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| + if (host == null && dart.test(path[dartx.startsWith]("//"))) {
|
| + host = "";
|
| + }
|
| + return new core._Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| }
|
| static http(authority, unencodedPath, queryParameters) {
|
| if (queryParameters === void 0) queryParameters = null;
|
| - return core.Uri._makeHttpUri("http", authority, unencodedPath, queryParameters);
|
| + return core._Uri._check(core._Uri._makeHttpUri("http", authority, unencodedPath, queryParameters));
|
| }
|
| static https(authority, unencodedPath, queryParameters) {
|
| if (queryParameters === void 0) queryParameters = null;
|
| - return core.Uri._makeHttpUri("https", authority, unencodedPath, queryParameters);
|
| + return core._Uri._check(core._Uri._makeHttpUri("https", authority, unencodedPath, queryParameters));
|
| }
|
| get authority() {
|
| if (!dart.test(this.hasAuthority)) return "";
|
| @@ -34927,7 +35289,7 @@ core.Uri = class Uri extends core.Object {
|
| return this[_host];
|
| }
|
| get port() {
|
| - if (this[_port] == null) return core.Uri._defaultPort(this.scheme);
|
| + if (this[_port] == null) return core._Uri._defaultPort(this.scheme);
|
| return this[_port];
|
| }
|
| static _defaultPort(scheme) {
|
| @@ -34939,177 +35301,33 @@ core.Uri = class Uri extends core.Object {
|
| return this[_path];
|
| }
|
| get query() {
|
| - return this[_query] == null ? "" : this[_query];
|
| + return this[_query] != null ? this[_query] : "";
|
| }
|
| get fragment() {
|
| - return this[_fragment] == null ? "" : this[_fragment];
|
| - }
|
| - static parse(uri, start, end) {
|
| - if (start === void 0) start = 0;
|
| - if (end === void 0) end = null;
|
| - let EOI = -1;
|
| - let scheme = "";
|
| - let userinfo = "";
|
| - let host = null;
|
| - let port = null;
|
| - let path = null;
|
| - let query = null;
|
| - let fragment = null;
|
| - if (end == null) end = uri[dartx.length];
|
| - let index = start;
|
| - let pathStart = start;
|
| - let char = EOI;
|
| - function parseAuth() {
|
| - if (index == end) {
|
| - char = EOI;
|
| - return;
|
| - }
|
| - let authStart = index;
|
| - let lastColon = -1;
|
| - let lastAt = -1;
|
| - char = uri[dartx.codeUnitAt](index);
|
| - while (dart.notNull(index) < dart.notNull(end)) {
|
| - char = uri[dartx.codeUnitAt](index);
|
| - if (char == core.Uri._SLASH || char == core.Uri._QUESTION || char == core.Uri._NUMBER_SIGN) {
|
| - break;
|
| - }
|
| - if (char == core.Uri._AT_SIGN) {
|
| - lastAt = index;
|
| - lastColon = -1;
|
| - } else if (char == core.Uri._COLON) {
|
| - lastColon = index;
|
| - } else if (char == core.Uri._LEFT_BRACKET) {
|
| - lastColon = -1;
|
| - let endBracket = uri[dartx.indexOf](']', dart.notNull(index) + 1);
|
| - if (endBracket == -1) {
|
| - index = end;
|
| - char = EOI;
|
| - break;
|
| - } else {
|
| - index = endBracket;
|
| - }
|
| - }
|
| - index = dart.notNull(index) + 1;
|
| - char = EOI;
|
| - }
|
| - let hostStart = authStart;
|
| - let hostEnd = index;
|
| - if (dart.notNull(lastAt) >= 0) {
|
| - userinfo = core.Uri._makeUserInfo(uri, authStart, lastAt);
|
| - hostStart = dart.notNull(lastAt) + 1;
|
| - }
|
| - if (dart.notNull(lastColon) >= 0) {
|
| - let portNumber = null;
|
| - if (dart.notNull(lastColon) + 1 < dart.notNull(index)) {
|
| - portNumber = 0;
|
| - for (let i = dart.notNull(lastColon) + 1; i < dart.notNull(index); i++) {
|
| - let digit = uri[dartx.codeUnitAt](i);
|
| - if (core.Uri._ZERO > dart.notNull(digit) || core.Uri._NINE < dart.notNull(digit)) {
|
| - core.Uri._fail(uri, i, "Invalid port number");
|
| - }
|
| - portNumber = dart.notNull(portNumber) * 10 + (dart.notNull(digit) - core.Uri._ZERO);
|
| - }
|
| - }
|
| - port = core.Uri._makePort(portNumber, scheme);
|
| - hostEnd = lastColon;
|
| - }
|
| - host = core.Uri._makeHost(uri, hostStart, hostEnd, true);
|
| - if (dart.notNull(index) < dart.notNull(end)) {
|
| - char = uri[dartx.codeUnitAt](index);
|
| - }
|
| - }
|
| - dart.fn(parseAuth, VoidTovoid());
|
| - let NOT_IN_PATH = 0;
|
| - let IN_PATH = 1;
|
| - let ALLOW_AUTH = 2;
|
| - let state = NOT_IN_PATH;
|
| - let i = index;
|
| - while (dart.notNull(i) < dart.notNull(end)) {
|
| - char = uri[dartx.codeUnitAt](i);
|
| - if (char == core.Uri._QUESTION || char == core.Uri._NUMBER_SIGN) {
|
| - state = NOT_IN_PATH;
|
| - break;
|
| - }
|
| - if (char == core.Uri._SLASH) {
|
| - state = i == start ? ALLOW_AUTH : IN_PATH;
|
| - break;
|
| - }
|
| - if (char == core.Uri._COLON) {
|
| - if (i == start) core.Uri._fail(uri, start, "Invalid empty scheme");
|
| - scheme = core.Uri._makeScheme(uri, start, i);
|
| - i = dart.notNull(i) + 1;
|
| - pathStart = i;
|
| - if (i == end) {
|
| - char = EOI;
|
| - state = NOT_IN_PATH;
|
| - } else {
|
| - char = uri[dartx.codeUnitAt](i);
|
| - if (char == core.Uri._QUESTION || char == core.Uri._NUMBER_SIGN) {
|
| - state = NOT_IN_PATH;
|
| - } else if (char == core.Uri._SLASH) {
|
| - state = ALLOW_AUTH;
|
| - } else {
|
| - state = IN_PATH;
|
| + return this[_fragment] != null ? this[_fragment] : "";
|
| + }
|
| + isScheme(scheme) {
|
| + let thisScheme = this.scheme;
|
| + if (scheme == null) return thisScheme[dartx.isEmpty];
|
| + if (scheme[dartx.length] != thisScheme[dartx.length]) return false;
|
| + return core._Uri._compareScheme(scheme, thisScheme);
|
| + }
|
| + static _compareScheme(scheme, uri) {
|
| + for (let i = 0; i < dart.notNull(scheme[dartx.length]); i++) {
|
| + let schemeChar = scheme[dartx.codeUnitAt](i);
|
| + let uriChar = uri[dartx.codeUnitAt](i);
|
| + let delta = (dart.notNull(schemeChar) ^ dart.notNull(uriChar)) >>> 0;
|
| + if (delta != 0) {
|
| + if (delta == 32) {
|
| + let lowerChar = (dart.notNull(uriChar) | delta) >>> 0;
|
| + if (97 <= lowerChar && lowerChar <= 122) {
|
| + continue;
|
| }
|
| }
|
| - break;
|
| - }
|
| - i = dart.notNull(i) + 1;
|
| - char = EOI;
|
| - }
|
| - index = i;
|
| - if (state == ALLOW_AUTH) {
|
| - dart.assert(char == core.Uri._SLASH);
|
| - index = dart.notNull(index) + 1;
|
| - if (index == end) {
|
| - char = EOI;
|
| - state = NOT_IN_PATH;
|
| - } else {
|
| - char = uri[dartx.codeUnitAt](index);
|
| - if (char == core.Uri._SLASH) {
|
| - index = dart.notNull(index) + 1;
|
| - parseAuth();
|
| - pathStart = index;
|
| - }
|
| - if (char == core.Uri._QUESTION || char == core.Uri._NUMBER_SIGN || char == EOI) {
|
| - state = NOT_IN_PATH;
|
| - } else {
|
| - state = IN_PATH;
|
| - }
|
| - }
|
| - }
|
| - dart.assert(state == IN_PATH || state == NOT_IN_PATH);
|
| - if (state == IN_PATH) {
|
| - while ((index = dart.notNull(index) + 1) < dart.notNull(end)) {
|
| - char = uri[dartx.codeUnitAt](index);
|
| - if (char == core.Uri._QUESTION || char == core.Uri._NUMBER_SIGN) {
|
| - break;
|
| - }
|
| - char = EOI;
|
| - }
|
| - state = NOT_IN_PATH;
|
| - }
|
| - dart.assert(state == NOT_IN_PATH);
|
| - let hasAuthority = host != null;
|
| - path = core.Uri._makePath(uri, pathStart, index, null, scheme, hasAuthority);
|
| - if (char == core.Uri._QUESTION) {
|
| - let numberSignIndex = -1;
|
| - for (let i = dart.notNull(index) + 1; i < dart.notNull(end); i++) {
|
| - if (uri[dartx.codeUnitAt](i) == core.Uri._NUMBER_SIGN) {
|
| - numberSignIndex = i;
|
| - break;
|
| - }
|
| - }
|
| - if (numberSignIndex < 0) {
|
| - query = core.Uri._makeQuery(uri, dart.notNull(index) + 1, end, null);
|
| - } else {
|
| - query = core.Uri._makeQuery(uri, dart.notNull(index) + 1, numberSignIndex, null);
|
| - fragment = core.Uri._makeFragment(uri, numberSignIndex + 1, end);
|
| + return false;
|
| }
|
| - } else if (char == core.Uri._NUMBER_SIGN) {
|
| - fragment = core.Uri._makeFragment(uri, dart.notNull(index) + 1, end);
|
| }
|
| - return new core.Uri._internal(scheme, userinfo, host, port, path, query, fragment);
|
| + return true;
|
| }
|
| static _fail(uri, index, message) {
|
| dart.throw(new core.FormatException(message, uri, index));
|
| @@ -35122,7 +35340,8 @@ core.Uri = class Uri extends core.Object {
|
| let hostStart = 0;
|
| let hasUserInfo = false;
|
| for (let i = 0; i < dart.notNull(authority[dartx.length]); i++) {
|
| - if (authority[dartx.codeUnitAt](i) == core.Uri._AT_SIGN) {
|
| + let atSign = 64;
|
| + if (authority[dartx.codeUnitAt](i) == atSign) {
|
| hasUserInfo = true;
|
| userInfo = authority[dartx.substring](0, i);
|
| hostStart = i + 1;
|
| @@ -35130,22 +35349,22 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| }
|
| let hostEnd = hostStart;
|
| - if (hostStart < dart.notNull(authority[dartx.length]) && authority[dartx.codeUnitAt](hostStart) == core.Uri._LEFT_BRACKET) {
|
| + if (hostStart < dart.notNull(authority[dartx.length]) && authority[dartx.codeUnitAt](hostStart) == core._LEFT_BRACKET) {
|
| for (; hostEnd < dart.notNull(authority[dartx.length]); hostEnd++) {
|
| - if (authority[dartx.codeUnitAt](hostEnd) == core.Uri._RIGHT_BRACKET) break;
|
| + if (authority[dartx.codeUnitAt](hostEnd) == core._RIGHT_BRACKET) break;
|
| }
|
| if (hostEnd == authority[dartx.length]) {
|
| dart.throw(new core.FormatException("Invalid IPv6 host entry.", authority, hostStart));
|
| }
|
| core.Uri.parseIPv6Address(authority, hostStart + 1, hostEnd);
|
| hostEnd++;
|
| - if (hostEnd != authority[dartx.length] && authority[dartx.codeUnitAt](hostEnd) != core.Uri._COLON) {
|
| + if (hostEnd != authority[dartx.length] && authority[dartx.codeUnitAt](hostEnd) != core._COLON) {
|
| dart.throw(new core.FormatException("Invalid end of authority", authority, hostEnd));
|
| }
|
| }
|
| let hasPort = false;
|
| for (; hostEnd < dart.notNull(authority[dartx.length]); hostEnd++) {
|
| - if (authority[dartx.codeUnitAt](hostEnd) == core.Uri._COLON) {
|
| + if (authority[dartx.codeUnitAt](hostEnd) == core._COLON) {
|
| let portString = authority[dartx.substring](hostEnd + 1);
|
| if (dart.test(portString[dartx.isNotEmpty])) port = core.int.parse(portString);
|
| break;
|
| @@ -35157,33 +35376,13 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| static file(path, opts) {
|
| let windows = opts && 'windows' in opts ? opts.windows : null;
|
| - windows = windows == null ? core.Uri._isWindows : windows;
|
| - return core.Uri._check(dart.test(windows) ? core.Uri._makeWindowsFileUrl(path, false) : core.Uri._makeFileUri(path, false));
|
| + windows = windows == null ? core._Uri._isWindows : windows;
|
| + return core._Uri._check(dart.test(windows) ? core._Uri._makeWindowsFileUrl(path, false) : core._Uri._makeFileUri(path, false));
|
| }
|
| static directory(path, opts) {
|
| let windows = opts && 'windows' in opts ? opts.windows : null;
|
| - windows = windows == null ? core.Uri._isWindows : windows;
|
| - return core.Uri._check(dart.test(windows) ? core.Uri._makeWindowsFileUrl(path, true) : core.Uri._makeFileUri(path, true));
|
| - }
|
| - static dataFromString(content, opts) {
|
| - let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null;
|
| - let encoding = opts && 'encoding' in opts ? opts.encoding : null;
|
| - let parameters = opts && 'parameters' in opts ? opts.parameters : null;
|
| - let base64 = opts && 'base64' in opts ? opts.base64 : false;
|
| - let data = core.UriData.fromString(content, {mimeType: mimeType, encoding: encoding, parameters: parameters, base64: base64});
|
| - return data.uri;
|
| - }
|
| - static dataFromBytes(bytes, opts) {
|
| - let mimeType = opts && 'mimeType' in opts ? opts.mimeType : "application/octet-stream";
|
| - let parameters = opts && 'parameters' in opts ? opts.parameters : null;
|
| - let percentEncoded = opts && 'percentEncoded' in opts ? opts.percentEncoded : false;
|
| - let data = core.UriData.fromBytes(bytes, {mimeType: mimeType, parameters: parameters, percentEncoded: percentEncoded});
|
| - return data.uri;
|
| - }
|
| - static get base() {
|
| - let uri = _js_helper.Primitives.currentUri();
|
| - if (uri != null) return core.Uri.parse(uri);
|
| - dart.throw(new core.UnsupportedError("'Uri.base' is not supported"));
|
| + windows = windows == null ? core._Uri._isWindows : windows;
|
| + return core._Uri._check(dart.test(windows) ? core._Uri._makeWindowsFileUrl(path, true) : core._Uri._makeFileUri(path, true));
|
| }
|
| static get _isWindows() {
|
| return false;
|
| @@ -35212,7 +35411,7 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| }
|
| static _checkWindowsDriveLetter(charCode, argumentError) {
|
| - if (core.Uri._UPPER_CASE_A <= dart.notNull(charCode) && dart.notNull(charCode) <= core.Uri._UPPER_CASE_Z || core.Uri._LOWER_CASE_A <= dart.notNull(charCode) && dart.notNull(charCode) <= core.Uri._LOWER_CASE_Z) {
|
| + if (core._UPPER_CASE_A <= dart.notNull(charCode) && dart.notNull(charCode) <= core._UPPER_CASE_Z || core._LOWER_CASE_A <= dart.notNull(charCode) && dart.notNull(charCode) <= core._LOWER_CASE_Z) {
|
| return;
|
| }
|
| if (dart.test(argumentError)) {
|
| @@ -35239,7 +35438,7 @@ core.Uri = class Uri extends core.Object {
|
| path = path[dartx.replaceRange](0, 7, '\\');
|
| } else {
|
| path = path[dartx.substring](4);
|
| - if (dart.notNull(path[dartx.length]) < 3 || path[dartx.codeUnitAt](1) != core.Uri._COLON || path[dartx.codeUnitAt](2) != core.Uri._BACKSLASH) {
|
| + if (dart.notNull(path[dartx.length]) < 3 || path[dartx.codeUnitAt](1) != core._COLON || path[dartx.codeUnitAt](2) != core._BACKSLASH) {
|
| dart.throw(new core.ArgumentError("Windows paths with \\\\?\\ prefix must be absolute"));
|
| }
|
| }
|
| @@ -35247,16 +35446,16 @@ core.Uri = class Uri extends core.Object {
|
| path = path[dartx.replaceAll]("/", '\\');
|
| }
|
| let sep = '\\';
|
| - if (dart.notNull(path[dartx.length]) > 1 && path[dartx.codeUnitAt](1) == core.Uri._COLON) {
|
| - core.Uri._checkWindowsDriveLetter(path[dartx.codeUnitAt](0), true);
|
| - if (path[dartx.length] == 2 || path[dartx.codeUnitAt](2) != core.Uri._BACKSLASH) {
|
| + if (dart.notNull(path[dartx.length]) > 1 && path[dartx.codeUnitAt](1) == core._COLON) {
|
| + core._Uri._checkWindowsDriveLetter(path[dartx.codeUnitAt](0), true);
|
| + if (path[dartx.length] == 2 || path[dartx.codeUnitAt](2) != core._BACKSLASH) {
|
| dart.throw(new core.ArgumentError("Windows paths with drive letter must be absolute"));
|
| }
|
| let pathSegments = path[dartx.split](sep);
|
| if (dart.test(slashTerminated) && dart.test(pathSegments[dartx.last][dartx.isNotEmpty])) {
|
| pathSegments[dartx.add]("");
|
| }
|
| - core.Uri._checkWindowsPathReservedCharacters(pathSegments, true, 1);
|
| + core._Uri._checkWindowsPathReservedCharacters(pathSegments, true, 1);
|
| return core.Uri.new({scheme: "file", pathSegments: pathSegments});
|
| }
|
| if (dart.test(path[dartx.startsWith](sep))) {
|
| @@ -35265,7 +35464,7 @@ core.Uri = class Uri extends core.Object {
|
| let hostPart = dart.notNull(pathStart) < 0 ? path[dartx.substring](2) : path[dartx.substring](2, pathStart);
|
| let pathPart = dart.notNull(pathStart) < 0 ? "" : path[dartx.substring](dart.notNull(pathStart) + 1);
|
| let pathSegments = pathPart[dartx.split](sep);
|
| - core.Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| + core._Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| if (dart.test(slashTerminated) && dart.test(pathSegments[dartx.last][dartx.isNotEmpty])) {
|
| pathSegments[dartx.add]("");
|
| }
|
| @@ -35275,12 +35474,12 @@ core.Uri = class Uri extends core.Object {
|
| if (dart.test(slashTerminated) && dart.test(pathSegments[dartx.last][dartx.isNotEmpty])) {
|
| pathSegments[dartx.add]("");
|
| }
|
| - core.Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| + core._Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| return core.Uri.new({scheme: "file", pathSegments: pathSegments});
|
| }
|
| } else {
|
| let pathSegments = path[dartx.split](sep);
|
| - core.Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| + core._Uri._checkWindowsPathReservedCharacters(pathSegments, true);
|
| if (dart.test(slashTerminated) && dart.test(pathSegments[dartx.isNotEmpty]) && dart.test(pathSegments[dartx.last][dartx.isNotEmpty])) {
|
| pathSegments[dartx.add]("");
|
| }
|
| @@ -35299,27 +35498,27 @@ core.Uri = class Uri extends core.Object {
|
| let fragment = opts && 'fragment' in opts ? opts.fragment : null;
|
| let schemeChanged = false;
|
| if (scheme != null) {
|
| - scheme = core.Uri._makeScheme(scheme, 0, scheme[dartx.length]);
|
| - schemeChanged = true;
|
| + scheme = core._Uri._makeScheme(scheme, 0, scheme[dartx.length]);
|
| + schemeChanged = scheme != this.scheme;
|
| } else {
|
| scheme = this.scheme;
|
| }
|
| let isFile = scheme == "file";
|
| if (userInfo != null) {
|
| - userInfo = core.Uri._makeUserInfo(userInfo, 0, userInfo[dartx.length]);
|
| + userInfo = core._Uri._makeUserInfo(userInfo, 0, userInfo[dartx.length]);
|
| } else {
|
| userInfo = this[_userInfo];
|
| }
|
| if (port != null) {
|
| - port = core.Uri._makePort(port, scheme);
|
| + port = core._Uri._makePort(port, scheme);
|
| } else {
|
| port = this[_port];
|
| if (schemeChanged) {
|
| - port = core.Uri._makePort(port, scheme);
|
| + port = core._Uri._makePort(port, scheme);
|
| }
|
| }
|
| if (host != null) {
|
| - host = core.Uri._makeHost(host, 0, host[dartx.length], false);
|
| + host = core._Uri._makeHost(host, 0, host[dartx.length], false);
|
| } else if (dart.test(this.hasAuthority)) {
|
| host = this[_host];
|
| } else if (dart.test(userInfo[dartx.isNotEmpty]) || port != null || isFile) {
|
| @@ -35327,7 +35526,7 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| let hasAuthority = host != null;
|
| if (path != null || pathSegments != null) {
|
| - path = core.Uri._makePath(path, 0, core.Uri._stringOrNullLength(path), pathSegments, scheme, hasAuthority);
|
| + path = core._Uri._makePath(path, 0, core._stringOrNullLength(path), pathSegments, scheme, hasAuthority);
|
| } else {
|
| path = this[_path];
|
| if ((isFile || hasAuthority && !dart.test(path[dartx.isEmpty])) && !dart.test(path[dartx.startsWith]('/'))) {
|
| @@ -35335,26 +35534,26 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| }
|
| if (query != null || queryParameters != null) {
|
| - query = core.Uri._makeQuery(query, 0, core.Uri._stringOrNullLength(query), queryParameters);
|
| + query = core._Uri._makeQuery(query, 0, core._stringOrNullLength(query), queryParameters);
|
| } else {
|
| query = this[_query];
|
| }
|
| if (fragment != null) {
|
| - fragment = core.Uri._makeFragment(fragment, 0, fragment[dartx.length]);
|
| + fragment = core._Uri._makeFragment(fragment, 0, fragment[dartx.length]);
|
| } else {
|
| fragment = this[_fragment];
|
| }
|
| - return new core.Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| + return new core._Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| }
|
| removeFragment() {
|
| if (!dart.test(this.hasFragment)) return this;
|
| - return new core.Uri._internal(this.scheme, this[_userInfo], this[_host], this[_port], this[_path], this[_query], null);
|
| + return new core._Uri._internal(this.scheme, this[_userInfo], this[_host], this[_port], this[_path], this[_query], null);
|
| }
|
| get pathSegments() {
|
| let result = this[_pathSegments];
|
| if (result != null) return result;
|
| let pathToSplit = this.path;
|
| - if (dart.test(pathToSplit[dartx.isNotEmpty]) && pathToSplit[dartx.codeUnitAt](0) == core.Uri._SLASH) {
|
| + if (dart.test(pathToSplit[dartx.isNotEmpty]) && pathToSplit[dartx.codeUnitAt](0) == core._SLASH) {
|
| pathToSplit = pathToSplit[dartx.substring](1);
|
| }
|
| result = pathToSplit == "" ? const || (const = dart.constList([], core.String)) : ListOfString().unmodifiable(pathToSplit[dartx.split]("/")[dartx.map](core.String)(core.Uri.decodeComponent));
|
| @@ -35369,7 +35568,7 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| get queryParametersAll() {
|
| if (this[_queryParameterLists] == null) {
|
| - let queryParameterLists = core.Uri._splitQueryStringAll(this.query);
|
| + let queryParameterLists = core._Uri._splitQueryStringAll(this.query);
|
| for (let key of queryParameterLists[dartx.keys]) {
|
| queryParameterLists[dartx._set](key, ListOfString().unmodifiable(core.Iterable._check(queryParameterLists[dartx._get](key))));
|
| }
|
| @@ -35378,36 +35577,36 @@ core.Uri = class Uri extends core.Object {
|
| return this[_queryParameterLists];
|
| }
|
| normalizePath() {
|
| - let path = core.Uri._normalizePath(this[_path], this.scheme, this.hasAuthority);
|
| + let path = core._Uri._normalizePath(this[_path], this.scheme, this.hasAuthority);
|
| if (core.identical(path, this[_path])) return this;
|
| return this.replace({path: path});
|
| }
|
| static _makePort(port, scheme) {
|
| - if (port != null && port == core.Uri._defaultPort(scheme)) return null;
|
| + if (port != null && port == core._Uri._defaultPort(scheme)) return null;
|
| return port;
|
| }
|
| static _makeHost(host, start, end, strictIPv6) {
|
| if (host == null) return null;
|
| if (start == end) return "";
|
| - if (host[dartx.codeUnitAt](start) == core.Uri._LEFT_BRACKET) {
|
| - if (host[dartx.codeUnitAt](dart.notNull(end) - 1) != core.Uri._RIGHT_BRACKET) {
|
| - core.Uri._fail(host, start, 'Missing end `]` to match `[` in host');
|
| + if (host[dartx.codeUnitAt](start) == core._LEFT_BRACKET) {
|
| + if (host[dartx.codeUnitAt](dart.notNull(end) - 1) != core._RIGHT_BRACKET) {
|
| + core._Uri._fail(host, start, 'Missing end `]` to match `[` in host');
|
| }
|
| core.Uri.parseIPv6Address(host, dart.notNull(start) + 1, dart.notNull(end) - 1);
|
| return host[dartx.substring](start, end)[dartx.toLowerCase]();
|
| }
|
| if (!dart.test(strictIPv6)) {
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| - if (host[dartx.codeUnitAt](i) == core.Uri._COLON) {
|
| + if (host[dartx.codeUnitAt](i) == core._COLON) {
|
| core.Uri.parseIPv6Address(host, start, end);
|
| return dart.str`[${host}]`;
|
| }
|
| }
|
| }
|
| - return core.Uri._normalizeRegName(host, start, end);
|
| + return core._Uri._normalizeRegName(host, start, end);
|
| }
|
| static _isRegNameChar(char) {
|
| - return dart.notNull(char) < 127 && (dart.notNull(core.Uri._regNameTable[dartx._get](char[dartx['>>']](4))) & 1 << (dart.notNull(char) & 15)) != 0;
|
| + return dart.notNull(char) < 127 && (dart.notNull(core._Uri._regNameTable[dartx._get](char[dartx['>>']](4))) & 1 << (dart.notNull(char) & 15)) != 0;
|
| }
|
| static _normalizeRegName(host, start, end) {
|
| let buffer = null;
|
| @@ -35416,8 +35615,8 @@ core.Uri = class Uri extends core.Object {
|
| let isNormalized = true;
|
| while (dart.notNull(index) < dart.notNull(end)) {
|
| let char = host[dartx.codeUnitAt](index);
|
| - if (char == core.Uri._PERCENT) {
|
| - let replacement = core.Uri._normalizeEscape(host, index, true);
|
| + if (char == core._PERCENT) {
|
| + let replacement = core._Uri._normalizeEscape(host, index, true);
|
| if (replacement == null && isNormalized) {
|
| index = dart.notNull(index) + 3;
|
| continue;
|
| @@ -35437,8 +35636,8 @@ core.Uri = class Uri extends core.Object {
|
| index = dart.notNull(index) + sourceLength;
|
| sectionStart = index;
|
| isNormalized = true;
|
| - } else if (dart.test(core.Uri._isRegNameChar(char))) {
|
| - if (isNormalized && core.Uri._UPPER_CASE_A <= dart.notNull(char) && core.Uri._UPPER_CASE_Z >= dart.notNull(char)) {
|
| + } else if (dart.test(core._Uri._isRegNameChar(char))) {
|
| + if (isNormalized && core._UPPER_CASE_A <= dart.notNull(char) && core._UPPER_CASE_Z >= dart.notNull(char)) {
|
| if (buffer == null) buffer = new core.StringBuffer();
|
| if (dart.notNull(sectionStart) < dart.notNull(index)) {
|
| buffer.write(host[dartx.substring](sectionStart, index));
|
| @@ -35447,8 +35646,8 @@ core.Uri = class Uri extends core.Object {
|
| isNormalized = false;
|
| }
|
| index = dart.notNull(index) + 1;
|
| - } else if (dart.test(core.Uri._isGeneralDelimiter(char))) {
|
| - core.Uri._fail(host, index, "Invalid character");
|
| + } else if (dart.test(core._Uri._isGeneralDelimiter(char))) {
|
| + core._Uri._fail(host, index, "Invalid character");
|
| } else {
|
| let sourceLength = 1;
|
| if ((dart.notNull(char) & 64512) == 55296 && dart.notNull(index) + 1 < dart.notNull(end)) {
|
| @@ -35462,7 +35661,7 @@ core.Uri = class Uri extends core.Object {
|
| let slice = host[dartx.substring](sectionStart, index);
|
| if (!isNormalized) slice = slice[dartx.toLowerCase]();
|
| buffer.write(slice);
|
| - buffer.write(core.Uri._escapeChar(char));
|
| + buffer.write(core._Uri._escapeChar(char));
|
| index = dart.notNull(index) + sourceLength;
|
| sectionStart = index;
|
| }
|
| @@ -35478,26 +35677,33 @@ core.Uri = class Uri extends core.Object {
|
| static _makeScheme(scheme, start, end) {
|
| if (start == end) return "";
|
| let firstCodeUnit = scheme[dartx.codeUnitAt](start);
|
| - if (!dart.test(core.Uri._isAlphabeticCharacter(firstCodeUnit))) {
|
| - core.Uri._fail(scheme, start, "Scheme not starting with alphabetic character");
|
| + if (!dart.test(core._Uri._isAlphabeticCharacter(firstCodeUnit))) {
|
| + core._Uri._fail(scheme, start, "Scheme not starting with alphabetic character");
|
| }
|
| let containsUpperCase = false;
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| let codeUnit = scheme[dartx.codeUnitAt](i);
|
| - if (!dart.test(core.Uri._isSchemeCharacter(codeUnit))) {
|
| - core.Uri._fail(scheme, i, "Illegal scheme character");
|
| + if (!dart.test(core._Uri._isSchemeCharacter(codeUnit))) {
|
| + core._Uri._fail(scheme, i, "Illegal scheme character");
|
| }
|
| - if (core.Uri._UPPER_CASE_A <= dart.notNull(codeUnit) && dart.notNull(codeUnit) <= core.Uri._UPPER_CASE_Z) {
|
| + if (core._UPPER_CASE_A <= dart.notNull(codeUnit) && dart.notNull(codeUnit) <= core._UPPER_CASE_Z) {
|
| containsUpperCase = true;
|
| }
|
| }
|
| scheme = scheme[dartx.substring](start, end);
|
| if (containsUpperCase) scheme = scheme[dartx.toLowerCase]();
|
| + return core._Uri._canonicalizeScheme(scheme);
|
| + }
|
| + static _canonicalizeScheme(scheme) {
|
| + if (scheme == "http") return "http";
|
| + if (scheme == "file") return "file";
|
| + if (scheme == "https") return "https";
|
| + if (scheme == "package") return "package";
|
| return scheme;
|
| }
|
| static _makeUserInfo(userInfo, start, end) {
|
| if (userInfo == null) return "";
|
| - return core.Uri._normalize(userInfo, start, end, core.Uri._userinfoTable);
|
| + return core._Uri._normalize(userInfo, start, end, core._Uri._userinfoTable);
|
| }
|
| static _makePath(path, start, end, pathSegments, scheme, hasAuthority) {
|
| let isFile = scheme == "file";
|
| @@ -35508,30 +35714,32 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| let result = null;
|
| if (path != null) {
|
| - result = core.Uri._normalize(path, start, end, core.Uri._pathCharOrSlashTable);
|
| + result = core._Uri._normalize(path, start, end, core._Uri._pathCharOrSlashTable);
|
| } else {
|
| - result = pathSegments[dartx.map](core.String)(dart.fn(s => core.Uri._uriEncode(core.Uri._pathCharTable, s, convert.UTF8, false), StringToString()))[dartx.join]("/");
|
| + result = pathSegments[dartx.map](core.String)(dart.fn(s => core._Uri._uriEncode(core._Uri._pathCharTable, s, convert.UTF8, false), StringToString()))[dartx.join]("/");
|
| }
|
| if (dart.test(dart.dload(result, 'isEmpty'))) {
|
| if (isFile) return "/";
|
| } else if (ensureLeadingSlash && !dart.test(dart.dsend(result, 'startsWith', '/'))) {
|
| result = "/" + dart.notNull(core.String._check(result));
|
| }
|
| - result = core.Uri._normalizePath(core.String._check(result), scheme, hasAuthority);
|
| + result = core._Uri._normalizePath(core.String._check(result), scheme, hasAuthority);
|
| return core.String._check(result);
|
| }
|
| static _normalizePath(path, scheme, hasAuthority) {
|
| if (dart.test(scheme[dartx.isEmpty]) && !dart.test(hasAuthority) && !dart.test(path[dartx.startsWith]('/'))) {
|
| - return core.Uri._normalizeRelativePath(path);
|
| + return core._Uri._normalizeRelativePath(path, dart.test(scheme[dartx.isNotEmpty]) || dart.test(hasAuthority));
|
| }
|
| - return core.Uri._removeDotSegments(path);
|
| + return core._Uri._removeDotSegments(path);
|
| }
|
| static _makeQuery(query, start, end, queryParameters) {
|
| - if (query == null && queryParameters == null) return null;
|
| - if (query != null && queryParameters != null) {
|
| - dart.throw(new core.ArgumentError('Both query and queryParameters specified'));
|
| + if (query != null) {
|
| + if (queryParameters != null) {
|
| + dart.throw(new core.ArgumentError('Both query and queryParameters specified'));
|
| + }
|
| + return core._Uri._normalize(query, start, end, core._Uri._queryCharTable);
|
| }
|
| - if (query != null) return core.Uri._normalize(query, start, end, core.Uri._queryCharTable);
|
| + if (queryParameters == null) return null;
|
| let result = new core.StringBuffer();
|
| let separator = "";
|
| function writeParameter(key, value) {
|
| @@ -35559,41 +35767,39 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| static _makeFragment(fragment, start, end) {
|
| if (fragment == null) return null;
|
| - return core.Uri._normalize(fragment, start, end, core.Uri._queryCharTable);
|
| - }
|
| - static _stringOrNullLength(s) {
|
| - return s == null ? 0 : s[dartx.length];
|
| + return core._Uri._normalize(fragment, start, end, core._Uri._queryCharTable);
|
| }
|
| static _normalizeEscape(source, index, lowerCase) {
|
| - dart.assert(source[dartx.codeUnitAt](index) == core.Uri._PERCENT);
|
| + dart.assert(source[dartx.codeUnitAt](index) == core._PERCENT);
|
| if (dart.notNull(index) + 2 >= dart.notNull(source[dartx.length])) {
|
| return "%";
|
| }
|
| let firstDigit = source[dartx.codeUnitAt](dart.notNull(index) + 1);
|
| let secondDigit = source[dartx.codeUnitAt](dart.notNull(index) + 2);
|
| - let firstDigitValue = core.Uri._parseHexDigit(firstDigit);
|
| - let secondDigitValue = core.Uri._parseHexDigit(secondDigit);
|
| + let firstDigitValue = core._Uri._parseHexDigit(firstDigit);
|
| + let secondDigitValue = core._Uri._parseHexDigit(secondDigit);
|
| if (dart.notNull(firstDigitValue) < 0 || dart.notNull(secondDigitValue) < 0) {
|
| return "%";
|
| }
|
| let value = dart.notNull(firstDigitValue) * 16 + dart.notNull(secondDigitValue);
|
| - if (dart.test(core.Uri._isUnreservedChar(value))) {
|
| - if (dart.test(lowerCase) && core.Uri._UPPER_CASE_A <= value && core.Uri._UPPER_CASE_Z >= value) {
|
| + if (dart.test(core._Uri._isUnreservedChar(value))) {
|
| + if (dart.test(lowerCase) && core._UPPER_CASE_A <= value && core._UPPER_CASE_Z >= value) {
|
| value = (value | 32) >>> 0;
|
| }
|
| return core.String.fromCharCode(value);
|
| }
|
| - if (dart.notNull(firstDigit) >= core.Uri._LOWER_CASE_A || dart.notNull(secondDigit) >= core.Uri._LOWER_CASE_A) {
|
| + if (dart.notNull(firstDigit) >= core._LOWER_CASE_A || dart.notNull(secondDigit) >= core._LOWER_CASE_A) {
|
| return source[dartx.substring](index, dart.notNull(index) + 3)[dartx.toUpperCase]();
|
| }
|
| return null;
|
| }
|
| static _parseHexDigit(char) {
|
| - let digit = (dart.notNull(char) ^ core.Uri._ZERO) >>> 0;
|
| + let zeroDigit = 48;
|
| + let digit = (dart.notNull(char) ^ zeroDigit) >>> 0;
|
| if (digit <= 9) return digit;
|
| let lowerCase = (dart.notNull(char) | 32) >>> 0;
|
| - if (core.Uri._LOWER_CASE_A <= lowerCase && lowerCase <= core.Uri._LOWER_CASE_F) {
|
| - return lowerCase - (core.Uri._LOWER_CASE_A - 10);
|
| + if (core._LOWER_CASE_A <= lowerCase && lowerCase <= core._LOWER_CASE_F) {
|
| + return lowerCase - (core._LOWER_CASE_A - 10);
|
| }
|
| return -1;
|
| }
|
| @@ -35602,9 +35808,9 @@ core.Uri = class Uri extends core.Object {
|
| let codeUnits = null;
|
| if (dart.notNull(char) < 128) {
|
| codeUnits = ListOfint().new(3);
|
| - codeUnits[dartx._set](0, core.Uri._PERCENT);
|
| - codeUnits[dartx._set](1, core.Uri._hexDigits[dartx.codeUnitAt](char[dartx['>>']](4)));
|
| - codeUnits[dartx._set](2, core.Uri._hexDigits[dartx.codeUnitAt](dart.notNull(char) & 15));
|
| + codeUnits[dartx._set](0, core._PERCENT);
|
| + codeUnits[dartx._set](1, core._hexDigits[dartx.codeUnitAt](char[dartx['>>']](4)));
|
| + codeUnits[dartx._set](2, core._hexDigits[dartx.codeUnitAt](dart.notNull(char) & 15));
|
| } else {
|
| let flag = 192;
|
| let encodedBytes = 2;
|
| @@ -35620,9 +35826,9 @@ core.Uri = class Uri extends core.Object {
|
| let index = 0;
|
| while (--encodedBytes >= 0) {
|
| let byte = (char[dartx['>>']](6 * encodedBytes) & 63 | flag) >>> 0;
|
| - codeUnits[dartx._set](index, core.Uri._PERCENT);
|
| - codeUnits[dartx._set](index + 1, core.Uri._hexDigits[dartx.codeUnitAt](byte[dartx['>>']](4)));
|
| - codeUnits[dartx._set](index + 2, core.Uri._hexDigits[dartx.codeUnitAt](byte & 15));
|
| + codeUnits[dartx._set](index, core._PERCENT);
|
| + codeUnits[dartx._set](index + 1, core._hexDigits[dartx.codeUnitAt](byte[dartx['>>']](4)));
|
| + codeUnits[dartx._set](index + 2, core._hexDigits[dartx.codeUnitAt](byte & 15));
|
| index = index + 3;
|
| flag = 128;
|
| }
|
| @@ -35640,8 +35846,8 @@ core.Uri = class Uri extends core.Object {
|
| } else {
|
| let replacement = null;
|
| let sourceLength = null;
|
| - if (char == core.Uri._PERCENT) {
|
| - replacement = core.Uri._normalizeEscape(component, index, false);
|
| + if (char == core._PERCENT) {
|
| + replacement = core._Uri._normalizeEscape(component, index, false);
|
| if (replacement == null) {
|
| index = dart.notNull(index) + 3;
|
| continue;
|
| @@ -35652,8 +35858,8 @@ core.Uri = class Uri extends core.Object {
|
| } else {
|
| sourceLength = 3;
|
| }
|
| - } else if (dart.test(core.Uri._isGeneralDelimiter(char))) {
|
| - core.Uri._fail(component, index, "Invalid character");
|
| + } else if (dart.test(core._Uri._isGeneralDelimiter(char))) {
|
| + core._Uri._fail(component, index, "Invalid character");
|
| } else {
|
| sourceLength = 1;
|
| if ((dart.notNull(char) & 64512) == 55296) {
|
| @@ -35665,7 +35871,7 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| }
|
| }
|
| - replacement = core.Uri._escapeChar(char);
|
| + replacement = core._Uri._escapeChar(char);
|
| }
|
| if (buffer == null) buffer = new core.StringBuffer();
|
| buffer.write(component[dartx.substring](sectionStart, index));
|
| @@ -35683,10 +35889,10 @@ core.Uri = class Uri extends core.Object {
|
| return dart.toString(buffer);
|
| }
|
| static _isSchemeCharacter(ch) {
|
| - return dart.notNull(ch) < 128 && (dart.notNull(core.Uri._schemeTable[dartx._get](ch[dartx['>>']](4))) & 1 << (dart.notNull(ch) & 15)) != 0;
|
| + return dart.notNull(ch) < 128 && (dart.notNull(core._Uri._schemeTable[dartx._get](ch[dartx['>>']](4))) & 1 << (dart.notNull(ch) & 15)) != 0;
|
| }
|
| static _isGeneralDelimiter(ch) {
|
| - return dart.notNull(ch) <= core.Uri._RIGHT_BRACKET && (dart.notNull(core.Uri._genDelimitersTable[dartx._get](ch[dartx['>>']](4))) & 1 << (dart.notNull(ch) & 15)) != 0;
|
| + return dart.notNull(ch) <= core._RIGHT_BRACKET && (dart.notNull(core._Uri._genDelimitersTable[dartx._get](ch[dartx['>>']](4))) & 1 << (dart.notNull(ch) & 15)) != 0;
|
| }
|
| get isAbsolute() {
|
| return this.scheme != "" && this.fragment == "";
|
| @@ -35705,7 +35911,7 @@ core.Uri = class Uri extends core.Object {
|
| break;
|
| }
|
| let delta = dart.notNull(baseEnd) - dart.notNull(newEnd);
|
| - if ((delta == 2 || delta == 3) && base[dartx.codeUnitAt](dart.notNull(newEnd) + 1) == core.Uri._DOT && (delta == 2 || base[dartx.codeUnitAt](dart.notNull(newEnd) + 2) == core.Uri._DOT)) {
|
| + if ((delta == 2 || delta == 3) && base[dartx.codeUnitAt](dart.notNull(newEnd) + 1) == core._DOT && (delta == 2 || base[dartx.codeUnitAt](dart.notNull(newEnd) + 2) == core._DOT)) {
|
| break;
|
| }
|
| baseEnd = newEnd;
|
| @@ -35719,7 +35925,7 @@ core.Uri = class Uri extends core.Object {
|
| return index != -1;
|
| }
|
| static _removeDotSegments(path) {
|
| - if (!dart.test(core.Uri._mayContainDotSegments(path))) return path;
|
| + if (!dart.test(core._Uri._mayContainDotSegments(path))) return path;
|
| dart.assert(path[dartx.isNotEmpty]);
|
| let output = JSArrayOfString().of([]);
|
| let appendSlash = false;
|
| @@ -35742,9 +35948,12 @@ core.Uri = class Uri extends core.Object {
|
| if (appendSlash) output[dartx.add]("");
|
| return output[dartx.join]("/");
|
| }
|
| - static _normalizeRelativePath(path) {
|
| + static _normalizeRelativePath(path, allowScheme) {
|
| dart.assert(!dart.test(path[dartx.startsWith]('/')));
|
| - if (!dart.test(core.Uri._mayContainDotSegments(path))) return path;
|
| + if (!dart.test(core._Uri._mayContainDotSegments(path))) {
|
| + if (!dart.test(allowScheme)) path = core._Uri._escapeScheme(path);
|
| + return path;
|
| + }
|
| dart.assert(path[dartx.isNotEmpty]);
|
| let output = JSArrayOfString().of([]);
|
| let appendSlash = false;
|
| @@ -35767,8 +35976,23 @@ core.Uri = class Uri extends core.Object {
|
| return "./";
|
| }
|
| if (appendSlash || output[dartx.last] == '..') output[dartx.add]("");
|
| + if (!dart.test(allowScheme)) output[dartx._set](0, core._Uri._escapeScheme(output[dartx._get](0)));
|
| return output[dartx.join]("/");
|
| }
|
| + static _escapeScheme(path) {
|
| + if (dart.notNull(path[dartx.length]) >= 2 && dart.test(core._Uri._isAlphabeticCharacter(path[dartx.codeUnitAt](0)))) {
|
| + for (let i = 1; i < dart.notNull(path[dartx.length]); i++) {
|
| + let char = path[dartx.codeUnitAt](i);
|
| + if (char == core._COLON) {
|
| + return dart.str`${path[dartx.substring](0, i)}%3A${path[dartx.substring](i + 1)}`;
|
| + }
|
| + if (dart.notNull(char) > 127 || (dart.notNull(core._Uri._schemeTable[dartx._get](char[dartx['>>']](4))) & 1 << (dart.notNull(char) & 15)) == 0) {
|
| + break;
|
| + }
|
| + }
|
| + }
|
| + return path;
|
| + }
|
| resolve(reference) {
|
| return this.resolveUri(core.Uri.parse(reference));
|
| }
|
| @@ -35786,7 +36010,7 @@ core.Uri = class Uri extends core.Object {
|
| targetHost = reference.host;
|
| targetPort = dart.test(reference.hasPort) ? reference.port : null;
|
| }
|
| - targetPath = core.Uri._removeDotSegments(reference.path);
|
| + targetPath = core._Uri._removeDotSegments(reference.path);
|
| if (dart.test(reference.hasQuery)) {
|
| targetQuery = reference.query;
|
| }
|
| @@ -35795,8 +36019,8 @@ core.Uri = class Uri extends core.Object {
|
| if (dart.test(reference.hasAuthority)) {
|
| targetUserInfo = reference.userInfo;
|
| targetHost = reference.host;
|
| - targetPort = core.Uri._makePort(dart.test(reference.hasPort) ? reference.port : null, targetScheme);
|
| - targetPath = core.Uri._removeDotSegments(reference.path);
|
| + targetPort = core._Uri._makePort(dart.test(reference.hasPort) ? reference.port : null, targetScheme);
|
| + targetPath = core._Uri._removeDotSegments(reference.path);
|
| if (dart.test(reference.hasQuery)) targetQuery = reference.query;
|
| } else {
|
| targetUserInfo = this[_userInfo];
|
| @@ -35811,20 +36035,24 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| } else {
|
| if (dart.test(reference.hasAbsolutePath)) {
|
| - targetPath = core.Uri._removeDotSegments(reference.path);
|
| + targetPath = core._Uri._removeDotSegments(reference.path);
|
| } else {
|
| if (dart.test(this.hasEmptyPath)) {
|
| - if (!dart.test(this.hasScheme) && !dart.test(this.hasAuthority)) {
|
| - targetPath = reference.path;
|
| + if (!dart.test(this.hasAuthority)) {
|
| + if (!dart.test(this.hasScheme)) {
|
| + targetPath = reference.path;
|
| + } else {
|
| + targetPath = core._Uri._removeDotSegments(reference.path);
|
| + }
|
| } else {
|
| - targetPath = core.Uri._removeDotSegments("/" + dart.notNull(reference.path));
|
| + targetPath = core._Uri._removeDotSegments("/" + dart.notNull(reference.path));
|
| }
|
| } else {
|
| let mergedPath = this[_mergePaths](this[_path], reference.path);
|
| if (dart.test(this.hasScheme) || dart.test(this.hasAuthority) || dart.test(this.hasAbsolutePath)) {
|
| - targetPath = core.Uri._removeDotSegments(mergedPath);
|
| + targetPath = core._Uri._removeDotSegments(mergedPath);
|
| } else {
|
| - targetPath = core.Uri._normalizeRelativePath(mergedPath);
|
| + targetPath = core._Uri._normalizeRelativePath(mergedPath, dart.test(this.hasScheme) || dart.test(this.hasAuthority));
|
| }
|
| }
|
| }
|
| @@ -35833,7 +36061,7 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| }
|
| let fragment = dart.test(reference.hasFragment) ? reference.fragment : null;
|
| - return new core.Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment);
|
| + return new core._Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort, targetPath, targetQuery, fragment);
|
| }
|
| get hasScheme() {
|
| return this.scheme[dartx.isNotEmpty];
|
| @@ -35857,12 +36085,15 @@ core.Uri = class Uri extends core.Object {
|
| return this[_path][dartx.startsWith]('/');
|
| }
|
| get origin() {
|
| - if (this.scheme == "" || this[_host] == null || this[_host] == "") {
|
| + if (this.scheme == "") {
|
| dart.throw(new core.StateError(dart.str`Cannot use origin without a scheme: ${this}`));
|
| }
|
| if (this.scheme != "http" && this.scheme != "https") {
|
| dart.throw(new core.StateError(dart.str`Origin is only applicable schemes http and https: ${this}`));
|
| }
|
| + if (this[_host] == null || this[_host] == "") {
|
| + dart.throw(new core.StateError(dart.str`A ${this.scheme}: URI should have a non-empty host name: ${this}`));
|
| + }
|
| if (this[_port] == null) return dart.str`${this.scheme}://${this[_host]}`;
|
| return dart.str`${this.scheme}://${this[_host]}:${this[_port]}`;
|
| }
|
| @@ -35877,43 +36108,46 @@ core.Uri = class Uri extends core.Object {
|
| if (this.fragment != "") {
|
| dart.throw(new core.UnsupportedError("Cannot extract a file path from a URI with a fragment component"));
|
| }
|
| - if (windows == null) windows = core.Uri._isWindows;
|
| - return dart.test(windows) ? this[_toWindowsFilePath]() : this[_toFilePath]();
|
| + if (windows == null) windows = core._Uri._isWindows;
|
| + return dart.test(windows) ? core._Uri._toWindowsFilePath(this) : this[_toFilePath]();
|
| }
|
| [_toFilePath]() {
|
| - if (this.host != "") {
|
| + if (dart.test(this.hasAuthority) && this.host != "") {
|
| dart.throw(new core.UnsupportedError("Cannot extract a non-Windows file path from a file URI " + "with an authority"));
|
| }
|
| - core.Uri._checkNonWindowsPathReservedCharacters(this.pathSegments, false);
|
| + let pathSegments = this.pathSegments;
|
| + core._Uri._checkNonWindowsPathReservedCharacters(pathSegments, false);
|
| let result = new core.StringBuffer();
|
| - if (dart.test(this[_isPathAbsolute])) result.write("/");
|
| - result.writeAll(this.pathSegments, "/");
|
| + if (dart.test(this.hasAbsolutePath)) result.write("/");
|
| + result.writeAll(pathSegments, "/");
|
| return result.toString();
|
| }
|
| - [_toWindowsFilePath]() {
|
| + static _toWindowsFilePath(uri) {
|
| let hasDriveLetter = false;
|
| - let segments = this.pathSegments;
|
| - if (dart.notNull(segments[dartx.length]) > 0 && segments[dartx._get](0)[dartx.length] == 2 && segments[dartx._get](0)[dartx.codeUnitAt](1) == core.Uri._COLON) {
|
| - core.Uri._checkWindowsDriveLetter(segments[dartx._get](0)[dartx.codeUnitAt](0), false);
|
| - core.Uri._checkWindowsPathReservedCharacters(segments, false, 1);
|
| + let segments = uri.pathSegments;
|
| + if (dart.notNull(segments[dartx.length]) > 0 && segments[dartx._get](0)[dartx.length] == 2 && segments[dartx._get](0)[dartx.codeUnitAt](1) == core._COLON) {
|
| + core._Uri._checkWindowsDriveLetter(segments[dartx._get](0)[dartx.codeUnitAt](0), false);
|
| + core._Uri._checkWindowsPathReservedCharacters(segments, false, 1);
|
| hasDriveLetter = true;
|
| } else {
|
| - core.Uri._checkWindowsPathReservedCharacters(segments, false);
|
| + core._Uri._checkWindowsPathReservedCharacters(segments, false, 0);
|
| }
|
| let result = new core.StringBuffer();
|
| - if (dart.test(this[_isPathAbsolute]) && !hasDriveLetter) result.write("\\");
|
| - if (this.host != "") {
|
| - result.write("\\");
|
| - result.write(this.host);
|
| - result.write("\\");
|
| + if (dart.test(uri.hasAbsolutePath) && !hasDriveLetter) result.write("\\");
|
| + if (dart.test(uri.hasAuthority)) {
|
| + let host = uri.host;
|
| + if (dart.test(host[dartx.isNotEmpty])) {
|
| + result.write("\\");
|
| + result.write(host);
|
| + result.write("\\");
|
| + }
|
| }
|
| result.writeAll(segments, "\\");
|
| if (hasDriveLetter && segments[dartx.length] == 1) result.write("\\");
|
| return result.toString();
|
| }
|
| get [_isPathAbsolute]() {
|
| - if (this.path == null || dart.test(this.path[dartx.isEmpty])) return false;
|
| - return this.path[dartx.startsWith]('/');
|
| + return this[_path] != null && dart.test(this[_path][dartx.startsWith]('/'));
|
| }
|
| [_writeAuthority](ss) {
|
| if (dart.test(this[_userInfo][dartx.isNotEmpty])) {
|
| @@ -35930,9 +36164,17 @@ core.Uri = class Uri extends core.Object {
|
| return this.scheme == "data" ? core.UriData.fromUri(this) : null;
|
| }
|
| toString() {
|
| + let t = this[_text];
|
| + return t == null ? this[_text] = this[_initializeText]() : t;
|
| + }
|
| + [_initializeText]() {
|
| + dart.assert(this[_text] == null);
|
| let sb = new core.StringBuffer();
|
| - core.Uri._addIfNonEmpty(sb, this.scheme, this.scheme, ':');
|
| - if (dart.test(this.hasAuthority) || dart.test(this.path[dartx.startsWith]("//")) || this.scheme == "file") {
|
| + if (dart.test(this.scheme[dartx.isNotEmpty])) {
|
| + sb.write(this.scheme);
|
| + sb.write(":");
|
| + }
|
| + if (dart.test(this.hasAuthority) || this.scheme == "file") {
|
| sb.write("//");
|
| this[_writeAuthority](sb);
|
| }
|
| @@ -35948,58 +36190,16 @@ core.Uri = class Uri extends core.Object {
|
| return sb.toString();
|
| }
|
| ['=='](other) {
|
| - if (!core.Uri.is(other)) return false;
|
| - let uri = core.Uri._check(other);
|
| - return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority && this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.port && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == uri.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment;
|
| - }
|
| - get hashCode() {
|
| - function combine(part, current) {
|
| - return core.int._check(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+', dart.hashCode(part)), '&', 1073741823));
|
| - }
|
| - dart.fn(combine, dynamicAnddynamicToint());
|
| - return combine(this.scheme, combine(this.userInfo, combine(this.host, combine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)))))));
|
| - }
|
| - static _addIfNonEmpty(sb, test, first, second) {
|
| - if ("" != test) {
|
| - sb.write(first);
|
| - sb.write(second);
|
| + if (core.identical(this, other)) return true;
|
| + if (core.Uri.is(other)) {
|
| + let uri = other;
|
| + return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority && this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.port && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == uri.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment;
|
| }
|
| + return false;
|
| }
|
| - static encodeComponent(component) {
|
| - return core.Uri._uriEncode(core.Uri._unreserved2396Table, component, convert.UTF8, false);
|
| - }
|
| - static encodeQueryComponent(component, opts) {
|
| - let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| - return core.Uri._uriEncode(core.Uri._unreservedTable, component, encoding, true);
|
| - }
|
| - static decodeComponent(encodedComponent) {
|
| - return core.Uri._uriDecode(encodedComponent, 0, encodedComponent[dartx.length], convert.UTF8, false);
|
| - }
|
| - static decodeQueryComponent(encodedComponent, opts) {
|
| - let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| - return core.Uri._uriDecode(encodedComponent, 0, encodedComponent[dartx.length], encoding, true);
|
| - }
|
| - static encodeFull(uri) {
|
| - return core.Uri._uriEncode(core.Uri._encodeFullTable, uri, convert.UTF8, false);
|
| - }
|
| - static decodeFull(uri) {
|
| - return core.Uri._uriDecode(uri, 0, uri[dartx.length], convert.UTF8, false);
|
| - }
|
| - static splitQueryString(query, opts) {
|
| - let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
|
| - return query[dartx.split]("&")[dartx.fold](MapOfString$String())(dart.map({}, core.String, core.String), dart.fn((map, element) => {
|
| - let index = element[dartx.indexOf]("=");
|
| - if (index == -1) {
|
| - if (element != "") {
|
| - map[dartx._set](core.Uri.decodeQueryComponent(element, {encoding: encoding}), "");
|
| - }
|
| - } else if (index != 0) {
|
| - let key = element[dartx.substring](0, index);
|
| - let value = element[dartx.substring](dart.notNull(index) + 1);
|
| - map[dartx._set](core.Uri.decodeQueryComponent(key, {encoding: encoding}), core.Uri.decodeQueryComponent(value, {encoding: encoding}));
|
| - }
|
| - return map;
|
| - }, MapOfString$StringAndStringToMapOfString$String()));
|
| + get hashCode() {
|
| + let t = this[_hashCodeCache];
|
| + return t == null ? this[_hashCodeCache] = dart.hashCode(this.toString()) : t;
|
| }
|
| static _createList() {
|
| return [];
|
| @@ -36015,13 +36215,13 @@ core.Uri = class Uri extends core.Object {
|
| let value = null;
|
| if (start == end) return;
|
| if (dart.notNull(equalsIndex) < 0) {
|
| - key = core.Uri._uriDecode(query, start, end, encoding, true);
|
| + key = core._Uri._uriDecode(query, start, end, encoding, true);
|
| value = "";
|
| } else {
|
| - key = core.Uri._uriDecode(query, start, equalsIndex, encoding, true);
|
| - value = core.Uri._uriDecode(query, dart.notNull(equalsIndex) + 1, end, encoding, true);
|
| + key = core._Uri._uriDecode(query, start, equalsIndex, encoding, true);
|
| + value = core._Uri._uriDecode(query, dart.notNull(equalsIndex) + 1, end, encoding, true);
|
| }
|
| - dart.dsend(result[dartx.putIfAbsent](key, core.Uri._createList), 'add', value);
|
| + dart.dsend(result[dartx.putIfAbsent](key, core._Uri._createList), 'add', value);
|
| }
|
| dart.fn(parsePair, intAndintAndintTovoid());
|
| let _equals = 61;
|
| @@ -36040,125 +36240,17 @@ core.Uri = class Uri extends core.Object {
|
| parsePair(start, equalsIndex, i);
|
| return result;
|
| }
|
| - static parseIPv4Address(host) {
|
| - function error(msg) {
|
| - dart.throw(new core.FormatException(dart.str`Illegal IPv4 address, ${msg}`));
|
| - }
|
| - dart.fn(error, StringTovoid());
|
| - let bytes = host[dartx.split]('.');
|
| - if (bytes[dartx.length] != 4) {
|
| - error('IPv4 address should contain exactly 4 parts');
|
| - }
|
| - return bytes[dartx.map](core.int)(dart.fn(byteString => {
|
| - let byte = core.int.parse(byteString);
|
| - if (dart.notNull(byte) < 0 || dart.notNull(byte) > 255) {
|
| - error('each part must be in the range of `0..255`');
|
| - }
|
| - return byte;
|
| - }, StringToint()))[dartx.toList]();
|
| - }
|
| - static parseIPv6Address(host, start, end) {
|
| - if (start === void 0) start = 0;
|
| - if (end === void 0) end = null;
|
| - if (end == null) end = host[dartx.length];
|
| - function error(msg, position) {
|
| - if (position === void 0) position = null;
|
| - dart.throw(new core.FormatException(dart.str`Illegal IPv6 address, ${msg}`, host, core.int._check(position)));
|
| - }
|
| - dart.fn(error, String__Tovoid());
|
| - function parseHex(start, end) {
|
| - if (dart.notNull(end) - dart.notNull(start) > 4) {
|
| - error('an IPv6 part can only contain a maximum of 4 hex digits', start);
|
| - }
|
| - let value = core.int.parse(host[dartx.substring](start, end), {radix: 16});
|
| - if (dart.notNull(value) < 0 || dart.notNull(value) > (1 << 16) - 1) {
|
| - error('each part must be in the range of `0x0..0xFFFF`', start);
|
| - }
|
| - return value;
|
| - }
|
| - dart.fn(parseHex, intAndintToint());
|
| - if (dart.notNull(host[dartx.length]) < 2) error('address is too short');
|
| - let parts = JSArrayOfint().of([]);
|
| - let wildcardSeen = false;
|
| - let partStart = start;
|
| - for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| - if (host[dartx.codeUnitAt](i) == core.Uri._COLON) {
|
| - if (i == start) {
|
| - i = dart.notNull(i) + 1;
|
| - if (host[dartx.codeUnitAt](i) != core.Uri._COLON) {
|
| - error('invalid start colon.', i);
|
| - }
|
| - partStart = i;
|
| - }
|
| - if (i == partStart) {
|
| - if (wildcardSeen) {
|
| - error('only one wildcard `::` is allowed', i);
|
| - }
|
| - wildcardSeen = true;
|
| - parts[dartx.add](-1);
|
| - } else {
|
| - parts[dartx.add](parseHex(partStart, i));
|
| - }
|
| - partStart = dart.notNull(i) + 1;
|
| - }
|
| - }
|
| - if (parts[dartx.length] == 0) error('too few parts');
|
| - let atEnd = partStart == end;
|
| - let isLastWildcard = parts[dartx.last] == -1;
|
| - if (atEnd && !isLastWildcard) {
|
| - error('expected a part after last `:`', end);
|
| - }
|
| - if (!atEnd) {
|
| - try {
|
| - parts[dartx.add](parseHex(partStart, end));
|
| - } catch (e) {
|
| - try {
|
| - let last = core.Uri.parseIPv4Address(host[dartx.substring](partStart, end));
|
| - parts[dartx.add]((dart.notNull(last[dartx._get](0)) << 8 | dart.notNull(last[dartx._get](1))) >>> 0);
|
| - parts[dartx.add]((dart.notNull(last[dartx._get](2)) << 8 | dart.notNull(last[dartx._get](3))) >>> 0);
|
| - } catch (e) {
|
| - error('invalid end of IPv6 address.', partStart);
|
| - }
|
| -
|
| - }
|
| -
|
| - }
|
| - if (wildcardSeen) {
|
| - if (dart.notNull(parts[dartx.length]) > 7) {
|
| - error('an address with a wildcard must have less than 7 parts');
|
| - }
|
| - } else if (parts[dartx.length] != 8) {
|
| - error('an address without a wildcard must contain exactly 8 parts');
|
| - }
|
| - let bytes = typed_data.Uint8List.new(16);
|
| - for (let i = 0, index = 0; i < dart.notNull(parts[dartx.length]); i++) {
|
| - let value = parts[dartx._get](i);
|
| - if (value == -1) {
|
| - let wildCardLength = 9 - dart.notNull(parts[dartx.length]);
|
| - for (let j = 0; j < wildCardLength; j++) {
|
| - bytes[dartx._set](index, 0);
|
| - bytes[dartx._set](index + 1, 0);
|
| - index = index + 2;
|
| - }
|
| - } else {
|
| - bytes[dartx._set](index, value[dartx['>>']](8));
|
| - bytes[dartx._set](index + 1, dart.notNull(value) & 255);
|
| - index = index + 2;
|
| - }
|
| - }
|
| - return bytes;
|
| - }
|
| static _uriEncode(canonicalTable, text, encoding, spaceToPlus) {
|
| - if (core.identical(encoding, convert.UTF8) && dart.test(core.Uri._needsNoEncoding.hasMatch(text))) {
|
| + if (core.identical(encoding, convert.UTF8) && dart.test(core._Uri._needsNoEncoding.hasMatch(text))) {
|
| return text;
|
| }
|
| - let result = new core.StringBuffer();
|
| + let result = new core.StringBuffer('');
|
| let bytes = encoding.encode(text);
|
| for (let i = 0; i < dart.notNull(bytes[dartx.length]); i++) {
|
| let byte = bytes[dartx._get](i);
|
| if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[dartx._get](byte[dartx['>>']](4))) & 1 << (dart.notNull(byte) & 15)) != 0) {
|
| result.writeCharCode(byte);
|
| - } else if (dart.test(spaceToPlus) && byte == core.Uri._SPACE) {
|
| + } else if (dart.test(spaceToPlus) && byte == core._SPACE) {
|
| result.write('+');
|
| } else {
|
| let hexDigits = '0123456789ABCDEF';
|
| @@ -36194,7 +36286,7 @@ core.Uri = class Uri extends core.Object {
|
| let simple = true;
|
| for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| let codeUnit = text[dartx.codeUnitAt](i);
|
| - if (dart.notNull(codeUnit) > 127 || codeUnit == core.Uri._PERCENT || dart.test(plusToSpace) && codeUnit == core.Uri._PLUS) {
|
| + if (dart.notNull(codeUnit) > 127 || codeUnit == core._PERCENT || dart.test(plusToSpace) && codeUnit == core._PLUS) {
|
| simple = false;
|
| break;
|
| }
|
| @@ -36213,14 +36305,14 @@ core.Uri = class Uri extends core.Object {
|
| if (dart.notNull(codeUnit) > 127) {
|
| dart.throw(new core.ArgumentError("Illegal percent encoding in URI"));
|
| }
|
| - if (codeUnit == core.Uri._PERCENT) {
|
| + if (codeUnit == core._PERCENT) {
|
| if (dart.notNull(i) + 3 > dart.notNull(text[dartx.length])) {
|
| dart.throw(new core.ArgumentError('Truncated URI'));
|
| }
|
| - bytes[dartx.add](core.Uri._hexCharPairToByte(text, dart.notNull(i) + 1));
|
| + bytes[dartx.add](core._Uri._hexCharPairToByte(text, dart.notNull(i) + 1));
|
| i = dart.notNull(i) + 2;
|
| - } else if (dart.test(plusToSpace) && codeUnit == core.Uri._PLUS) {
|
| - bytes[dartx.add](core.Uri._SPACE);
|
| + } else if (dart.test(plusToSpace) && codeUnit == core._PLUS) {
|
| + bytes[dartx.add](core._SPACE);
|
| } else {
|
| bytes[dartx.add](codeUnit);
|
| }
|
| @@ -36230,23 +36322,23 @@ core.Uri = class Uri extends core.Object {
|
| }
|
| static _isAlphabeticCharacter(codeUnit) {
|
| let lowerCase = (dart.notNull(codeUnit) | 32) >>> 0;
|
| - return core.Uri._LOWER_CASE_A <= lowerCase && lowerCase <= core.Uri._LOWER_CASE_Z;
|
| + return core._LOWER_CASE_A <= lowerCase && lowerCase <= core._LOWER_CASE_Z;
|
| }
|
| static _isUnreservedChar(char) {
|
| - return dart.notNull(char) < 127 && (dart.notNull(core.Uri._unreservedTable[dartx._get](char[dartx['>>']](4))) & 1 << (dart.notNull(char) & 15)) != 0;
|
| + return dart.notNull(char) < 127 && (dart.notNull(core._Uri._unreservedTable[dartx._get](char[dartx['>>']](4))) & 1 << (dart.notNull(char) & 15)) != 0;
|
| }
|
| };
|
| -dart.defineNamedConstructor(core.Uri, '_internal');
|
| -dart.setSignature(core.Uri, {
|
| +dart.defineNamedConstructor(core._Uri, '_internal');
|
| +core._Uri[dart.implements] = () => [core.Uri];
|
| +dart.setSignature(core._Uri, {
|
| constructors: () => ({
|
| - _internal: dart.definiteFunctionType(core.Uri, [core.String, core.String, core.String, core.int, core.String, core.String, core.String]),
|
| - new: dart.definiteFunctionType(core.Uri, [], {scheme: core.String, userInfo: core.String, host: core.String, port: core.int, path: core.String, pathSegments: IterableOfString(), query: core.String, queryParameters: MapOfString$dynamic(), fragment: core.String}),
|
| - http: dart.definiteFunctionType(core.Uri, [core.String, core.String], [MapOfString$String()]),
|
| - https: dart.definiteFunctionType(core.Uri, [core.String, core.String], [MapOfString$String()]),
|
| - file: dart.definiteFunctionType(core.Uri, [core.String], {windows: core.bool}),
|
| - directory: dart.definiteFunctionType(core.Uri, [core.String], {windows: core.bool}),
|
| - dataFromString: dart.definiteFunctionType(core.Uri, [core.String], {mimeType: core.String, encoding: convert.Encoding, parameters: MapOfString$String(), base64: core.bool}),
|
| - dataFromBytes: dart.definiteFunctionType(core.Uri, [ListOfint()], {mimeType: dart.dynamic, parameters: MapOfString$String(), percentEncoded: dart.dynamic})
|
| + _internal: dart.definiteFunctionType(core._Uri, [core.String, core.String, core.String, core.int, core.String, core.String, core.String]),
|
| + notSimple: dart.definiteFunctionType(core._Uri, [core.String, core.int, core.int, core.int, core.int, core.int, core.int, core.int, core.int, core.String]),
|
| + new: dart.definiteFunctionType(core._Uri, [], {scheme: core.String, userInfo: core.String, host: core.String, port: core.int, path: core.String, pathSegments: IterableOfString(), query: core.String, queryParameters: MapOfString$dynamic(), fragment: core.String}),
|
| + http: dart.definiteFunctionType(core._Uri, [core.String, core.String], [MapOfString$String()]),
|
| + https: dart.definiteFunctionType(core._Uri, [core.String, core.String], [MapOfString$String()]),
|
| + file: dart.definiteFunctionType(core._Uri, [core.String], {windows: core.bool}),
|
| + directory: dart.definiteFunctionType(core._Uri, [core.String], {windows: core.bool})
|
| }),
|
| fields: () => ({
|
| scheme: core.String,
|
| @@ -36257,6 +36349,8 @@ dart.setSignature(core.Uri, {
|
| [_query]: core.String,
|
| [_fragment]: core.String,
|
| [_pathSegments]: ListOfString(),
|
| + [_text]: core.String,
|
| + [_hashCodeCache]: core.int,
|
| [_queryParameters]: MapOfString$String(),
|
| [_queryParameterLists]: MapOfString$ListOfString()
|
| }),
|
| @@ -36284,6 +36378,7 @@ dart.setSignature(core.Uri, {
|
| data: dart.definiteFunctionType(core.UriData, [])
|
| }),
|
| methods: () => ({
|
| + isScheme: dart.definiteFunctionType(core.bool, [core.String]),
|
| replace: dart.definiteFunctionType(core.Uri, [], {scheme: core.String, userInfo: core.String, host: core.String, port: core.int, path: core.String, pathSegments: IterableOfString(), query: core.String, queryParameters: MapOfString$dynamic(), fragment: core.String}),
|
| removeFragment: dart.definiteFunctionType(core.Uri, []),
|
| normalizePath: dart.definiteFunctionType(core.Uri, []),
|
| @@ -36292,36 +36387,10 @@ dart.setSignature(core.Uri, {
|
| resolveUri: dart.definiteFunctionType(core.Uri, [core.Uri]),
|
| toFilePath: dart.definiteFunctionType(core.String, [], {windows: core.bool}),
|
| [_toFilePath]: dart.definiteFunctionType(core.String, []),
|
| - [_toWindowsFilePath]: dart.definiteFunctionType(core.String, []),
|
| - [_writeAuthority]: dart.definiteFunctionType(dart.void, [core.StringSink])
|
| + [_writeAuthority]: dart.definiteFunctionType(dart.void, [core.StringSink]),
|
| + [_initializeText]: dart.definiteFunctionType(core.String, [])
|
| }),
|
| sfields: () => ({
|
| - _SPACE: core.int,
|
| - _DOUBLE_QUOTE: core.int,
|
| - _NUMBER_SIGN: core.int,
|
| - _PERCENT: core.int,
|
| - _ASTERISK: core.int,
|
| - _PLUS: core.int,
|
| - _DOT: core.int,
|
| - _SLASH: core.int,
|
| - _ZERO: core.int,
|
| - _NINE: core.int,
|
| - _COLON: core.int,
|
| - _LESS: core.int,
|
| - _GREATER: core.int,
|
| - _QUESTION: core.int,
|
| - _AT_SIGN: core.int,
|
| - _UPPER_CASE_A: core.int,
|
| - _UPPER_CASE_F: core.int,
|
| - _UPPER_CASE_Z: core.int,
|
| - _LEFT_BRACKET: core.int,
|
| - _BACKSLASH: core.int,
|
| - _RIGHT_BRACKET: core.int,
|
| - _LOWER_CASE_A: core.int,
|
| - _LOWER_CASE_F: core.int,
|
| - _LOWER_CASE_Z: core.int,
|
| - _BAR: core.int,
|
| - _hexDigits: core.String,
|
| _unreservedTable: ListOfint(),
|
| _unreserved2396Table: ListOfint(),
|
| _encodeFullTable: ListOfint(),
|
| @@ -36336,13 +36405,10 @@ dart.setSignature(core.Uri, {
|
| _queryCharTable: ListOfint(),
|
| _needsNoEncoding: core.RegExp
|
| }),
|
| - sgetters: () => ({
|
| - base: dart.definiteFunctionType(core.Uri, []),
|
| - _isWindows: dart.definiteFunctionType(core.bool, [])
|
| - }),
|
| + sgetters: () => ({_isWindows: dart.definiteFunctionType(core.bool, [])}),
|
| statics: () => ({
|
| _defaultPort: dart.definiteFunctionType(core.int, [core.String]),
|
| - parse: dart.definiteFunctionType(core.Uri, [core.String], [core.int, core.int]),
|
| + _compareScheme: dart.definiteFunctionType(core.bool, [core.String, core.String]),
|
| _fail: dart.definiteFunctionType(dart.void, [core.String, core.int, core.String]),
|
| _makeHttpUri: dart.definiteFunctionType(core.Uri, [core.String, core.String, core.String, MapOfString$String()]),
|
| _checkNonWindowsPathReservedCharacters: dart.definiteFunctionType(dart.dynamic, [ListOfString(), core.bool]),
|
| @@ -36355,12 +36421,12 @@ dart.setSignature(core.Uri, {
|
| _isRegNameChar: dart.definiteFunctionType(core.bool, [core.int]),
|
| _normalizeRegName: dart.definiteFunctionType(core.String, [core.String, core.int, core.int]),
|
| _makeScheme: dart.definiteFunctionType(core.String, [core.String, core.int, core.int]),
|
| + _canonicalizeScheme: dart.definiteFunctionType(core.String, [core.String]),
|
| _makeUserInfo: dart.definiteFunctionType(core.String, [core.String, core.int, core.int]),
|
| _makePath: dart.definiteFunctionType(core.String, [core.String, core.int, core.int, IterableOfString(), core.String, core.bool]),
|
| _normalizePath: dart.definiteFunctionType(core.String, [core.String, core.String, core.bool]),
|
| _makeQuery: dart.definiteFunctionType(core.String, [core.String, core.int, core.int, MapOfString$dynamic()]),
|
| _makeFragment: dart.definiteFunctionType(core.String, [core.String, core.int, core.int]),
|
| - _stringOrNullLength: dart.definiteFunctionType(core.int, [core.String]),
|
| _normalizeEscape: dart.definiteFunctionType(core.String, [core.String, core.int, core.bool]),
|
| _parseHexDigit: dart.definiteFunctionType(core.int, [core.int]),
|
| _escapeChar: dart.definiteFunctionType(core.String, [core.int]),
|
| @@ -36369,71 +36435,36 @@ dart.setSignature(core.Uri, {
|
| _isGeneralDelimiter: dart.definiteFunctionType(core.bool, [core.int]),
|
| _mayContainDotSegments: dart.definiteFunctionType(core.bool, [core.String]),
|
| _removeDotSegments: dart.definiteFunctionType(core.String, [core.String]),
|
| - _normalizeRelativePath: dart.definiteFunctionType(core.String, [core.String]),
|
| - _addIfNonEmpty: dart.definiteFunctionType(dart.void, [core.StringBuffer, core.String, core.String, core.String]),
|
| - encodeComponent: dart.definiteFunctionType(core.String, [core.String]),
|
| - encodeQueryComponent: dart.definiteFunctionType(core.String, [core.String], {encoding: convert.Encoding}),
|
| - decodeComponent: dart.definiteFunctionType(core.String, [core.String]),
|
| - decodeQueryComponent: dart.definiteFunctionType(core.String, [core.String], {encoding: convert.Encoding}),
|
| - encodeFull: dart.definiteFunctionType(core.String, [core.String]),
|
| - decodeFull: dart.definiteFunctionType(core.String, [core.String]),
|
| - splitQueryString: dart.definiteFunctionType(core.Map$(core.String, core.String), [core.String], {encoding: convert.Encoding}),
|
| + _normalizeRelativePath: dart.definiteFunctionType(core.String, [core.String, core.bool]),
|
| + _escapeScheme: dart.definiteFunctionType(core.String, [core.String]),
|
| + _toWindowsFilePath: dart.definiteFunctionType(core.String, [core.Uri]),
|
| _createList: dart.definiteFunctionType(core.List, []),
|
| _splitQueryStringAll: dart.definiteFunctionType(core.Map, [core.String], {encoding: convert.Encoding}),
|
| - parseIPv4Address: dart.definiteFunctionType(core.List$(core.int), [core.String]),
|
| - parseIPv6Address: dart.definiteFunctionType(core.List$(core.int), [core.String], [core.int, core.int]),
|
| _uriEncode: dart.definiteFunctionType(core.String, [ListOfint(), core.String, convert.Encoding, core.bool]),
|
| _hexCharPairToByte: dart.definiteFunctionType(core.int, [core.String, core.int]),
|
| _uriDecode: dart.definiteFunctionType(core.String, [core.String, core.int, core.int, convert.Encoding, core.bool]),
|
| _isAlphabeticCharacter: dart.definiteFunctionType(core.bool, [core.int]),
|
| _isUnreservedChar: dart.definiteFunctionType(core.bool, [core.int])
|
| }),
|
| - names: ['_defaultPort', 'parse', '_fail', '_makeHttpUri', '_checkNonWindowsPathReservedCharacters', '_checkWindowsPathReservedCharacters', '_checkWindowsDriveLetter', '_makeFileUri', '_makeWindowsFileUrl', '_makePort', '_makeHost', '_isRegNameChar', '_normalizeRegName', '_makeScheme', '_makeUserInfo', '_makePath', '_normalizePath', '_makeQuery', '_makeFragment', '_stringOrNullLength', '_normalizeEscape', '_parseHexDigit', '_escapeChar', '_normalize', '_isSchemeCharacter', '_isGeneralDelimiter', '_mayContainDotSegments', '_removeDotSegments', '_normalizeRelativePath', '_addIfNonEmpty', 'encodeComponent', 'encodeQueryComponent', 'decodeComponent', 'decodeQueryComponent', 'encodeFull', 'decodeFull', 'splitQueryString', '_createList', '_splitQueryStringAll', 'parseIPv4Address', 'parseIPv6Address', '_uriEncode', '_hexCharPairToByte', '_uriDecode', '_isAlphabeticCharacter', '_isUnreservedChar']
|
| -});
|
| -core.Uri._SPACE = 32;
|
| -core.Uri._DOUBLE_QUOTE = 34;
|
| -core.Uri._NUMBER_SIGN = 35;
|
| -core.Uri._PERCENT = 37;
|
| -core.Uri._ASTERISK = 42;
|
| -core.Uri._PLUS = 43;
|
| -core.Uri._DOT = 46;
|
| -core.Uri._SLASH = 47;
|
| -core.Uri._ZERO = 48;
|
| -core.Uri._NINE = 57;
|
| -core.Uri._COLON = 58;
|
| -core.Uri._LESS = 60;
|
| -core.Uri._GREATER = 62;
|
| -core.Uri._QUESTION = 63;
|
| -core.Uri._AT_SIGN = 64;
|
| -core.Uri._UPPER_CASE_A = 65;
|
| -core.Uri._UPPER_CASE_F = 70;
|
| -core.Uri._UPPER_CASE_Z = 90;
|
| -core.Uri._LEFT_BRACKET = 91;
|
| -core.Uri._BACKSLASH = 92;
|
| -core.Uri._RIGHT_BRACKET = 93;
|
| -core.Uri._LOWER_CASE_A = 97;
|
| -core.Uri._LOWER_CASE_F = 102;
|
| -core.Uri._LOWER_CASE_Z = 122;
|
| -core.Uri._BAR = 124;
|
| -core.Uri._hexDigits = "0123456789ABCDEF";
|
| -core.Uri._unreservedTable = dart.constList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431], core.int);
|
| -core.Uri._unreserved2396Table = dart.constList([0, 0, 26498, 1023, 65534, 34815, 65534, 18431], core.int);
|
| -core.Uri._encodeFullTable = dart.constList([0, 0, 65498, 45055, 65535, 34815, 65534, 18431], core.int);
|
| -core.Uri._schemeTable = dart.constList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047], core.int);
|
| -core.Uri._schemeLowerTable = dart.constList([0, 0, 26624, 1023, 0, 0, 65534, 2047], core.int);
|
| -core.Uri._subDelimitersTable = dart.constList([0, 0, 32722, 11263, 65534, 34815, 65534, 18431], core.int);
|
| -core.Uri._genDelimitersTable = dart.constList([0, 0, 32776, 33792, 1, 10240, 0, 0], core.int);
|
| -core.Uri._userinfoTable = dart.constList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431], core.int);
|
| -core.Uri._regNameTable = dart.constList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431], core.int);
|
| -core.Uri._pathCharTable = dart.constList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431], core.int);
|
| -core.Uri._pathCharOrSlashTable = dart.constList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431], core.int);
|
| -core.Uri._queryCharTable = dart.constList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431], core.int);
|
| -dart.defineLazy(core.Uri, {
|
| + names: ['_defaultPort', '_compareScheme', '_fail', '_makeHttpUri', '_checkNonWindowsPathReservedCharacters', '_checkWindowsPathReservedCharacters', '_checkWindowsDriveLetter', '_makeFileUri', '_makeWindowsFileUrl', '_makePort', '_makeHost', '_isRegNameChar', '_normalizeRegName', '_makeScheme', '_canonicalizeScheme', '_makeUserInfo', '_makePath', '_normalizePath', '_makeQuery', '_makeFragment', '_normalizeEscape', '_parseHexDigit', '_escapeChar', '_normalize', '_isSchemeCharacter', '_isGeneralDelimiter', '_mayContainDotSegments', '_removeDotSegments', '_normalizeRelativePath', '_escapeScheme', '_toWindowsFilePath', '_createList', '_splitQueryStringAll', '_uriEncode', '_hexCharPairToByte', '_uriDecode', '_isAlphabeticCharacter', '_isUnreservedChar']
|
| +});
|
| +core._Uri._unreservedTable = dart.constList([0, 0, 24576, 1023, 65534, 34815, 65534, 18431], core.int);
|
| +core._Uri._unreserved2396Table = dart.constList([0, 0, 26498, 1023, 65534, 34815, 65534, 18431], core.int);
|
| +core._Uri._encodeFullTable = dart.constList([0, 0, 65498, 45055, 65535, 34815, 65534, 18431], core.int);
|
| +core._Uri._schemeTable = dart.constList([0, 0, 26624, 1023, 65534, 2047, 65534, 2047], core.int);
|
| +core._Uri._schemeLowerTable = dart.constList([0, 0, 26624, 1023, 0, 0, 65534, 2047], core.int);
|
| +core._Uri._subDelimitersTable = dart.constList([0, 0, 32722, 11263, 65534, 34815, 65534, 18431], core.int);
|
| +core._Uri._genDelimitersTable = dart.constList([0, 0, 32776, 33792, 1, 10240, 0, 0], core.int);
|
| +core._Uri._userinfoTable = dart.constList([0, 0, 32722, 12287, 65534, 34815, 65534, 18431], core.int);
|
| +core._Uri._regNameTable = dart.constList([0, 0, 32754, 11263, 65534, 34815, 65534, 18431], core.int);
|
| +core._Uri._pathCharTable = dart.constList([0, 0, 32722, 12287, 65535, 34815, 65534, 18431], core.int);
|
| +core._Uri._pathCharOrSlashTable = dart.constList([0, 0, 65490, 12287, 65535, 34815, 65534, 18431], core.int);
|
| +core._Uri._queryCharTable = dart.constList([0, 0, 65490, 45055, 65535, 34815, 65534, 18431], core.int);
|
| +dart.defineLazy(core._Uri, {
|
| get _needsNoEncoding() {
|
| return core.RegExp.new('^[\\-\\.0-9A-Z_a-z~]*$');
|
| }
|
| });
|
| -const _text = Symbol('_text');
|
| const _separatorIndices = Symbol('_separatorIndices');
|
| const _uriCache = Symbol('_uriCache');
|
| core.UriData = class UriData extends core.Object {
|
| @@ -36517,9 +36548,9 @@ core.UriData = class UriData extends core.Object {
|
| if (dart.notNull(slashIndex) < 0) {
|
| dart.throw(new core.ArgumentError.value(mimeType, "mimeType", "Invalid MIME type"));
|
| }
|
| - buffer.write(core.Uri._uriEncode(core.UriData._tokenCharTable, mimeType[dartx.substring](0, slashIndex), convert.UTF8, false));
|
| + buffer.write(core._Uri._uriEncode(core.UriData._tokenCharTable, mimeType[dartx.substring](0, slashIndex), convert.UTF8, false));
|
| buffer.write("/");
|
| - buffer.write(core.Uri._uriEncode(core.UriData._tokenCharTable, mimeType[dartx.substring](dart.notNull(slashIndex) + 1), convert.UTF8, false));
|
| + buffer.write(core._Uri._uriEncode(core.UriData._tokenCharTable, mimeType[dartx.substring](dart.notNull(slashIndex) + 1), convert.UTF8, false));
|
| }
|
| if (charsetName != null) {
|
| if (indices != null) {
|
| @@ -36527,7 +36558,7 @@ core.UriData = class UriData extends core.Object {
|
| indices[dartx.add](dart.notNull(buffer.length) + 8);
|
| }
|
| buffer.write(";charset=");
|
| - buffer.write(core.Uri._uriEncode(core.UriData._tokenCharTable, charsetName, convert.UTF8, false));
|
| + buffer.write(core._Uri._uriEncode(core.UriData._tokenCharTable, charsetName, convert.UTF8, false));
|
| }
|
| dart.nullSafe(parameters, _ => _[dartx.forEach](dart.fn((key, value) => {
|
| if (dart.test(key[dartx.isEmpty])) {
|
| @@ -36538,17 +36569,17 @@ core.UriData = class UriData extends core.Object {
|
| }
|
| if (indices != null) indices[dartx.add](buffer.length);
|
| buffer.write(';');
|
| - buffer.write(core.Uri._uriEncode(core.UriData._tokenCharTable, key, convert.UTF8, false));
|
| + buffer.write(core._Uri._uriEncode(core.UriData._tokenCharTable, key, convert.UTF8, false));
|
| if (indices != null) indices[dartx.add](buffer.length);
|
| buffer.write('=');
|
| - buffer.write(core.Uri._uriEncode(core.UriData._tokenCharTable, value, convert.UTF8, false));
|
| + buffer.write(core._Uri._uriEncode(core.UriData._tokenCharTable, value, convert.UTF8, false));
|
| }, StringAndStringToNull())));
|
| }
|
| static _validateMimeType(mimeType) {
|
| let slashIndex = -1;
|
| for (let i = 0; i < dart.notNull(mimeType[dartx.length]); i++) {
|
| let char = mimeType[dartx.codeUnitAt](i);
|
| - if (char != core.Uri._SLASH) continue;
|
| + if (char != core._SLASH) continue;
|
| if (slashIndex < 0) {
|
| slashIndex = i;
|
| continue;
|
| @@ -36558,10 +36589,16 @@ core.UriData = class UriData extends core.Object {
|
| return slashIndex;
|
| }
|
| static parse(uri) {
|
| - if (!dart.test(uri[dartx.startsWith]("data:"))) {
|
| - dart.throw(new core.FormatException("Does not start with 'data:'", uri, 0));
|
| + if (dart.notNull(uri[dartx.length]) >= 5) {
|
| + let dataDelta = core._startsWithData(uri, 0);
|
| + if (dataDelta == 0) {
|
| + return core.UriData._parse(uri, 5, null);
|
| + }
|
| + if (dataDelta == 32) {
|
| + return core.UriData._parse(uri[dartx.substring](5), 0, null);
|
| + }
|
| }
|
| - return core.UriData._parse(uri, 5, null);
|
| + dart.throw(new core.FormatException("Does not start with 'data:'", uri, 0));
|
| }
|
| get uri() {
|
| if (this[_uriCache] != null) return this[_uriCache];
|
| @@ -36575,14 +36612,14 @@ core.UriData = class UriData extends core.Object {
|
| end = queryIndex;
|
| }
|
| path = this[_text][dartx.substring](dart.notNull(colonIndex) + 1, end);
|
| - this[_uriCache] = new core.Uri._internal("data", "", null, null, path, query, null);
|
| + this[_uriCache] = new core._Uri._internal("data", "", null, null, path, query, null);
|
| return this[_uriCache];
|
| }
|
| get mimeType() {
|
| let start = dart.notNull(this[_separatorIndices][dartx._get](0)) + 1;
|
| let end = this[_separatorIndices][dartx._get](1);
|
| if (start == end) return "text/plain";
|
| - return core.Uri._uriDecode(this[_text], start, end, convert.UTF8, false);
|
| + return core._Uri._uriDecode(this[_text], start, end, convert.UTF8, false);
|
| }
|
| get charset() {
|
| let parameterStart = 1;
|
| @@ -36594,7 +36631,7 @@ core.UriData = class UriData extends core.Object {
|
| let keyStart = dart.notNull(this[_separatorIndices][dartx._get](i)) + 1;
|
| let keyEnd = this[_separatorIndices][dartx._get](i + 1);
|
| if (keyEnd == keyStart + 7 && dart.test(this[_text][dartx.startsWith]("charset", keyStart))) {
|
| - return core.Uri._uriDecode(this[_text], dart.notNull(keyEnd) + 1, this[_separatorIndices][dartx._get](i + 2), convert.UTF8, false);
|
| + return core._Uri._uriDecode(this[_text], dart.notNull(keyEnd) + 1, this[_separatorIndices][dartx._get](i + 2), convert.UTF8, false);
|
| }
|
| }
|
| return "US-ASCII";
|
| @@ -36632,8 +36669,8 @@ core.UriData = class UriData extends core.Object {
|
| result[dartx._set](index++, codeUnit);
|
| } else {
|
| if (i + 2 < dart.notNull(text[dartx.length])) {
|
| - let digit1 = core.Uri._parseHexDigit(text[dartx.codeUnitAt](i + 1));
|
| - let digit2 = core.Uri._parseHexDigit(text[dartx.codeUnitAt](i + 2));
|
| + let digit1 = core._Uri._parseHexDigit(text[dartx.codeUnitAt](i + 1));
|
| + let digit2 = core._Uri._parseHexDigit(text[dartx.codeUnitAt](i + 2));
|
| if (dart.notNull(digit1) >= 0 && dart.notNull(digit2) >= 0) {
|
| let byte = dart.notNull(digit1) * 16 + dart.notNull(digit2);
|
| result[dartx._set](index++, byte);
|
| @@ -36662,7 +36699,7 @@ core.UriData = class UriData extends core.Object {
|
| let converter = convert.BASE64.decoder.fuse(core.String)(encoding.decoder);
|
| return converter.convert(text[dartx.substring](start));
|
| }
|
| - return core.Uri._uriDecode(text, start, text[dartx.length], encoding, false);
|
| + return core._Uri._uriDecode(text, start, text[dartx.length], encoding, false);
|
| }
|
| get parameters() {
|
| let result = dart.map({}, core.String, core.String);
|
| @@ -36670,8 +36707,8 @@ core.UriData = class UriData extends core.Object {
|
| let start = dart.notNull(this[_separatorIndices][dartx._get](i - 2)) + 1;
|
| let equals = this[_separatorIndices][dartx._get](i - 1);
|
| let end = this[_separatorIndices][dartx._get](i);
|
| - let key = core.Uri._uriDecode(this[_text], start, equals, convert.UTF8, false);
|
| - let value = core.Uri._uriDecode(this[_text], dart.notNull(equals) + 1, end, convert.UTF8, false);
|
| + let key = core._Uri._uriDecode(this[_text], start, equals, convert.UTF8, false);
|
| + let value = core._Uri._uriDecode(this[_text], dart.notNull(equals) + 1, end, convert.UTF8, false);
|
| result[dartx._set](key, value);
|
| }
|
| return result;
|
| @@ -36734,9 +36771,9 @@ core.UriData = class UriData extends core.Object {
|
| if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[dartx._get](byte[dartx['>>']](4))) & 1 << (dart.notNull(byte) & 15)) != 0) {
|
| buffer.writeCharCode(byte);
|
| } else {
|
| - buffer.writeCharCode(core.Uri._PERCENT);
|
| - buffer.writeCharCode(core.Uri._hexDigits[dartx.codeUnitAt](byte[dartx['>>']](4)));
|
| - buffer.writeCharCode(core.Uri._hexDigits[dartx.codeUnitAt](dart.notNull(byte) & 15));
|
| + buffer.writeCharCode(core._PERCENT);
|
| + buffer.writeCharCode(core._hexDigits[dartx.codeUnitAt](byte[dartx['>>']](4)));
|
| + buffer.writeCharCode(core._hexDigits[dartx.codeUnitAt](dart.notNull(byte) & 15));
|
| }
|
| }
|
| if ((dart.notNull(byteOr) & ~255) != 0) {
|
| @@ -36793,7 +36830,654 @@ dart.setSignature(core.UriData, {
|
| });
|
| core.UriData._noScheme = -1;
|
| core.UriData._tokenCharTable = dart.constList([0, 0, 27858, 1023, 65534, 51199, 65535, 32767], core.int);
|
| -core.UriData._uricTable = core.Uri._queryCharTable;
|
| +core.UriData._uricTable = core._Uri._queryCharTable;
|
| +core._schemeEndIndex = 1;
|
| +core._hostStartIndex = 2;
|
| +core._portStartIndex = 3;
|
| +core._pathStartIndex = 4;
|
| +core._queryStartIndex = 5;
|
| +core._fragmentStartIndex = 6;
|
| +core._notSimpleIndex = 7;
|
| +core._uriStart = 0;
|
| +core._nonSimpleEndStates = 14;
|
| +core._schemeStart = 20;
|
| +dart.defineLazy(core, {
|
| + get _scannerTables() {
|
| + return core._createTables();
|
| + }
|
| +});
|
| +core._createTables = function() {
|
| + let stateCount = 22;
|
| + let schemeOrPath = 1;
|
| + let authOrPath = 2;
|
| + let authOrPathSlash = 3;
|
| + let uinfoOrHost0 = 4;
|
| + let uinfoOrHost = 5;
|
| + let uinfoOrPort0 = 6;
|
| + let uinfoOrPort = 7;
|
| + let ipv6Host = 8;
|
| + let relPathSeg = 9;
|
| + let pathSeg = 10;
|
| + let path = 11;
|
| + let query = 12;
|
| + let fragment = 13;
|
| + let schemeOrPathDot = 14;
|
| + let schemeOrPathDot2 = 15;
|
| + let relPathSegDot = 16;
|
| + let relPathSegDot2 = 17;
|
| + let pathSegDot = 18;
|
| + let pathSegDot2 = 19;
|
| + let scheme0 = core._schemeStart;
|
| + let scheme = 21;
|
| + let schemeEnd = core._schemeEndIndex << 5;
|
| + let hostStart = core._hostStartIndex << 5;
|
| + let portStart = core._portStartIndex << 5;
|
| + let pathStart = core._pathStartIndex << 5;
|
| + let queryStart = core._queryStartIndex << 5;
|
| + let fragmentStart = core._fragmentStartIndex << 5;
|
| + let notSimple = core._notSimpleIndex << 5;
|
| + let unreserved = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-._~";
|
| + let subDelims = "!$&'()*+,;=";
|
| + let pchar = dart.str`${unreserved}${subDelims}`;
|
| + let tables = ListOfUint8List().generate(stateCount, dart.fn(_ => typed_data.Uint8List.new(96), intToUint8List()));
|
| + function build(state, defaultTransition) {
|
| + return (() => {
|
| + let _ = tables[dartx._get](core.int._check(state));
|
| + _[dartx.fillRange](0, 96, core.int._check(defaultTransition));
|
| + return _;
|
| + })();
|
| + }
|
| + dart.fn(build, dynamicAnddynamicToUint8List());
|
| + function setChars(target, chars, transition) {
|
| + for (let i = 0; i < dart.notNull(chars[dartx.length]); i++) {
|
| + let char = chars[dartx.codeUnitAt](i);
|
| + target[dartx._set]((dart.notNull(char) ^ 96) >>> 0, transition);
|
| + }
|
| + }
|
| + dart.fn(setChars, Uint8ListAndStringAndintTovoid());
|
| + function setRange(target, range, transition) {
|
| + for (let i = range[dartx.codeUnitAt](0), n = range[dartx.codeUnitAt](1); dart.notNull(i) <= dart.notNull(n); i = dart.notNull(i) + 1) {
|
| + target[dartx._set]((dart.notNull(i) ^ 96) >>> 0, transition);
|
| + }
|
| + }
|
| + dart.fn(setRange, Uint8ListAndStringAndintTovoid());
|
| + let b = null;
|
| + b = build(core._uriStart, (schemeOrPath | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, schemeOrPath);
|
| + setChars(typed_data.Uint8List._check(b), ".", schemeOrPathDot);
|
| + setChars(typed_data.Uint8List._check(b), ":", (authOrPath | schemeEnd) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", authOrPathSlash);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(schemeOrPathDot, (schemeOrPath | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, schemeOrPath);
|
| + setChars(typed_data.Uint8List._check(b), ".", schemeOrPathDot2);
|
| + setChars(typed_data.Uint8List._check(b), ':', (authOrPath | schemeEnd) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(schemeOrPathDot2, (schemeOrPath | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, schemeOrPath);
|
| + setChars(typed_data.Uint8List._check(b), "%", (schemeOrPath | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), ':', (authOrPath | schemeEnd) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", relPathSeg);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(schemeOrPath, (schemeOrPath | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, schemeOrPath);
|
| + setChars(typed_data.Uint8List._check(b), ':', (authOrPath | schemeEnd) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", pathSeg);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(authOrPath, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, (path | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (authOrPathSlash | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), ".", (pathSegDot | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(authOrPathSlash, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), "/", (uinfoOrHost0 | hostStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), ".", pathSegDot);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(uinfoOrHost0, (uinfoOrHost | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, uinfoOrHost);
|
| + setRange(typed_data.Uint8List._check(b), "AZ", (uinfoOrHost | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), ":", (uinfoOrPort0 | portStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "@", (uinfoOrHost0 | hostStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "[", (ipv6Host | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(uinfoOrHost, (uinfoOrHost | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, uinfoOrHost);
|
| + setRange(typed_data.Uint8List._check(b), "AZ", (uinfoOrHost | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), ":", (uinfoOrPort0 | portStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "@", (uinfoOrHost0 | hostStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(uinfoOrPort0, (uinfoOrPort | notSimple) >>> 0);
|
| + setRange(typed_data.Uint8List._check(b), "19", uinfoOrPort);
|
| + setChars(typed_data.Uint8List._check(b), "@", (uinfoOrHost0 | hostStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(uinfoOrPort, (uinfoOrPort | notSimple) >>> 0);
|
| + setRange(typed_data.Uint8List._check(b), "09", uinfoOrPort);
|
| + setChars(typed_data.Uint8List._check(b), "@", (uinfoOrHost0 | hostStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | pathStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(ipv6Host, ipv6Host);
|
| + setChars(typed_data.Uint8List._check(b), "]", uinfoOrHost);
|
| + b = build(relPathSeg, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), ".", relPathSegDot);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(relPathSegDot, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), ".", relPathSegDot2);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(relPathSegDot2, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), "/", relPathSeg);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(pathSeg, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), ".", pathSegDot);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(pathSegDot, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), ".", pathSegDot2);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(pathSegDot2, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), "/", (pathSeg | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(path, (path | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, path);
|
| + setChars(typed_data.Uint8List._check(b), "/", pathSeg);
|
| + setChars(typed_data.Uint8List._check(b), "?", (query | queryStart) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(query, (query | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, query);
|
| + setChars(typed_data.Uint8List._check(b), "?", query);
|
| + setChars(typed_data.Uint8List._check(b), "#", (fragment | fragmentStart) >>> 0);
|
| + b = build(fragment, (fragment | notSimple) >>> 0);
|
| + setChars(typed_data.Uint8List._check(b), pchar, fragment);
|
| + setChars(typed_data.Uint8List._check(b), "?", fragment);
|
| + b = build(scheme0, (scheme | notSimple) >>> 0);
|
| + setRange(typed_data.Uint8List._check(b), "az", scheme);
|
| + b = build(scheme, (scheme | notSimple) >>> 0);
|
| + setRange(typed_data.Uint8List._check(b), "az", scheme);
|
| + setRange(typed_data.Uint8List._check(b), "09", scheme);
|
| + setChars(typed_data.Uint8List._check(b), "+-.", scheme);
|
| + return tables;
|
| +};
|
| +dart.lazyFn(core._createTables, () => VoidToListOfUint8List());
|
| +core._scan = function(uri, start, end, state, indices) {
|
| + let tables = core._scannerTables;
|
| + dart.assert(dart.notNull(end) <= dart.notNull(uri[dartx.length]));
|
| + for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| + let table = tables[dartx._get](state);
|
| + let char = (dart.notNull(uri[dartx.codeUnitAt](i)) ^ 96) >>> 0;
|
| + if (char > 95) char = 31;
|
| + let transition = table[dartx._get](char);
|
| + state = dart.notNull(transition) & 31;
|
| + indices[dartx._set](transition[dartx['>>']](5), i);
|
| + }
|
| + return state;
|
| +};
|
| +dart.fn(core._scan, StringAndintAndint__Toint());
|
| +const _uri = Symbol('_uri');
|
| +const _schemeEnd = Symbol('_schemeEnd');
|
| +const _hostStart = Symbol('_hostStart');
|
| +const _portStart = Symbol('_portStart');
|
| +const _pathStart = Symbol('_pathStart');
|
| +const _queryStart = Symbol('_queryStart');
|
| +const _fragmentStart = Symbol('_fragmentStart');
|
| +const _schemeCache = Symbol('_schemeCache');
|
| +const _isFile = Symbol('_isFile');
|
| +const _isHttp = Symbol('_isHttp');
|
| +const _isHttps = Symbol('_isHttps');
|
| +const _isPackage = Symbol('_isPackage');
|
| +const _isScheme = Symbol('_isScheme');
|
| +let const;
|
| +let const;
|
| +let const;
|
| +const _isPort = Symbol('_isPort');
|
| +const _simpleMerge = Symbol('_simpleMerge');
|
| +const _toNonSimple = Symbol('_toNonSimple');
|
| +core._SimpleUri = class _SimpleUri extends core.Object {
|
| + new(uri, schemeEnd, hostStart, portStart, pathStart, queryStart, fragmentStart, schemeCache) {
|
| + this[_uri] = uri;
|
| + this[_schemeEnd] = schemeEnd;
|
| + this[_hostStart] = hostStart;
|
| + this[_portStart] = portStart;
|
| + this[_pathStart] = pathStart;
|
| + this[_queryStart] = queryStart;
|
| + this[_fragmentStart] = fragmentStart;
|
| + this[_schemeCache] = schemeCache;
|
| + this[_hashCodeCache] = null;
|
| + }
|
| + get hasScheme() {
|
| + return dart.notNull(this[_schemeEnd]) > 0;
|
| + }
|
| + get hasAuthority() {
|
| + return dart.notNull(this[_hostStart]) > 0;
|
| + }
|
| + get hasUserInfo() {
|
| + return dart.notNull(this[_hostStart]) > dart.notNull(this[_schemeEnd]) + 4;
|
| + }
|
| + get hasPort() {
|
| + return dart.notNull(this[_hostStart]) > 0 && dart.notNull(this[_portStart]) + 1 < dart.notNull(this[_pathStart]);
|
| + }
|
| + get hasQuery() {
|
| + return dart.notNull(this[_queryStart]) < dart.notNull(this[_fragmentStart]);
|
| + }
|
| + get hasFragment() {
|
| + return dart.notNull(this[_fragmentStart]) < dart.notNull(this[_uri][dartx.length]);
|
| + }
|
| + get [_isFile]() {
|
| + return this[_schemeEnd] == 4 && dart.test(this[_uri][dartx.startsWith]("file"));
|
| + }
|
| + get [_isHttp]() {
|
| + return this[_schemeEnd] == 4 && dart.test(this[_uri][dartx.startsWith]("http"));
|
| + }
|
| + get [_isHttps]() {
|
| + return this[_schemeEnd] == 5 && dart.test(this[_uri][dartx.startsWith]("https"));
|
| + }
|
| + get [_isPackage]() {
|
| + return this[_schemeEnd] == 7 && dart.test(this[_uri][dartx.startsWith]("package"));
|
| + }
|
| + [_isScheme](scheme) {
|
| + return this[_schemeEnd] == scheme[dartx.length] && dart.test(this[_uri][dartx.startsWith](scheme));
|
| + }
|
| + get hasAbsolutePath() {
|
| + return this[_uri][dartx.startsWith]("/", this[_pathStart]);
|
| + }
|
| + get hasEmptyPath() {
|
| + return this[_pathStart] == this[_queryStart];
|
| + }
|
| + get isAbsolute() {
|
| + return dart.test(this.hasScheme) && !dart.test(this.hasFragment);
|
| + }
|
| + isScheme(scheme) {
|
| + if (scheme == null || dart.test(scheme[dartx.isEmpty])) return dart.notNull(this[_schemeEnd]) < 0;
|
| + if (scheme[dartx.length] != this[_schemeEnd]) return false;
|
| + return core._Uri._compareScheme(scheme, this[_uri]);
|
| + }
|
| + get scheme() {
|
| + if (dart.notNull(this[_schemeEnd]) <= 0) return "";
|
| + if (this[_schemeCache] != null) return this[_schemeCache];
|
| + if (dart.test(this[_isHttp])) {
|
| + this[_schemeCache] = "http";
|
| + } else if (dart.test(this[_isHttps])) {
|
| + this[_schemeCache] = "https";
|
| + } else if (dart.test(this[_isFile])) {
|
| + this[_schemeCache] = "file";
|
| + } else if (dart.test(this[_isPackage])) {
|
| + this[_schemeCache] = "package";
|
| + } else {
|
| + this[_schemeCache] = this[_uri][dartx.substring](0, this[_schemeEnd]);
|
| + }
|
| + return this[_schemeCache];
|
| + }
|
| + get authority() {
|
| + return dart.notNull(this[_hostStart]) > 0 ? this[_uri][dartx.substring](dart.notNull(this[_schemeEnd]) + 3, this[_pathStart]) : "";
|
| + }
|
| + get userInfo() {
|
| + return dart.notNull(this[_hostStart]) > dart.notNull(this[_schemeEnd]) + 3 ? this[_uri][dartx.substring](dart.notNull(this[_schemeEnd]) + 3, dart.notNull(this[_hostStart]) - 1) : "";
|
| + }
|
| + get host() {
|
| + return dart.notNull(this[_hostStart]) > 0 ? this[_uri][dartx.substring](this[_hostStart], this[_portStart]) : "";
|
| + }
|
| + get port() {
|
| + if (dart.test(this.hasPort)) return core.int.parse(this[_uri][dartx.substring](dart.notNull(this[_portStart]) + 1, this[_pathStart]));
|
| + if (dart.test(this[_isHttp])) return 80;
|
| + if (dart.test(this[_isHttps])) return 443;
|
| + return 0;
|
| + }
|
| + get path() {
|
| + return this[_uri][dartx.substring](this[_pathStart], this[_queryStart]);
|
| + }
|
| + get query() {
|
| + return dart.notNull(this[_queryStart]) < dart.notNull(this[_fragmentStart]) ? this[_uri][dartx.substring](dart.notNull(this[_queryStart]) + 1, this[_fragmentStart]) : "";
|
| + }
|
| + get fragment() {
|
| + return dart.notNull(this[_fragmentStart]) < dart.notNull(this[_uri][dartx.length]) ? this[_uri][dartx.substring](dart.notNull(this[_fragmentStart]) + 1) : "";
|
| + }
|
| + get origin() {
|
| + let isHttp = this[_isHttp];
|
| + if (dart.notNull(this[_schemeEnd]) < 0) {
|
| + dart.throw(new core.StateError(dart.str`Cannot use origin without a scheme: ${this}`));
|
| + }
|
| + if (!dart.test(isHttp) && !dart.test(this[_isHttps])) {
|
| + dart.throw(new core.StateError(dart.str`Origin is only applicable schemes http and https: ${this}`));
|
| + }
|
| + if (this[_hostStart] == this[_portStart]) {
|
| + dart.throw(new core.StateError(dart.str`A ${this.scheme}: URI should have a non-empty host name: ${this}`));
|
| + }
|
| + if (this[_hostStart] == dart.notNull(this[_schemeEnd]) + 3) {
|
| + return this[_uri][dartx.substring](0, this[_pathStart]);
|
| + }
|
| + return dart.notNull(this[_uri][dartx.substring](0, dart.notNull(this[_schemeEnd]) + 3)) + dart.notNull(this[_uri][dartx.substring](this[_hostStart], this[_pathStart]));
|
| + }
|
| + get pathSegments() {
|
| + let start = this[_pathStart];
|
| + let end = this[_queryStart];
|
| + if (dart.test(this[_uri][dartx.startsWith]("/", start))) {
|
| + start = dart.notNull(start) + 1;
|
| + }
|
| + if (start == end) return const || (const = dart.constList([], core.String));
|
| + let parts = JSArrayOfString().of([]);
|
| + for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
|
| + let char = this[_uri][dartx.codeUnitAt](i);
|
| + if (char == core._SLASH) {
|
| + parts[dartx.add](this[_uri][dartx.substring](start, i));
|
| + start = dart.notNull(i) + 1;
|
| + }
|
| + }
|
| + parts[dartx.add](this[_uri][dartx.substring](start, end));
|
| + return ListOfString().unmodifiable(parts);
|
| + }
|
| + get queryParameters() {
|
| + if (!dart.test(this.hasQuery)) return const || (const = dart.const(dart.map({}, core.String, core.String)));
|
| + return new (UnmodifiableMapViewOfString$String())(core.Uri.splitQueryString(this.query));
|
| + }
|
| + get queryParametersAll() {
|
| + if (!dart.test(this.hasQuery)) return const || (const = dart.const(dart.map({}, core.String, ListOfString())));
|
| + let queryParameterLists = core._Uri._splitQueryStringAll(this.query);
|
| + for (let key of queryParameterLists[dartx.keys]) {
|
| + queryParameterLists[dartx._set](key, ListOfString().unmodifiable(core.Iterable._check(queryParameterLists[dartx._get](key))));
|
| + }
|
| + return MapOfString$ListOfString().unmodifiable(queryParameterLists);
|
| + }
|
| + [_isPort](port) {
|
| + let portDigitStart = dart.notNull(this[_portStart]) + 1;
|
| + return portDigitStart + dart.notNull(port[dartx.length]) == this[_pathStart] && dart.test(this[_uri][dartx.startsWith](port, portDigitStart));
|
| + }
|
| + normalizePath() {
|
| + return this;
|
| + }
|
| + removeFragment() {
|
| + if (!dart.test(this.hasFragment)) return this;
|
| + return new core._SimpleUri(this[_uri][dartx.substring](0, this[_fragmentStart]), this[_schemeEnd], this[_hostStart], this[_portStart], this[_pathStart], this[_queryStart], this[_fragmentStart], this[_schemeCache]);
|
| + }
|
| + replace(opts) {
|
| + let scheme = opts && 'scheme' in opts ? opts.scheme : null;
|
| + let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null;
|
| + let host = opts && 'host' in opts ? opts.host : null;
|
| + let port = opts && 'port' in opts ? opts.port : null;
|
| + let path = opts && 'path' in opts ? opts.path : null;
|
| + let pathSegments = opts && 'pathSegments' in opts ? opts.pathSegments : null;
|
| + let query = opts && 'query' in opts ? opts.query : null;
|
| + let queryParameters = opts && 'queryParameters' in opts ? opts.queryParameters : null;
|
| + let fragment = opts && 'fragment' in opts ? opts.fragment : null;
|
| + let schemeChanged = false;
|
| + if (scheme != null) {
|
| + scheme = core._Uri._makeScheme(scheme, 0, scheme[dartx.length]);
|
| + schemeChanged = !dart.test(this[_isScheme](scheme));
|
| + } else {
|
| + scheme = this.scheme;
|
| + }
|
| + let isFile = scheme == "file";
|
| + if (userInfo != null) {
|
| + userInfo = core._Uri._makeUserInfo(userInfo, 0, userInfo[dartx.length]);
|
| + } else if (dart.notNull(this[_hostStart]) > 0) {
|
| + userInfo = this[_uri][dartx.substring](dart.notNull(this[_schemeEnd]) + 3, this[_hostStart]);
|
| + } else {
|
| + userInfo = "";
|
| + }
|
| + if (port != null) {
|
| + port = core._Uri._makePort(port, scheme);
|
| + } else {
|
| + port = dart.test(this.hasPort) ? this.port : null;
|
| + if (schemeChanged) {
|
| + port = core._Uri._makePort(port, scheme);
|
| + }
|
| + }
|
| + if (host != null) {
|
| + host = core._Uri._makeHost(host, 0, host[dartx.length], false);
|
| + } else if (dart.notNull(this[_hostStart]) > 0) {
|
| + host = this[_uri][dartx.substring](this[_hostStart], this[_portStart]);
|
| + } else if (dart.test(userInfo[dartx.isNotEmpty]) || port != null || isFile) {
|
| + host = "";
|
| + }
|
| + let hasAuthority = host != null;
|
| + if (path != null || pathSegments != null) {
|
| + path = core._Uri._makePath(path, 0, core._stringOrNullLength(path), pathSegments, scheme, hasAuthority);
|
| + } else {
|
| + path = this[_uri][dartx.substring](this[_pathStart], this[_queryStart]);
|
| + if ((isFile || hasAuthority && !dart.test(path[dartx.isEmpty])) && !dart.test(path[dartx.startsWith]('/'))) {
|
| + path = "/" + dart.notNull(path);
|
| + }
|
| + }
|
| + if (query != null || queryParameters != null) {
|
| + query = core._Uri._makeQuery(query, 0, core._stringOrNullLength(query), queryParameters);
|
| + } else if (dart.notNull(this[_queryStart]) < dart.notNull(this[_fragmentStart])) {
|
| + query = this[_uri][dartx.substring](dart.notNull(this[_queryStart]) + 1, this[_fragmentStart]);
|
| + }
|
| + if (fragment != null) {
|
| + fragment = core._Uri._makeFragment(fragment, 0, fragment[dartx.length]);
|
| + } else if (dart.notNull(this[_fragmentStart]) < dart.notNull(this[_uri][dartx.length])) {
|
| + fragment = this[_uri][dartx.substring](dart.notNull(this[_fragmentStart]) + 1);
|
| + }
|
| + return new core._Uri._internal(scheme, userInfo, host, port, path, query, fragment);
|
| + }
|
| + resolve(reference) {
|
| + return this.resolveUri(core.Uri.parse(reference));
|
| + }
|
| + resolveUri(reference) {
|
| + if (core._SimpleUri.is(reference)) {
|
| + return this[_simpleMerge](this, reference);
|
| + }
|
| + return this[_toNonSimple]().resolveUri(reference);
|
| + }
|
| + [_simpleMerge](base, ref) {
|
| + if (dart.test(ref.hasScheme)) return ref;
|
| + if (dart.test(ref.hasAuthority)) {
|
| + if (!dart.test(base.hasScheme)) return ref;
|
| + let isSimple = true;
|
| + if (dart.test(base[_isFile])) {
|
| + isSimple = !dart.test(ref.hasEmptyPath);
|
| + } else if (dart.test(base[_isHttp])) {
|
| + isSimple = !dart.test(ref[_isPort]("80"));
|
| + } else if (dart.test(base[_isHttps])) {
|
| + isSimple = !dart.test(ref[_isPort]("443"));
|
| + }
|
| + if (isSimple) {
|
| + let delta = dart.notNull(base[_schemeEnd]) + 1;
|
| + let newUri = dart.notNull(base[_uri][dartx.substring](0, dart.notNull(base[_schemeEnd]) + 1)) + dart.notNull(ref[_uri][dartx.substring](dart.notNull(ref[_schemeEnd]) + 1));
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], dart.notNull(ref[_hostStart]) + delta, dart.notNull(ref[_portStart]) + delta, dart.notNull(ref[_pathStart]) + delta, dart.notNull(ref[_queryStart]) + delta, dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + } else {
|
| + return this[_toNonSimple]().resolveUri(ref);
|
| + }
|
| + }
|
| + if (dart.test(ref.hasEmptyPath)) {
|
| + if (dart.test(ref.hasQuery)) {
|
| + let delta = dart.notNull(base[_queryStart]) - dart.notNull(ref[_queryStart]);
|
| + let newUri = dart.notNull(base[_uri][dartx.substring](0, base[_queryStart])) + dart.notNull(ref[_uri][dartx.substring](ref[_queryStart]));
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], base[_hostStart], base[_portStart], base[_pathStart], dart.notNull(ref[_queryStart]) + delta, dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + }
|
| + if (dart.test(ref.hasFragment)) {
|
| + let delta = dart.notNull(base[_fragmentStart]) - dart.notNull(ref[_fragmentStart]);
|
| + let newUri = dart.notNull(base[_uri][dartx.substring](0, base[_fragmentStart])) + dart.notNull(ref[_uri][dartx.substring](ref[_fragmentStart]));
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], base[_hostStart], base[_portStart], base[_pathStart], base[_queryStart], dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + }
|
| + return base.removeFragment();
|
| + }
|
| + if (dart.test(ref.hasAbsolutePath)) {
|
| + let delta = dart.notNull(base[_pathStart]) - dart.notNull(ref[_pathStart]);
|
| + let newUri = dart.notNull(base[_uri][dartx.substring](0, base[_pathStart])) + dart.notNull(ref[_uri][dartx.substring](ref[_pathStart]));
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], base[_hostStart], base[_portStart], base[_pathStart], dart.notNull(ref[_queryStart]) + delta, dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + }
|
| + if (dart.test(base.hasEmptyPath) && dart.test(base.hasAuthority)) {
|
| + let refStart = ref[_pathStart];
|
| + while (dart.test(ref[_uri][dartx.startsWith]("../", refStart))) {
|
| + refStart = dart.notNull(refStart) + 3;
|
| + }
|
| + let delta = dart.notNull(base[_pathStart]) - dart.notNull(refStart) + 1;
|
| + let newUri = dart.str`${base[_uri][dartx.substring](0, base[_pathStart])}/` + dart.str`${ref[_uri][dartx.substring](refStart)}`;
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], base[_hostStart], base[_portStart], base[_pathStart], dart.notNull(ref[_queryStart]) + delta, dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + }
|
| + let baseUri = base[_uri];
|
| + let refUri = ref[_uri];
|
| + let baseStart = base[_pathStart];
|
| + let baseEnd = base[_queryStart];
|
| + while (dart.test(baseUri[dartx.startsWith]("../", baseStart))) {
|
| + baseStart = dart.notNull(baseStart) + 3;
|
| + }
|
| + let refStart = ref[_pathStart];
|
| + let refEnd = ref[_queryStart];
|
| + let backCount = 0;
|
| + while (dart.notNull(refStart) + 3 <= dart.notNull(refEnd) && dart.test(refUri[dartx.startsWith]("../", refStart))) {
|
| + refStart = dart.notNull(refStart) + 3;
|
| + backCount = backCount + 1;
|
| + }
|
| + let insert = "";
|
| + while (dart.notNull(baseEnd) > dart.notNull(baseStart)) {
|
| + baseEnd = dart.notNull(baseEnd) - 1;
|
| + let char = baseUri[dartx.codeUnitAt](baseEnd);
|
| + if (char == core._SLASH) {
|
| + insert = "/";
|
| + if (backCount == 0) break;
|
| + backCount--;
|
| + }
|
| + }
|
| + if (baseEnd == baseStart && !dart.test(base.hasScheme) && !dart.test(base.hasAbsolutePath)) {
|
| + insert = "";
|
| + refStart = dart.notNull(refStart) - backCount * 3;
|
| + }
|
| + let delta = dart.notNull(baseEnd) - dart.notNull(refStart) + dart.notNull(insert[dartx.length]);
|
| + let newUri = dart.str`${base[_uri][dartx.substring](0, baseEnd)}${insert}` + dart.str`${ref[_uri][dartx.substring](refStart)}`;
|
| + return new core._SimpleUri(newUri, base[_schemeEnd], base[_hostStart], base[_portStart], base[_pathStart], dart.notNull(ref[_queryStart]) + delta, dart.notNull(ref[_fragmentStart]) + delta, base[_schemeCache]);
|
| + }
|
| + toFilePath(opts) {
|
| + let windows = opts && 'windows' in opts ? opts.windows : null;
|
| + if (dart.notNull(this[_schemeEnd]) >= 0 && !dart.test(this[_isFile])) {
|
| + dart.throw(new core.UnsupportedError(dart.str`Cannot extract a file path from a ${this.scheme} URI`));
|
| + }
|
| + if (dart.notNull(this[_queryStart]) < dart.notNull(this[_uri][dartx.length])) {
|
| + if (dart.notNull(this[_queryStart]) < dart.notNull(this[_fragmentStart])) {
|
| + dart.throw(new core.UnsupportedError("Cannot extract a file path from a URI with a query component"));
|
| + }
|
| + dart.throw(new core.UnsupportedError("Cannot extract a file path from a URI with a fragment component"));
|
| + }
|
| + if (windows == null) windows = core._Uri._isWindows;
|
| + return dart.test(windows) ? core._Uri._toWindowsFilePath(this) : this[_toFilePath]();
|
| + }
|
| + [_toFilePath]() {
|
| + if (dart.notNull(this[_hostStart]) < dart.notNull(this[_portStart])) {
|
| + dart.throw(new core.UnsupportedError("Cannot extract a non-Windows file path from a file URI " + "with an authority"));
|
| + }
|
| + return this.path;
|
| + }
|
| + get data() {
|
| + dart.assert(this.scheme != "data");
|
| + return null;
|
| + }
|
| + get hashCode() {
|
| + return (() => {
|
| + let t = this[_hashCodeCache];
|
| + return t == null ? this[_hashCodeCache] = dart.hashCode(this[_uri]) : t;
|
| + })();
|
| + }
|
| + ['=='](other) {
|
| + if (core.identical(this, other)) return true;
|
| + if (core.Uri.is(other)) return this[_uri] == dart.toString(other);
|
| + return false;
|
| + }
|
| + [_toNonSimple]() {
|
| + return new core._Uri._internal(this.scheme, this.userInfo, dart.test(this.hasAuthority) ? this.host : null, dart.test(this.hasPort) ? this.port : null, this.path, dart.test(this.hasQuery) ? this.query : null, dart.test(this.hasFragment) ? this.fragment : null);
|
| + }
|
| + toString() {
|
| + return this[_uri];
|
| + }
|
| +};
|
| +core._SimpleUri[dart.implements] = () => [core.Uri];
|
| +dart.setSignature(core._SimpleUri, {
|
| + constructors: () => ({new: dart.definiteFunctionType(core._SimpleUri, [core.String, core.int, core.int, core.int, core.int, core.int, core.int, core.String])}),
|
| + fields: () => ({
|
| + [_uri]: core.String,
|
| + [_schemeEnd]: core.int,
|
| + [_hostStart]: core.int,
|
| + [_portStart]: core.int,
|
| + [_pathStart]: core.int,
|
| + [_queryStart]: core.int,
|
| + [_fragmentStart]: core.int,
|
| + [_schemeCache]: core.String,
|
| + [_hashCodeCache]: core.int
|
| + }),
|
| + getters: () => ({
|
| + hasScheme: dart.definiteFunctionType(core.bool, []),
|
| + hasAuthority: dart.definiteFunctionType(core.bool, []),
|
| + hasUserInfo: dart.definiteFunctionType(core.bool, []),
|
| + hasPort: dart.definiteFunctionType(core.bool, []),
|
| + hasQuery: dart.definiteFunctionType(core.bool, []),
|
| + hasFragment: dart.definiteFunctionType(core.bool, []),
|
| + [_isFile]: dart.definiteFunctionType(core.bool, []),
|
| + [_isHttp]: dart.definiteFunctionType(core.bool, []),
|
| + [_isHttps]: dart.definiteFunctionType(core.bool, []),
|
| + [_isPackage]: dart.definiteFunctionType(core.bool, []),
|
| + hasAbsolutePath: dart.definiteFunctionType(core.bool, []),
|
| + hasEmptyPath: dart.definiteFunctionType(core.bool, []),
|
| + isAbsolute: dart.definiteFunctionType(core.bool, []),
|
| + scheme: dart.definiteFunctionType(core.String, []),
|
| + authority: dart.definiteFunctionType(core.String, []),
|
| + userInfo: dart.definiteFunctionType(core.String, []),
|
| + host: dart.definiteFunctionType(core.String, []),
|
| + port: dart.definiteFunctionType(core.int, []),
|
| + path: dart.definiteFunctionType(core.String, []),
|
| + query: dart.definiteFunctionType(core.String, []),
|
| + fragment: dart.definiteFunctionType(core.String, []),
|
| + origin: dart.definiteFunctionType(core.String, []),
|
| + pathSegments: dart.definiteFunctionType(core.List$(core.String), []),
|
| + queryParameters: dart.definiteFunctionType(core.Map$(core.String, core.String), []),
|
| + queryParametersAll: dart.definiteFunctionType(core.Map$(core.String, core.List$(core.String)), []),
|
| + data: dart.definiteFunctionType(core.UriData, [])
|
| + }),
|
| + methods: () => ({
|
| + [_isScheme]: dart.definiteFunctionType(core.bool, [core.String]),
|
| + isScheme: dart.definiteFunctionType(core.bool, [core.String]),
|
| + [_isPort]: dart.definiteFunctionType(core.bool, [core.String]),
|
| + normalizePath: dart.definiteFunctionType(core.Uri, []),
|
| + removeFragment: dart.definiteFunctionType(core.Uri, []),
|
| + replace: dart.definiteFunctionType(core.Uri, [], {scheme: core.String, userInfo: core.String, host: core.String, port: core.int, path: core.String, pathSegments: IterableOfString(), query: core.String, queryParameters: MapOfString$dynamic(), fragment: core.String}),
|
| + resolve: dart.definiteFunctionType(core.Uri, [core.String]),
|
| + resolveUri: dart.definiteFunctionType(core.Uri, [core.Uri]),
|
| + [_simpleMerge]: dart.definiteFunctionType(core.Uri, [core._SimpleUri, core._SimpleUri]),
|
| + toFilePath: dart.definiteFunctionType(core.String, [], {windows: core.bool}),
|
| + [_toFilePath]: dart.definiteFunctionType(core.String, []),
|
| + '==': dart.definiteFunctionType(core.bool, [core.Object]),
|
| + [_toNonSimple]: dart.definiteFunctionType(core.Uri, [])
|
| + })
|
| +});
|
| +core._startsWithData = function(text, start) {
|
| + let delta = ((dart.notNull(text[dartx.codeUnitAt](dart.notNull(start) + 4)) ^ core._COLON) >>> 0) * 3;
|
| + delta = (delta | dart.notNull(text[dartx.codeUnitAt](start)) ^ 100) >>> 0;
|
| + delta = (delta | dart.notNull(text[dartx.codeUnitAt](dart.notNull(start) + 1)) ^ 97) >>> 0;
|
| + delta = (delta | dart.notNull(text[dartx.codeUnitAt](dart.notNull(start) + 2)) ^ 116) >>> 0;
|
| + delta = (delta | dart.notNull(text[dartx.codeUnitAt](dart.notNull(start) + 3)) ^ 97) >>> 0;
|
| + return delta;
|
| +};
|
| +dart.fn(core._startsWithData, StringAndintToint());
|
| +core._stringOrNullLength = function(s) {
|
| + return s == null ? 0 : s[dartx.length];
|
| +};
|
| +dart.fn(core._stringOrNullLength, StringToint());
|
| developer.debugger = function(opts) {
|
| let when = opts && 'when' in opts ? opts.when : true;
|
| let message = opts && 'message' in opts ? opts.message : null;
|
| @@ -36823,6 +37507,57 @@ dart.defineLazy(developer, {
|
| }
|
| });
|
| developer._clockValue = 0;
|
| +developer._FakeUserTag = class _FakeUserTag extends core.Object {
|
| + real(label) {
|
| + this.label = label;
|
| + }
|
| + static new(label) {
|
| + let existingTag = developer._FakeUserTag._instances[dartx._get](label);
|
| + if (existingTag != null) {
|
| + return developer._FakeUserTag._check(existingTag);
|
| + }
|
| + if (developer._FakeUserTag._instances[dartx.length] == developer.UserTag.MAX_USER_TAGS) {
|
| + dart.throw(new core.UnsupportedError(dart.str`UserTag instance limit (${developer.UserTag.MAX_USER_TAGS}) reached.`));
|
| + }
|
| + let instance = new developer._FakeUserTag.real(label);
|
| + developer._FakeUserTag._instances[dartx._set](label, instance);
|
| + return instance;
|
| + }
|
| + makeCurrent() {
|
| + let old = developer._currentTag;
|
| + developer._currentTag = this;
|
| + return old;
|
| + }
|
| +};
|
| +dart.defineNamedConstructor(developer._FakeUserTag, 'real');
|
| +developer._FakeUserTag[dart.implements] = () => [developer.UserTag];
|
| +dart.setSignature(developer._FakeUserTag, {
|
| + constructors: () => ({
|
| + real: dart.definiteFunctionType(developer._FakeUserTag, [core.String]),
|
| + new: dart.definiteFunctionType(developer._FakeUserTag, [core.String])
|
| + }),
|
| + fields: () => ({label: core.String}),
|
| + methods: () => ({makeCurrent: dart.definiteFunctionType(developer.UserTag, [])}),
|
| + sfields: () => ({
|
| + _instances: core.Map,
|
| + _defaultTag: developer.UserTag
|
| + })
|
| +});
|
| +dart.defineLazy(developer._FakeUserTag, {
|
| + get _instances() {
|
| + return dart.map();
|
| + },
|
| + set _instances(_) {},
|
| + get _defaultTag() {
|
| + return developer._FakeUserTag.new('Default');
|
| + }
|
| +});
|
| +dart.defineLazy(developer, {
|
| + get _currentTag() {
|
| + return developer._FakeUserTag._defaultTag;
|
| + },
|
| + set _currentTag(_) {}
|
| +});
|
| const _result = Symbol('_result');
|
| const _errorCode = Symbol('_errorCode');
|
| const _errorDetail = Symbol('_errorDetail');
|
| @@ -36958,7 +37693,7 @@ developer.postEvent = function(eventKind, eventData) {
|
| dart.fn(developer.postEvent, StringAndMapTovoid());
|
| developer._postEvent = function(eventKind, eventData) {
|
| };
|
| -dart.fn(developer._postEvent, StringAndStringTodynamic());
|
| +dart.fn(developer._postEvent, StringAndStringTovoid());
|
| developer._lookupExtension = function(method) {
|
| return developer._extensions[dartx._get](method);
|
| };
|
| @@ -36981,57 +37716,6 @@ dart.setSignature(developer.UserTag, {
|
| sgetters: () => ({defaultTag: dart.definiteFunctionType(developer.UserTag, [])})
|
| });
|
| developer.UserTag.MAX_USER_TAGS = 64;
|
| -developer._FakeUserTag = class _FakeUserTag extends core.Object {
|
| - real(label) {
|
| - this.label = label;
|
| - }
|
| - static new(label) {
|
| - let existingTag = developer._FakeUserTag._instances[dartx._get](label);
|
| - if (existingTag != null) {
|
| - return developer._FakeUserTag._check(existingTag);
|
| - }
|
| - if (developer._FakeUserTag._instances[dartx.length] == developer.UserTag.MAX_USER_TAGS) {
|
| - dart.throw(new core.UnsupportedError(dart.str`UserTag instance limit (${developer.UserTag.MAX_USER_TAGS}) reached.`));
|
| - }
|
| - let instance = new developer._FakeUserTag.real(label);
|
| - developer._FakeUserTag._instances[dartx._set](label, instance);
|
| - return instance;
|
| - }
|
| - makeCurrent() {
|
| - let old = developer._currentTag;
|
| - developer._currentTag = this;
|
| - return old;
|
| - }
|
| -};
|
| -dart.defineNamedConstructor(developer._FakeUserTag, 'real');
|
| -developer._FakeUserTag[dart.implements] = () => [developer.UserTag];
|
| -dart.setSignature(developer._FakeUserTag, {
|
| - constructors: () => ({
|
| - real: dart.definiteFunctionType(developer._FakeUserTag, [core.String]),
|
| - new: dart.definiteFunctionType(developer._FakeUserTag, [core.String])
|
| - }),
|
| - fields: () => ({label: core.String}),
|
| - methods: () => ({makeCurrent: dart.definiteFunctionType(developer.UserTag, [])}),
|
| - sfields: () => ({
|
| - _instances: core.Map,
|
| - _defaultTag: developer.UserTag
|
| - })
|
| -});
|
| -dart.defineLazy(developer._FakeUserTag, {
|
| - get _instances() {
|
| - return dart.map();
|
| - },
|
| - set _instances(_) {},
|
| - get _defaultTag() {
|
| - return developer._FakeUserTag.new('Default');
|
| - }
|
| -});
|
| -dart.defineLazy(developer, {
|
| - get _currentTag() {
|
| - return developer._FakeUserTag._defaultTag;
|
| - },
|
| - set _currentTag(_) {}
|
| -});
|
| developer.getCurrentTag = function() {
|
| return developer._currentTag;
|
| };
|
| @@ -37505,20 +38189,27 @@ developer.Service = class Service extends core.Object {
|
| return new developer.ServiceProtocolInfo(uri);
|
| }, developer.ServiceProtocolInfo, opts);
|
| }
|
| + static getIsolateID(isolate) {
|
| + if (!isolate.Isolate.is(isolate)) {
|
| + dart.throw(new core.ArgumentError.value(isolate, 'isolate', 'Must be an Isolate'));
|
| + }
|
| + return developer._getIsolateIDFromSendPort(isolate.controlPort);
|
| + }
|
| };
|
| dart.setSignature(developer.Service, {
|
| statics: () => ({
|
| getInfo: dart.definiteFunctionType(async.Future$(developer.ServiceProtocolInfo), []),
|
| - controlWebServer: dart.definiteFunctionType(async.Future$(developer.ServiceProtocolInfo), [], {enable: core.bool})
|
| + controlWebServer: dart.definiteFunctionType(async.Future$(developer.ServiceProtocolInfo), [], {enable: core.bool}),
|
| + getIsolateID: dart.definiteFunctionType(core.String, [isolate.Isolate])
|
| }),
|
| - names: ['getInfo', 'controlWebServer']
|
| + names: ['getInfo', 'controlWebServer', 'getIsolateID']
|
| });
|
| -developer._getServerInfo = function(sp) {
|
| - sp.send(null);
|
| +developer._getServerInfo = function(sendPort) {
|
| + sendPort.send(null);
|
| };
|
| dart.lazyFn(developer._getServerInfo, () => SendPortTovoid());
|
| -developer._webServerControl = function(sp, enable) {
|
| - sp.send(null);
|
| +developer._webServerControl = function(sendPort, enable) {
|
| + sendPort.send(null);
|
| };
|
| dart.lazyFn(developer._webServerControl, () => SendPortAndboolTovoid());
|
| developer._getServiceMajorVersion = function() {
|
| @@ -37529,6 +38220,10 @@ developer._getServiceMinorVersion = function() {
|
| return 0;
|
| };
|
| dart.fn(developer._getServiceMinorVersion, VoidToint());
|
| +developer._getIsolateIDFromSendPort = function(sendPort) {
|
| + return null;
|
| +};
|
| +dart.lazyFn(developer._getIsolateIDFromSendPort, () => SendPortToString());
|
| io.BytesBuilder = class BytesBuilder extends core.Object {
|
| static new(opts) {
|
| let copy = opts && 'copy' in opts ? opts.copy : true;
|
| @@ -37542,27 +38237,21 @@ io.BytesBuilder = class BytesBuilder extends core.Object {
|
| dart.setSignature(io.BytesBuilder, {
|
| constructors: () => ({new: dart.definiteFunctionType(io.BytesBuilder, [], {copy: core.bool})})
|
| });
|
| -const _length = Symbol('_length');
|
| const _buffer = Symbol('_buffer');
|
| -const _pow2roundup = Symbol('_pow2roundup');
|
| +const _length = Symbol('_length');
|
| +const _grow = Symbol('_grow');
|
| io._CopyingBytesBuilder = class _CopyingBytesBuilder extends core.Object {
|
| - new() {
|
| + new(initialCapacity) {
|
| + if (initialCapacity === void 0) initialCapacity = 0;
|
| + this[_buffer] = dart.notNull(initialCapacity) <= 0 ? io._CopyingBytesBuilder._emptyList : typed_data.Uint8List.new(io._CopyingBytesBuilder._pow2roundup(initialCapacity));
|
| this[_length] = 0;
|
| - this[_buffer] = null;
|
| }
|
| add(bytes) {
|
| let bytesLength = bytes[dartx.length];
|
| if (bytesLength == 0) return;
|
| let required = dart.notNull(this[_length]) + dart.notNull(bytesLength);
|
| - if (this[_buffer] == null) {
|
| - let size = this[_pow2roundup](required);
|
| - size = math.max(core.int)(size, io._CopyingBytesBuilder._INIT_SIZE);
|
| - this[_buffer] = typed_data.Uint8List.new(size);
|
| - } else if (dart.notNull(this[_buffer][dartx.length]) < required) {
|
| - let size = dart.notNull(this[_pow2roundup](required)) * 2;
|
| - let newBuffer = typed_data.Uint8List.new(size);
|
| - newBuffer[dartx.setRange](0, this[_buffer][dartx.length], this[_buffer]);
|
| - this[_buffer] = newBuffer;
|
| + if (dart.notNull(this[_buffer][dartx.length]) < required) {
|
| + this[_grow](required);
|
| }
|
| dart.assert(dart.notNull(this[_buffer][dartx.length]) >= required);
|
| if (typed_data.Uint8List.is(bytes)) {
|
| @@ -37575,16 +38264,32 @@ io._CopyingBytesBuilder = class _CopyingBytesBuilder extends core.Object {
|
| this[_length] = required;
|
| }
|
| addByte(byte) {
|
| - this.add(JSArrayOfint().of([byte]));
|
| + if (this[_buffer][dartx.length] == this[_length]) {
|
| + this[_grow](this[_length]);
|
| + }
|
| + dart.assert(dart.notNull(this[_buffer][dartx.length]) > dart.notNull(this[_length]));
|
| + this[_buffer][dartx._set](this[_length], byte);
|
| + this[_length] = dart.notNull(this[_length]) + 1;
|
| + }
|
| + [_grow](required) {
|
| + let newSize = dart.notNull(required) * 2;
|
| + if (dart.notNull(newSize) < io._CopyingBytesBuilder._INIT_SIZE) {
|
| + newSize = io._CopyingBytesBuilder._INIT_SIZE;
|
| + } else {
|
| + newSize = io._CopyingBytesBuilder._pow2roundup(newSize);
|
| + }
|
| + let newBuffer = typed_data.Uint8List.new(newSize);
|
| + newBuffer[dartx.setRange](0, this[_buffer][dartx.length], this[_buffer]);
|
| + this[_buffer] = newBuffer;
|
| }
|
| takeBytes() {
|
| - if (this[_buffer] == null) return typed_data.Uint8List.new(0);
|
| + if (this[_length] == 0) return io._CopyingBytesBuilder._emptyList;
|
| let buffer = typed_data.Uint8List.view(this[_buffer][dartx.buffer], 0, this[_length]);
|
| this.clear();
|
| return buffer;
|
| }
|
| toBytes() {
|
| - if (this[_buffer] == null) return typed_data.Uint8List.new(0);
|
| + if (this[_length] == 0) return io._CopyingBytesBuilder._emptyList;
|
| return typed_data.Uint8List.fromList(typed_data.Uint8List.view(this[_buffer][dartx.buffer], 0, this[_length]));
|
| }
|
| get length() {
|
| @@ -37598,9 +38303,10 @@ io._CopyingBytesBuilder = class _CopyingBytesBuilder extends core.Object {
|
| }
|
| clear() {
|
| this[_length] = 0;
|
| - this[_buffer] = null;
|
| + this[_buffer] = io._CopyingBytesBuilder._emptyList;
|
| }
|
| - [_pow2roundup](x) {
|
| + static _pow2roundup(x) {
|
| + dart.assert(dart.notNull(x) > 0);
|
| x = dart.notNull(x) - 1;
|
| x = (dart.notNull(x) | x[dartx['>>']](1)) >>> 0;
|
| x = (dart.notNull(x) | x[dartx['>>']](2)) >>> 0;
|
| @@ -37612,6 +38318,7 @@ io._CopyingBytesBuilder = class _CopyingBytesBuilder extends core.Object {
|
| };
|
| io._CopyingBytesBuilder[dart.implements] = () => [io.BytesBuilder];
|
| dart.setSignature(io._CopyingBytesBuilder, {
|
| + constructors: () => ({new: dart.definiteFunctionType(io._CopyingBytesBuilder, [], [core.int])}),
|
| fields: () => ({
|
| [_length]: core.int,
|
| [_buffer]: typed_data.Uint8List
|
| @@ -37624,34 +38331,52 @@ dart.setSignature(io._CopyingBytesBuilder, {
|
| methods: () => ({
|
| add: dart.definiteFunctionType(dart.void, [ListOfint()]),
|
| addByte: dart.definiteFunctionType(dart.void, [core.int]),
|
| + [_grow]: dart.definiteFunctionType(dart.void, [core.int]),
|
| takeBytes: dart.definiteFunctionType(core.List$(core.int), []),
|
| toBytes: dart.definiteFunctionType(core.List$(core.int), []),
|
| - clear: dart.definiteFunctionType(dart.void, []),
|
| - [_pow2roundup]: dart.definiteFunctionType(core.int, [core.int])
|
| + clear: dart.definiteFunctionType(dart.void, [])
|
| + }),
|
| + sfields: () => ({
|
| + _INIT_SIZE: core.int,
|
| + _emptyList: typed_data.Uint8List
|
| }),
|
| - sfields: () => ({_INIT_SIZE: core.int})
|
| + statics: () => ({_pow2roundup: dart.definiteFunctionType(core.int, [core.int])}),
|
| + names: ['_pow2roundup']
|
| });
|
| io._CopyingBytesBuilder._INIT_SIZE = 1024;
|
| +dart.defineLazy(io._CopyingBytesBuilder, {
|
| + get _emptyList() {
|
| + return typed_data.Uint8List.new(0);
|
| + }
|
| +});
|
| const _chunks = Symbol('_chunks');
|
| io._BytesBuilder = class _BytesBuilder extends core.Object {
|
| new() {
|
| - this[_chunks] = JSArrayOfListOfint().of([]);
|
| + this[_chunks] = JSArrayOfUint8List().of([]);
|
| this[_length] = 0;
|
| }
|
| add(bytes) {
|
| - if (!typed_data.Uint8List.is(bytes)) {
|
| - bytes = typed_data.Uint8List.fromList(bytes);
|
| + let typedBytes = null;
|
| + if (typed_data.Uint8List.is(bytes)) {
|
| + typedBytes = bytes;
|
| + } else {
|
| + typedBytes = typed_data.Uint8List.fromList(bytes);
|
| }
|
| - this[_chunks][dartx.add](bytes);
|
| - this[_length] = dart.notNull(this[_length]) + dart.notNull(bytes[dartx.length]);
|
| + this[_chunks][dartx.add](typedBytes);
|
| + this[_length] = dart.notNull(this[_length]) + dart.notNull(typedBytes[dartx.length]);
|
| }
|
| addByte(byte) {
|
| - this.add(JSArrayOfint().of([byte]));
|
| + this[_chunks][dartx.add]((() => {
|
| + let _ = typed_data.Uint8List.new(1);
|
| + _[dartx._set](0, byte);
|
| + return _;
|
| + })());
|
| + this[_length] = dart.notNull(this[_length]) + 1;
|
| }
|
| takeBytes() {
|
| - if (this[_chunks][dartx.length] == 0) return typed_data.Uint8List.new(0);
|
| + if (this[_length] == 0) return io._CopyingBytesBuilder._emptyList;
|
| if (this[_chunks][dartx.length] == 1) {
|
| - let buffer = this[_chunks][dartx.single];
|
| + let buffer = this[_chunks][dartx._get](0);
|
| this.clear();
|
| return buffer;
|
| }
|
| @@ -37665,7 +38390,7 @@ io._BytesBuilder = class _BytesBuilder extends core.Object {
|
| return buffer;
|
| }
|
| toBytes() {
|
| - if (this[_chunks][dartx.length] == 0) return typed_data.Uint8List.new(0);
|
| + if (this[_length] == 0) return io._CopyingBytesBuilder._emptyList;
|
| let buffer = typed_data.Uint8List.new(this[_length]);
|
| let offset = 0;
|
| for (let chunk of this[_chunks]) {
|
| @@ -37692,7 +38417,7 @@ io._BytesBuilder[dart.implements] = () => [io.BytesBuilder];
|
| dart.setSignature(io._BytesBuilder, {
|
| fields: () => ({
|
| [_length]: core.int,
|
| - [_chunks]: ListOfListOfint()
|
| + [_chunks]: ListOfUint8List()
|
| }),
|
| getters: () => ({
|
| length: dart.definiteFunctionType(core.int, []),
|
| @@ -37723,7 +38448,7 @@ io._exceptionFromResponse = function(response, message, path) {
|
| switch (dart.dindex(response, io._ERROR_RESPONSE_ERROR_TYPE)) {
|
| case io._ILLEGAL_ARGUMENT_RESPONSE:
|
| {
|
| - return new core.ArgumentError();
|
| + return new core.ArgumentError(dart.str`${message}: ${path}`);
|
| }
|
| case io._OSERROR_RESPONSE:
|
| {
|
| @@ -37787,9 +38512,9 @@ io._BufferAndStart = class _BufferAndStart extends core.Object {
|
| }
|
| };
|
| dart.setSignature(io._BufferAndStart, {
|
| - constructors: () => ({new: dart.definiteFunctionType(io._BufferAndStart, [core.List, core.int])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(io._BufferAndStart, [ListOfint(), core.int])}),
|
| fields: () => ({
|
| - buffer: core.List,
|
| + buffer: ListOfint(),
|
| start: core.int
|
| })
|
| });
|
| @@ -37801,7 +38526,7 @@ io._ensureFastAndSerializableByteData = function(buffer, start, end) {
|
| let newBuffer = typed_data.Uint8List.new(length);
|
| let j = start;
|
| for (let i = 0; i < length; i++) {
|
| - let value = core.int._check(buffer[dartx._get](j));
|
| + let value = buffer[dartx._get](j);
|
| if (!(typeof value == 'number')) {
|
| dart.throw(new core.ArgumentError(dart.str`List element is not an integer at index ${j}`));
|
| }
|
| @@ -37810,7 +38535,7 @@ io._ensureFastAndSerializableByteData = function(buffer, start, end) {
|
| }
|
| return new io._BufferAndStart(newBuffer, 0);
|
| };
|
| -dart.fn(io._ensureFastAndSerializableByteData, ListAndintAndintTo_BufferAndStart());
|
| +dart.fn(io._ensureFastAndSerializableByteData, ListOfintAndintAndintTo_BufferAndStart());
|
| io._IOCrypto = class _IOCrypto extends core.Object {
|
| static getRandomBytes(count) {
|
| dart.throw(new core.UnsupportedError("_IOCrypto.getRandomBytes"));
|
| @@ -37985,13 +38710,13 @@ io._HashBase = class _HashBase extends core.Object {
|
| }
|
| close() {
|
| if (dart.test(this[_digestCalled])) {
|
| - return ListOfint()._check(this[_resultAsBytes]());
|
| + return this[_resultAsBytes]();
|
| }
|
| this[_digestCalled] = true;
|
| this[_finalizeData]();
|
| this[_iterate]();
|
| dart.assert(this[_pendingData][dartx.length] == 0);
|
| - return ListOfint()._check(this[_resultAsBytes]());
|
| + return this[_resultAsBytes]();
|
| }
|
| get blockSize() {
|
| return dart.notNull(this[_chunkSizeInWords]) * io._BYTES_PER_WORD;
|
| @@ -38007,9 +38732,9 @@ io._HashBase = class _HashBase extends core.Object {
|
| return (val[dartx['<<']](mod_shift) & io._MASK_32 | ((dart.notNull(val) & io._MASK_32) >>> 0)[dartx['>>']](32 - mod_shift)) >>> 0;
|
| }
|
| [_resultAsBytes]() {
|
| - let result = [];
|
| + let result = JSArrayOfint().of([]);
|
| for (let i = 0; i < dart.notNull(this[_h][dartx.length]); i++) {
|
| - result[dartx.addAll](core.Iterable._check(this[_wordToBytes](this[_h][dartx._get](i))));
|
| + result[dartx.addAll](this[_wordToBytes](this[_h][dartx._get](i)));
|
| }
|
| return result;
|
| }
|
| @@ -38060,11 +38785,11 @@ io._HashBase = class _HashBase extends core.Object {
|
| let lengthInBits = dart.notNull(this[_lengthInBytes]) * io._BITS_PER_BYTE;
|
| dart.assert(lengthInBits < dart.notNull(math.pow(2, 32)));
|
| if (dart.test(this[_bigEndianWords])) {
|
| - this[_pendingData][dartx.addAll](IterableOfint()._check(this[_wordToBytes](0)));
|
| - this[_pendingData][dartx.addAll](IterableOfint()._check(this[_wordToBytes]((lengthInBits & io._MASK_32) >>> 0)));
|
| + this[_pendingData][dartx.addAll](this[_wordToBytes](0));
|
| + this[_pendingData][dartx.addAll](this[_wordToBytes]((lengthInBits & io._MASK_32) >>> 0));
|
| } else {
|
| - this[_pendingData][dartx.addAll](IterableOfint()._check(this[_wordToBytes]((lengthInBits & io._MASK_32) >>> 0)));
|
| - this[_pendingData][dartx.addAll](IterableOfint()._check(this[_wordToBytes](0)));
|
| + this[_pendingData][dartx.addAll](this[_wordToBytes]((lengthInBits & io._MASK_32) >>> 0));
|
| + this[_pendingData][dartx.addAll](this[_wordToBytes](0));
|
| }
|
| }
|
| };
|
| @@ -38087,9 +38812,9 @@ dart.setSignature(io._HashBase, {
|
| [_add32]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic]),
|
| [_roundUp]: dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic]),
|
| [_rotl32]: dart.definiteFunctionType(core.int, [core.int, core.int]),
|
| - [_resultAsBytes]: dart.definiteFunctionType(dart.dynamic, []),
|
| + [_resultAsBytes]: dart.definiteFunctionType(core.List$(core.int), []),
|
| [_bytesToChunk]: dart.definiteFunctionType(dart.dynamic, [ListOfint(), core.int]),
|
| - [_wordToBytes]: dart.definiteFunctionType(dart.dynamic, [core.int]),
|
| + [_wordToBytes]: dart.definiteFunctionType(core.List$(core.int), [core.int]),
|
| [_iterate]: dart.definiteFunctionType(dart.dynamic, []),
|
| [_finalizeData]: dart.definiteFunctionType(dart.dynamic, [])
|
| })
|
| @@ -38403,6 +39128,7 @@ io.ZLibEncoder = class ZLibEncoder extends convert.Converter$(core.List$(core.in
|
| }
|
| };
|
| dart.addSimpleTypeTests(io.ZLibEncoder);
|
| +io.ZLibEncoder[dart.implements] = () => [ChunkedConverterOfListOfint$ListOfint$ListOfint$ListOfint()];
|
| dart.setSignature(io.ZLibEncoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(io.ZLibEncoder, [], {gzip: core.bool, level: core.int, windowBits: core.int, memLevel: core.int, strategy: core.int, dictionary: ListOfint(), raw: core.bool})}),
|
| fields: () => ({
|
| @@ -38506,10 +39232,10 @@ io._FilterSink = class _FilterSink extends convert.ByteConversionSink {
|
| try {
|
| this[_empty] = false;
|
| let bufferAndStart = io._ensureFastAndSerializableByteData(data, start, end);
|
| - this[_filter].process(ListOfint()._check(bufferAndStart.buffer), bufferAndStart.start, dart.notNull(end) - (dart.notNull(start) - dart.notNull(bufferAndStart.start)));
|
| + this[_filter].process(bufferAndStart.buffer, bufferAndStart.start, dart.notNull(end) - (dart.notNull(start) - dart.notNull(bufferAndStart.start)));
|
| let out = null;
|
| while ((out = this[_filter].processed({flush: false})) != null) {
|
| - this[_sink].add(ListOfint()._check(out));
|
| + this[_sink].add(out);
|
| }
|
| } catch (e) {
|
| this[_closed] = true;
|
| @@ -38524,7 +39250,7 @@ io._FilterSink = class _FilterSink extends convert.ByteConversionSink {
|
| try {
|
| let out = null;
|
| while ((out = this[_filter].processed({end: true})) != null) {
|
| - this[_sink].add(ListOfint()._check(out));
|
| + this[_sink].add(out);
|
| }
|
| } catch (e) {
|
| this[_closed] = true;
|
| @@ -38639,7 +39365,6 @@ dart.setSignature(io.Directory, {
|
| const _isErrorResponse = Symbol('_isErrorResponse');
|
| const _exceptionOrErrorFromResponse = Symbol('_exceptionOrErrorFromResponse');
|
| const _absolutePath = Symbol('_absolutePath');
|
| -const _computeExistingIndex = Symbol('_computeExistingIndex');
|
| const _delete = Symbol('_delete');
|
| const _deleteSync = Symbol('_deleteSync');
|
| const _type = Symbol('_type');
|
| @@ -38660,6 +39385,12 @@ io.FileSystemEntity = class FileSystemEntity extends core.Object {
|
| io.FileSystemEntity._throwIfError(result, "Cannot resolve symbolic links", this.path);
|
| return core.String._check(result);
|
| }
|
| + stat() {
|
| + return io.FileStat.stat(this.path);
|
| + }
|
| + statSync() {
|
| + return io.FileStat.statSync(this.path);
|
| + }
|
| delete(opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| return this[_delete]({recursive: recursive});
|
| @@ -38823,6 +39554,8 @@ dart.setSignature(io.FileSystemEntity, {
|
| methods: () => ({
|
| resolveSymbolicLinks: dart.definiteFunctionType(async.Future$(core.String), []),
|
| resolveSymbolicLinksSync: dart.definiteFunctionType(core.String, []),
|
| + stat: dart.definiteFunctionType(async.Future$(io.FileStat), []),
|
| + statSync: dart.definiteFunctionType(io.FileStat, []),
|
| delete: dart.definiteFunctionType(async.Future$(io.FileSystemEntity), [], {recursive: core.bool}),
|
| deleteSync: dart.definiteFunctionType(dart.void, [], {recursive: core.bool}),
|
| watch: dart.definiteFunctionType(async.Stream$(io.FileSystemEvent), [], {events: core.int, recursive: core.bool})
|
| @@ -38933,33 +39666,6 @@ io._Directory = class _Directory extends io.FileSystemEntity {
|
| get absolute() {
|
| return io.Directory.new(this[_absolutePath]);
|
| }
|
| - stat() {
|
| - return io.FileStat.stat(this.path);
|
| - }
|
| - statSync() {
|
| - return io.FileStat.statSync(this.path);
|
| - }
|
| - [_computeExistingIndex](dirsToCreate) {
|
| - let future = null;
|
| - let notFound = dirsToCreate[dartx.length];
|
| - for (let i = 0; i < dart.notNull(dirsToCreate[dartx.length]); i++) {
|
| - if (future == null) {
|
| - future = dart.dsend(dart.dsend(dirsToCreate[dartx._get](i), 'exists'), 'then', dart.fn(e => dart.test(e) ? i : notFound, dynamicToint()));
|
| - } else {
|
| - future = dart.dsend(future, 'then', dart.fn(index => {
|
| - if (!dart.equals(index, notFound)) {
|
| - return async.Future.value(index);
|
| - }
|
| - return dart.dsend(dart.dsend(dirsToCreate[dartx._get](i), 'exists'), 'then', dart.fn(e => dart.test(e) ? i : notFound, dynamicToint()));
|
| - }, dynamicTodynamic()));
|
| - }
|
| - }
|
| - if (future == null) {
|
| - return FutureOfint().value(notFound);
|
| - } else {
|
| - return FutureOfint()._check(future);
|
| - }
|
| - }
|
| create(opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| if (dart.test(recursive)) {
|
| @@ -39070,7 +39776,7 @@ io._Directory = class _Directory extends io.FileSystemEntity {
|
| list(opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| let followLinks = opts && 'followLinks' in opts ? opts.followLinks : true;
|
| - return StreamOfFileSystemEntity()._check(new io._AsyncDirectoryLister(io.FileSystemEntity._ensureTrailingPathSeparators(this.path), recursive, followLinks).stream);
|
| + return new io._AsyncDirectoryLister(io.FileSystemEntity._ensureTrailingPathSeparators(this.path), recursive, followLinks).stream;
|
| }
|
| listSync(opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| @@ -39115,9 +39821,6 @@ dart.setSignature(io._Directory, {
|
| methods: () => ({
|
| exists: dart.definiteFunctionType(async.Future$(core.bool), []),
|
| existsSync: dart.definiteFunctionType(core.bool, []),
|
| - stat: dart.definiteFunctionType(async.Future$(io.FileStat), []),
|
| - statSync: dart.definiteFunctionType(io.FileStat, []),
|
| - [_computeExistingIndex]: dart.definiteFunctionType(async.Future$(core.int), [core.List]),
|
| create: dart.definiteFunctionType(async.Future$(io.Directory), [], {recursive: core.bool}),
|
| createSync: dart.definiteFunctionType(dart.void, [], {recursive: core.bool}),
|
| createTemp: dart.definiteFunctionType(async.Future$(io.Directory), [], [core.String]),
|
| @@ -39171,7 +39874,7 @@ io._AsyncDirectoryLister = class _AsyncDirectoryLister extends core.Object {
|
| this.nextRunning = false;
|
| this.closed = false;
|
| this[_ops] = null;
|
| - this.controller = async.StreamController.new({onListen: dart.bind(this, 'onListen'), onResume: dart.bind(this, 'onResume'), onCancel: dart.bind(this, 'onCancel'), sync: true});
|
| + this.controller = StreamControllerOfFileSystemEntity().new({onListen: dart.bind(this, 'onListen'), onResume: dart.bind(this, 'onResume'), onCancel: dart.bind(this, 'onCancel'), sync: true});
|
| }
|
| [_pointer]() {
|
| return this[_ops] == null ? null : this[_ops].getPointer();
|
| @@ -39299,14 +40002,14 @@ dart.setSignature(io._AsyncDirectoryLister, {
|
| path: core.String,
|
| recursive: core.bool,
|
| followLinks: core.bool,
|
| - controller: async.StreamController,
|
| + controller: StreamControllerOfFileSystemEntity(),
|
| canceled: core.bool,
|
| nextRunning: core.bool,
|
| closed: core.bool,
|
| [_ops]: io._AsyncDirectoryListerOps,
|
| closeCompleter: async.Completer
|
| }),
|
| - getters: () => ({stream: dart.definiteFunctionType(async.Stream, [])}),
|
| + getters: () => ({stream: dart.definiteFunctionType(async.Stream$(io.FileSystemEntity), [])}),
|
| methods: () => ({
|
| [_pointer]: dart.definiteFunctionType(core.int, []),
|
| onListen: dart.definiteFunctionType(dart.void, []),
|
| @@ -39394,7 +40097,9 @@ io.FileLock = class FileLock extends core.Object {
|
| toString() {
|
| return {
|
| 0: "FileLock.SHARED",
|
| - 1: "FileLock.EXCLUSIVE"
|
| + 1: "FileLock.EXCLUSIVE",
|
| + 2: "FileLock.BLOCKING_SHARED",
|
| + 3: "FileLock.BLOCKING_EXCLUSIVE"
|
| }[this.index];
|
| }
|
| };
|
| @@ -39403,7 +40108,9 @@ dart.setSignature(io.FileLock, {
|
| });
|
| dart.defineEnumValues(io.FileLock, [
|
| 'SHARED',
|
| - 'EXCLUSIVE'
|
| + 'EXCLUSIVE',
|
| + 'BLOCKING_SHARED',
|
| + 'BLOCKING_EXCLUSIVE'
|
| ]);
|
| io.File = class File extends core.Object {
|
| static new(path) {
|
| @@ -39734,12 +40441,6 @@ io._File = class _File extends io.FileSystemEntity {
|
| get absolute() {
|
| return io.File.new(this[_absolutePath]);
|
| }
|
| - stat() {
|
| - return io.FileStat.stat(this.path);
|
| - }
|
| - statSync() {
|
| - return io.FileStat.statSync(this.path);
|
| - }
|
| create(opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| let result = dart.test(recursive) ? this.parent.create({recursive: true}) : async.Future.value(null);
|
| @@ -39856,6 +40557,41 @@ io._File = class _File extends io.FileSystemEntity {
|
| io._File.throwIfError(result, "Cannot retrieve length of file", this.path);
|
| return core.int._check(result);
|
| }
|
| + lastAccessed() {
|
| + return io._IOService._dispatch(io._FILE_LAST_ACCESSED, JSArrayOfString().of([this.path])).then(core.DateTime)(dart.fn(response => {
|
| + if (dart.test(io._isErrorResponse(response))) {
|
| + dart.throw(io._exceptionFromResponse(response, "Cannot retrieve access time", this.path));
|
| + }
|
| + return new core.DateTime.fromMillisecondsSinceEpoch(core.int._check(response));
|
| + }, dynamicToDateTime()));
|
| + }
|
| + static _lastAccessed(path) {
|
| + dart.throw(new core.UnsupportedError("File._lastAccessed"));
|
| + }
|
| + lastAccessedSync() {
|
| + let ms = io._File._lastAccessed(this.path);
|
| + io._File.throwIfError(ms, "Cannot retrieve access time", this.path);
|
| + return new core.DateTime.fromMillisecondsSinceEpoch(core.int._check(ms));
|
| + }
|
| + setLastAccessed(time) {
|
| + let millis = time.millisecondsSinceEpoch;
|
| + return io._IOService._dispatch(io._FILE_SET_LAST_ACCESSED, JSArrayOfObject().of([this.path, millis])).then(dart.dynamic)(dart.fn(response => {
|
| + if (dart.test(io._isErrorResponse(response))) {
|
| + dart.throw(io._exceptionFromResponse(response, "Cannot set access time", this.path));
|
| + }
|
| + return null;
|
| + }, dynamicToNull()));
|
| + }
|
| + static _setLastAccessed(path, millis) {
|
| + dart.throw(new core.UnsupportedError("File._setLastAccessed"));
|
| + }
|
| + setLastAccessedSync(time) {
|
| + let millis = time.millisecondsSinceEpoch;
|
| + let result = io._File._setLastAccessed(this.path, millis);
|
| + if (io.OSError.is(result)) {
|
| + dart.throw(new io.FileSystemException("Failed to set file access time", this.path, result));
|
| + }
|
| + }
|
| lastModified() {
|
| return io._IOService._dispatch(io._FILE_LAST_MODIFIED, JSArrayOfString().of([this.path])).then(core.DateTime)(dart.fn(response => {
|
| if (dart.test(io._isErrorResponse(response))) {
|
| @@ -39872,6 +40608,25 @@ io._File = class _File extends io.FileSystemEntity {
|
| io._File.throwIfError(ms, "Cannot retrieve modification time", this.path);
|
| return new core.DateTime.fromMillisecondsSinceEpoch(core.int._check(ms));
|
| }
|
| + setLastModified(time) {
|
| + let millis = time.millisecondsSinceEpoch;
|
| + return io._IOService._dispatch(io._FILE_SET_LAST_MODIFIED, JSArrayOfObject().of([this.path, millis])).then(dart.dynamic)(dart.fn(response => {
|
| + if (dart.test(io._isErrorResponse(response))) {
|
| + dart.throw(io._exceptionFromResponse(response, "Cannot set modification time", this.path));
|
| + }
|
| + return null;
|
| + }, dynamicToNull()));
|
| + }
|
| + static _setLastModified(path, millis) {
|
| + dart.throw(new core.UnsupportedError("File._setLastModified"));
|
| + }
|
| + setLastModifiedSync(time) {
|
| + let millis = time.millisecondsSinceEpoch;
|
| + let result = io._File._setLastModified(this.path, millis);
|
| + if (io.OSError.is(result)) {
|
| + dart.throw(new io.FileSystemException("Failed to set file modification time", this.path, result));
|
| + }
|
| + }
|
| static _open(path, mode) {
|
| dart.throw(new core.UnsupportedError("File._open"));
|
| }
|
| @@ -39911,22 +40666,22 @@ io._File = class _File extends io.FileSystemEntity {
|
| readAsBytes() {
|
| function readDataChunked(file) {
|
| let builder = io.BytesBuilder.new({copy: false});
|
| - let completer = async.Completer.new();
|
| + let completer = CompleterOfListOfint().new();
|
| function read() {
|
| - dart.dsend(dart.dsend(file, 'read', io._BLOCK_SIZE), 'then', dart.fn(data => {
|
| - if (dart.test(dart.dsend(dart.dload(data, 'length'), '>', 0))) {
|
| - builder.add(ListOfint()._check(data));
|
| + file.read(io._BLOCK_SIZE).then(dart.dynamic)(dart.fn(data => {
|
| + if (dart.notNull(data[dartx.length]) > 0) {
|
| + builder.add(data);
|
| read();
|
| } else {
|
| completer.complete(builder.takeBytes());
|
| }
|
| - }, dynamicToNull()), {onError: dart.bind(completer, 'completeError')});
|
| + }, ListOfintToNull()), {onError: dart.bind(completer, 'completeError')});
|
| }
|
| dart.fn(read, VoidTovoid());
|
| read();
|
| - return FutureOfListOfint()._check(completer.future);
|
| + return completer.future;
|
| }
|
| - dart.fn(readDataChunked, dynamicToFutureOfListOfint());
|
| + dart.fn(readDataChunked, RandomAccessFileToFutureOfListOfint());
|
| return this.open().then(ListOfint())(dart.fn(file => file.length().then(ListOfint())(dart.fn(length => {
|
| if (length == 0) {
|
| return readDataChunked(file);
|
| @@ -39943,13 +40698,13 @@ io._File = class _File extends io.FileSystemEntity {
|
| let builder = io.BytesBuilder.new({copy: false});
|
| do {
|
| data = opened.readSync(io._BLOCK_SIZE);
|
| - if (dart.test(dart.dsend(dart.dload(data, 'length'), '>', 0))) builder.add(ListOfint()._check(data));
|
| - } while (dart.test(dart.dsend(dart.dload(data, 'length'), '>', 0)));
|
| + if (dart.notNull(data[dartx.length]) > 0) builder.add(data);
|
| + } while (dart.notNull(data[dartx.length]) > 0);
|
| data = builder.takeBytes();
|
| } else {
|
| data = opened.readSync(length);
|
| }
|
| - return ListOfint()._check(data);
|
| + return data;
|
| } finally {
|
| opened.closeSync();
|
| }
|
| @@ -40031,8 +40786,6 @@ dart.setSignature(io._File, {
|
| methods: () => ({
|
| exists: dart.definiteFunctionType(async.Future$(core.bool), []),
|
| existsSync: dart.definiteFunctionType(core.bool, []),
|
| - stat: dart.definiteFunctionType(async.Future$(io.FileStat), []),
|
| - statSync: dart.definiteFunctionType(io.FileStat, []),
|
| create: dart.definiteFunctionType(async.Future$(io.File), [], {recursive: core.bool}),
|
| createSync: dart.definiteFunctionType(dart.void, [], {recursive: core.bool}),
|
| [_delete]: dart.definiteFunctionType(async.Future$(io.File), [], {recursive: core.bool}),
|
| @@ -40044,8 +40797,14 @@ dart.setSignature(io._File, {
|
| open: dart.definiteFunctionType(async.Future$(io.RandomAccessFile), [], {mode: io.FileMode}),
|
| length: dart.definiteFunctionType(async.Future$(core.int), []),
|
| lengthSync: dart.definiteFunctionType(core.int, []),
|
| + lastAccessed: dart.definiteFunctionType(async.Future$(core.DateTime), []),
|
| + lastAccessedSync: dart.definiteFunctionType(core.DateTime, []),
|
| + setLastAccessed: dart.definiteFunctionType(async.Future, [core.DateTime]),
|
| + setLastAccessedSync: dart.definiteFunctionType(dart.void, [core.DateTime]),
|
| lastModified: dart.definiteFunctionType(async.Future$(core.DateTime), []),
|
| lastModifiedSync: dart.definiteFunctionType(core.DateTime, []),
|
| + setLastModified: dart.definiteFunctionType(async.Future, [core.DateTime]),
|
| + setLastModifiedSync: dart.definiteFunctionType(dart.void, [core.DateTime]),
|
| openSync: dart.definiteFunctionType(io.RandomAccessFile, [], {mode: io.FileMode}),
|
| openRead: dart.definiteFunctionType(async.Stream$(core.List$(core.int)), [], [core.int, core.int]),
|
| openWrite: dart.definiteFunctionType(io.IOSink, [], {mode: io.FileMode, encoding: convert.Encoding}),
|
| @@ -40072,13 +40831,16 @@ dart.setSignature(io._File, {
|
| _renameLink: dart.definiteFunctionType(dart.dynamic, [core.String, core.String]),
|
| _copy: dart.definiteFunctionType(dart.dynamic, [core.String, core.String]),
|
| _lengthFromPath: dart.definiteFunctionType(dart.dynamic, [core.String]),
|
| + _lastAccessed: dart.definiteFunctionType(dart.dynamic, [core.String]),
|
| + _setLastAccessed: dart.definiteFunctionType(dart.dynamic, [core.String, core.int]),
|
| _lastModified: dart.definiteFunctionType(dart.dynamic, [core.String]),
|
| + _setLastModified: dart.definiteFunctionType(dart.dynamic, [core.String, core.int]),
|
| _open: dart.definiteFunctionType(dart.dynamic, [core.String, core.int]),
|
| _openStdio: dart.definiteFunctionType(core.int, [core.int]),
|
| _openStdioSync: dart.definiteFunctionType(io.RandomAccessFile, [core.int]),
|
| throwIfError: dart.definiteFunctionType(dart.dynamic, [core.Object, core.String, core.String])
|
| }),
|
| - names: ['_exists', '_create', '_createLink', '_linkTarget', '_deleteNative', '_deleteLinkNative', '_rename', '_renameLink', '_copy', '_lengthFromPath', '_lastModified', '_open', '_openStdio', '_openStdioSync', 'throwIfError']
|
| + names: ['_exists', '_create', '_createLink', '_linkTarget', '_deleteNative', '_deleteLinkNative', '_rename', '_renameLink', '_copy', '_lengthFromPath', '_lastAccessed', '_setLastAccessed', '_lastModified', '_setLastModified', '_open', '_openStdio', '_openStdioSync', 'throwIfError']
|
| });
|
| io._RandomAccessFileOps = class _RandomAccessFileOps extends core.Object {
|
| static new(pointer) {
|
| @@ -40095,6 +40857,7 @@ const _maybeConnectHandler = Symbol('_maybeConnectHandler');
|
| const _maybePerformCleanup = Symbol('_maybePerformCleanup');
|
| const _dispatch = Symbol('_dispatch');
|
| const _checkAvailable = Symbol('_checkAvailable');
|
| +const _fileLockValue = Symbol('_fileLockValue');
|
| io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| new(pointer, path) {
|
| this.path = path;
|
| @@ -40166,8 +40929,8 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
|
| }
|
| this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
|
| - return FutureOrOfListOfint()._check(dart.dindex(response, 1));
|
| - }, dynamicToFutureOrOfListOfint()));
|
| + return ListOfint().as(dart.dindex(response, 1));
|
| + }, dynamicToListOfint()));
|
| }
|
| readSync(bytes) {
|
| this[_checkAvailable]();
|
| @@ -40179,7 +40942,7 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| dart.throw(new io.FileSystemException("readSync failed", this.path, result));
|
| }
|
| this[_resourceInfo].addRead(core.int._check(dart.dload(result, 'length')));
|
| - return ListOfint()._check(result);
|
| + return ListOfint().as(result);
|
| }
|
| readInto(buffer, start, end) {
|
| if (start === void 0) start = 0;
|
| @@ -40197,8 +40960,8 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| dart.throw(io._exceptionFromResponse(response, "readInto failed", this.path));
|
| }
|
| let read = dart.dindex(response, 1);
|
| - let data = dart.dindex(response, 2);
|
| - buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
|
| + let data = ListOfint().as(dart.dindex(response, 2));
|
| + buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), data);
|
| this[_resourceInfo].addRead(core.int._check(read));
|
| return FutureOrOfint()._check(read);
|
| }, dynamicToFutureOrOfint()));
|
| @@ -40287,7 +41050,7 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| return;
|
| }
|
| let bufferAndStart = io._ensureFastAndSerializableByteData(buffer, start, end);
|
| - let result = this[_ops].writeFrom(ListOfint()._check(bufferAndStart.buffer), bufferAndStart.start, dart.notNull(end) - (dart.notNull(start) - dart.notNull(bufferAndStart.start)));
|
| + let result = this[_ops].writeFrom(bufferAndStart.buffer, bufferAndStart.start, dart.notNull(end) - (dart.notNull(start) - dart.notNull(bufferAndStart.start)));
|
| if (io.OSError.is(result)) {
|
| dart.throw(new io.FileSystemException("writeFrom failed", this.path, result));
|
| }
|
| @@ -40386,6 +41149,30 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| dart.throw(new io.FileSystemException("flush failed", this.path, result));
|
| }
|
| }
|
| + [_fileLockValue](fl) {
|
| + switch (fl) {
|
| + case io.FileLock.SHARED:
|
| + {
|
| + return io._RandomAccessFile.LOCK_SHARED;
|
| + }
|
| + case io.FileLock.EXCLUSIVE:
|
| + {
|
| + return io._RandomAccessFile.LOCK_EXCLUSIVE;
|
| + }
|
| + case io.FileLock.BLOCKING_SHARED:
|
| + {
|
| + return io._RandomAccessFile.LOCK_BLOCKING_SHARED;
|
| + }
|
| + case io.FileLock.BLOCKING_EXCLUSIVE:
|
| + {
|
| + return io._RandomAccessFile.LOCK_BLOCKING_EXCLUSIVE;
|
| + }
|
| + default:
|
| + {
|
| + return -1;
|
| + }
|
| + }
|
| + }
|
| lock(mode, start, end) {
|
| if (mode === void 0) mode = io.FileLock.EXCLUSIVE;
|
| if (start === void 0) start = 0;
|
| @@ -40396,7 +41183,7 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| if (dart.notNull(start) < 0 || dart.notNull(end) < -1 || end != -1 && dart.notNull(start) >= dart.notNull(end)) {
|
| dart.throw(new core.ArgumentError());
|
| }
|
| - let lock = dart.equals(mode, io.FileLock.EXCLUSIVE) ? io._RandomAccessFile.LOCK_EXCLUSIVE : io._RandomAccessFile.LOCK_SHARED;
|
| + let lock = this[_fileLockValue](mode);
|
| return this[_dispatch](io._FILE_LOCK, JSArrayOfint().of([null, lock, start, end])).then(io._RandomAccessFile)(dart.fn(response => {
|
| if (dart.test(io._isErrorResponse(response))) {
|
| dart.throw(io._exceptionFromResponse(response, 'lock failed', this.path));
|
| @@ -40431,7 +41218,7 @@ io._RandomAccessFile = class _RandomAccessFile extends core.Object {
|
| if (dart.notNull(start) < 0 || dart.notNull(end) < -1 || end != -1 && dart.notNull(start) >= dart.notNull(end)) {
|
| dart.throw(new core.ArgumentError());
|
| }
|
| - let lock = dart.equals(mode, io.FileLock.EXCLUSIVE) ? io._RandomAccessFile.LOCK_EXCLUSIVE : io._RandomAccessFile.LOCK_SHARED;
|
| + let lock = this[_fileLockValue](mode);
|
| let result = this[_ops].lock(lock, start, end);
|
| if (io.OSError.is(result)) {
|
| dart.throw(new io.FileSystemException('lock failed', this.path, result));
|
| @@ -40520,6 +41307,7 @@ dart.setSignature(io._RandomAccessFile, {
|
| lengthSync: dart.definiteFunctionType(core.int, []),
|
| flush: dart.definiteFunctionType(async.Future$(io.RandomAccessFile), []),
|
| flushSync: dart.definiteFunctionType(dart.void, []),
|
| + [_fileLockValue]: dart.definiteFunctionType(core.int, [io.FileLock]),
|
| lock: dart.definiteFunctionType(async.Future$(io.RandomAccessFile), [], [io.FileLock, core.int, core.int]),
|
| unlock: dart.definiteFunctionType(async.Future$(io.RandomAccessFile), [], [core.int, core.int]),
|
| lockSync: dart.definiteFunctionType(dart.void, [], [io.FileLock, core.int, core.int]),
|
| @@ -40532,13 +41320,17 @@ dart.setSignature(io._RandomAccessFile, {
|
| _connectedResourceHandler: core.bool,
|
| LOCK_UNLOCK: core.int,
|
| LOCK_SHARED: core.int,
|
| - LOCK_EXCLUSIVE: core.int
|
| + LOCK_EXCLUSIVE: core.int,
|
| + LOCK_BLOCKING_SHARED: core.int,
|
| + LOCK_BLOCKING_EXCLUSIVE: core.int
|
| })
|
| });
|
| io._RandomAccessFile._connectedResourceHandler = false;
|
| io._RandomAccessFile.LOCK_UNLOCK = 0;
|
| io._RandomAccessFile.LOCK_SHARED = 1;
|
| io._RandomAccessFile.LOCK_EXCLUSIVE = 2;
|
| +io._RandomAccessFile.LOCK_BLOCKING_SHARED = 3;
|
| +io._RandomAccessFile.LOCK_BLOCKING_EXCLUSIVE = 4;
|
| let const;
|
| io.FileSystemEntityType = class FileSystemEntityType extends core.Object {
|
| _internal(type) {
|
| @@ -41577,7 +42369,7 @@ const _addTransferEncoding = Symbol('_addTransferEncoding');
|
| const _addIfModifiedSince = Symbol('_addIfModifiedSince');
|
| const _foldHeader = Symbol('_foldHeader');
|
| const _finalize = Symbol('_finalize');
|
| -const _write = Symbol('_write');
|
| +const _build = Symbol('_build');
|
| const _parseCookies = Symbol('_parseCookies');
|
| io._HttpHeaders = class _HttpHeaders extends core.Object {
|
| new(protocolVersion, opts) {
|
| @@ -42013,81 +42805,32 @@ io._HttpHeaders = class _HttpHeaders extends core.Object {
|
| [_finalize]() {
|
| this[_mutable] = false;
|
| }
|
| - [_write](buffer, offset) {
|
| - function write(bytes) {
|
| - let len = bytes[dartx.length];
|
| - for (let i = 0; i < dart.notNull(len); i++) {
|
| - buffer[dartx._set](dart.notNull(offset) + i, bytes[dartx._get](i));
|
| - }
|
| - offset = dart.notNull(offset) + dart.notNull(len);
|
| - }
|
| - dart.fn(write, ListOfintTovoid());
|
| + [_build](builder) {
|
| for (let name of this[_headers][dartx.keys]) {
|
| let values = this[_headers][dartx._get](name);
|
| let fold = core.bool._check(this[_foldHeader](name));
|
| let nameData = name[dartx.codeUnits];
|
| - write(nameData);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.COLON);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| + builder.add(nameData);
|
| + builder.addByte(io._CharCode.COLON);
|
| + builder.addByte(io._CharCode.SP);
|
| for (let i = 0; i < dart.notNull(values[dartx.length]); i++) {
|
| if (i > 0) {
|
| if (dart.test(fold)) {
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.COMMA);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| + builder.addByte(io._CharCode.COMMA);
|
| + builder.addByte(io._CharCode.SP);
|
| } else {
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| - write(nameData);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.COLON);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| + builder.addByte(io._CharCode.CR);
|
| + builder.addByte(io._CharCode.LF);
|
| + builder.add(nameData);
|
| + builder.addByte(io._CharCode.COLON);
|
| + builder.addByte(io._CharCode.SP);
|
| }
|
| }
|
| - write(values[dartx._get](i)[dartx.codeUnits]);
|
| + builder.add(values[dartx._get](i)[dartx.codeUnits]);
|
| }
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| + builder.addByte(io._CharCode.CR);
|
| + builder.addByte(io._CharCode.LF);
|
| }
|
| - return offset;
|
| }
|
| toString() {
|
| let sb = new core.StringBuffer();
|
| @@ -42263,7 +43006,7 @@ dart.setSignature(io._HttpHeaders, {
|
| [_updateHostHeader]: dart.definiteFunctionType(dart.dynamic, []),
|
| [_foldHeader]: dart.definiteFunctionType(dart.dynamic, [core.String]),
|
| [_finalize]: dart.definiteFunctionType(dart.void, []),
|
| - [_write]: dart.definiteFunctionType(core.int, [typed_data.Uint8List, core.int]),
|
| + [_build]: dart.definiteFunctionType(dart.void, [io.BytesBuilder]),
|
| [_parseCookies]: dart.definiteFunctionType(core.List$(io.Cookie), [])
|
| }),
|
| statics: () => ({
|
| @@ -42412,7 +43155,7 @@ io._HeaderValue = class _HeaderValue extends core.Object {
|
| return;
|
| }
|
| let value = parseParameterValue();
|
| - if (name == 'charset' && io._ContentType.is(this)) {
|
| + if (name == 'charset' && io._ContentType.is(this) && value != null) {
|
| value = value[dartx.toLowerCase]();
|
| }
|
| parameters._set(name, value);
|
| @@ -42705,6 +43448,7 @@ dart.setSignature(io._Cookie, {
|
| })
|
| });
|
| io._OUTGOING_BUFFER_SIZE = 8 * 1024;
|
| +io._BytesConsumer = dart.typedef('_BytesConsumer', () => dart.functionType(dart.void, [ListOfint()]));
|
| const _transferLength = Symbol('_transferLength');
|
| const _dataCompleter = Symbol('_dataCompleter');
|
| const _stream = Symbol('_stream');
|
| @@ -43006,7 +43750,7 @@ io._HttpClientResponse = class _HttpClientResponse extends io._HttpInboundMessag
|
| let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
|
| if (dart.test(this[_incoming].upgraded)) {
|
| this[_httpRequest][_httpClientConnection].destroy();
|
| - return StreamSubscriptionOfListOfint()._check(async.Stream.fromIterable([]).listen(null, {onDone: onDone}));
|
| + return StreamOfListOfint().empty().listen(null, {onDone: onDone});
|
| }
|
| let stream = this[_incoming];
|
| if (dart.test(this[_httpClient].autoUncompress) && this.headers.value(io.HttpHeaders.CONTENT_ENCODING) == "gzip") {
|
| @@ -43520,43 +44264,18 @@ io._HttpResponse = class _HttpResponse extends io._HttpOutboundMessage$(io.HttpR
|
| }, VoidToNull()));
|
| }
|
| [_writeHeader]() {
|
| - let buffer = typed_data.Uint8List.new(io._OUTGOING_BUFFER_SIZE);
|
| - let offset = 0;
|
| - function write(bytes) {
|
| - let len = bytes[dartx.length];
|
| - for (let i = 0; i < dart.notNull(len); i++) {
|
| - buffer[dartx._set](dart.notNull(offset) + i, bytes[dartx._get](i));
|
| - }
|
| - offset = dart.notNull(offset) + dart.notNull(len);
|
| - }
|
| - dart.fn(write, ListOfintTovoid());
|
| + let buffer = new io._CopyingBytesBuilder(io._OUTGOING_BUFFER_SIZE);
|
| if (this.headers.protocolVersion == "1.1") {
|
| - write(io._Const.HTTP11);
|
| + buffer.add(io._Const.HTTP11);
|
| } else {
|
| - write(io._Const.HTTP10);
|
| - }
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| - write(dart.toString(this.statusCode)[dartx.codeUnits]);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| - write(this.reasonPhrase[dartx.codeUnits]);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| + buffer.add(io._Const.HTTP10);
|
| + }
|
| + buffer.addByte(io._CharCode.SP);
|
| + buffer.add(dart.toString(this.statusCode)[dartx.codeUnits]);
|
| + buffer.addByte(io._CharCode.SP);
|
| + buffer.add(this.reasonPhrase[dartx.codeUnits]);
|
| + buffer.addByte(io._CharCode.CR);
|
| + buffer.addByte(io._CharCode.LF);
|
| let session = this[_httpRequest][_session];
|
| if (session != null && !dart.test(session[_destroyed])) {
|
| session[_isNew] = false;
|
| @@ -43585,18 +44304,11 @@ io._HttpResponse = class _HttpResponse extends io._HttpOutboundMessage$(io.HttpR
|
| }, CookieToNull()));
|
| }
|
| this.headers[_finalize]();
|
| - offset = this.headers[_write](buffer, offset);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| - this[_outgoing].setHeader(buffer, offset);
|
| + this.headers[_build](buffer);
|
| + buffer.addByte(io._CharCode.CR);
|
| + buffer.addByte(io._CharCode.LF);
|
| + let headerBytes = typed_data.Uint8List._check(buffer.takeBytes());
|
| + this[_outgoing].setHeader(headerBytes, headerBytes[dartx.length]);
|
| }
|
| [_findReasonPhrase](statusCode) {
|
| if (this[_reasonPhrase] != null) {
|
| @@ -43902,39 +44614,14 @@ io._HttpClientRequest = class _HttpClientRequest extends io._HttpOutboundMessage
|
| }
|
| }
|
| [_writeHeader]() {
|
| - let buffer = typed_data.Uint8List.new(io._OUTGOING_BUFFER_SIZE);
|
| - let offset = 0;
|
| - function write(bytes) {
|
| - let len = bytes[dartx.length];
|
| - for (let i = 0; i < dart.notNull(len); i++) {
|
| - buffer[dartx._set](dart.notNull(offset) + i, bytes[dartx._get](i));
|
| - }
|
| - offset = dart.notNull(offset) + dart.notNull(len);
|
| - }
|
| - dart.fn(write, ListOfintTovoid());
|
| - write(this.method[dartx.codeUnits]);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| - write(this[_requestUri]()[dartx.codeUnits]);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.SP);
|
| - write(io._Const.HTTP11);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| + let buffer = new io._CopyingBytesBuilder(io._OUTGOING_BUFFER_SIZE);
|
| + buffer.add(this.method[dartx.codeUnits]);
|
| + buffer.addByte(io._CharCode.SP);
|
| + buffer.add(this[_requestUri]()[dartx.codeUnits]);
|
| + buffer.addByte(io._CharCode.SP);
|
| + buffer.add(io._Const.HTTP11);
|
| + buffer.addByte(io._CharCode.CR);
|
| + buffer.addByte(io._CharCode.LF);
|
| if (!dart.test(this.cookies[dartx.isEmpty])) {
|
| let sb = new core.StringBuffer();
|
| for (let i = 0; i < dart.notNull(this.cookies[dartx.length]); i++) {
|
| @@ -43946,18 +44633,11 @@ io._HttpClientRequest = class _HttpClientRequest extends io._HttpOutboundMessage
|
| this.headers.add(io.HttpHeaders.COOKIE, sb.toString());
|
| }
|
| this.headers[_finalize]();
|
| - offset = this.headers[_write](buffer, offset);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.CR);
|
| - buffer[dartx._set]((() => {
|
| - let x = offset;
|
| - offset = dart.notNull(x) + 1;
|
| - return x;
|
| - })(), io._CharCode.LF);
|
| - this[_outgoing].setHeader(buffer, offset);
|
| + this.headers[_build](buffer);
|
| + buffer.addByte(io._CharCode.CR);
|
| + buffer.addByte(io._CharCode.LF);
|
| + let headerBytes = typed_data.Uint8List._check(buffer.takeBytes());
|
| + this[_outgoing].setHeader(headerBytes, headerBytes[dartx.length]);
|
| }
|
| };
|
| dart.addSimpleTypeTests(io._HttpClientRequest);
|
| @@ -44002,20 +44682,20 @@ io._HttpGZipSink = class _HttpGZipSink extends convert.ByteConversionSink {
|
| super.new();
|
| }
|
| add(chunk) {
|
| - dart.dcall(this[_consume], chunk);
|
| + this[_consume](chunk);
|
| }
|
| addSlice(chunk, start, end, isLast) {
|
| if (typed_data.Uint8List.is(chunk)) {
|
| - dart.dcall(this[_consume], typed_data.Uint8List.view(chunk[dartx.buffer], start, dart.notNull(end) - dart.notNull(start)));
|
| + this[_consume](typed_data.Uint8List.view(chunk[dartx.buffer], start, dart.notNull(end) - dart.notNull(start)));
|
| } else {
|
| - dart.dcall(this[_consume], chunk[dartx.sublist](start, dart.notNull(end) - dart.notNull(start)));
|
| + this[_consume](chunk[dartx.sublist](start, dart.notNull(end) - dart.notNull(start)));
|
| }
|
| }
|
| close() {}
|
| };
|
| dart.setSignature(io._HttpGZipSink, {
|
| - constructors: () => ({new: dart.definiteFunctionType(io._HttpGZipSink, [core.Function])}),
|
| - fields: () => ({[_consume]: core.Function}),
|
| + constructors: () => ({new: dart.definiteFunctionType(io._HttpGZipSink, [io._BytesConsumer])}),
|
| + fields: () => ({[_consume]: io._BytesConsumer}),
|
| methods: () => ({
|
| add: dart.definiteFunctionType(dart.void, [ListOfint()]),
|
| addSlice: dart.definiteFunctionType(dart.void, [ListOfint(), core.int, core.int, core.bool]),
|
| @@ -44038,7 +44718,7 @@ const _ignoreError = Symbol('_ignoreError');
|
| let const;
|
| io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| new(socket) {
|
| - this[_doneCompleter] = async.Completer.new();
|
| + this[_doneCompleter] = CompleterOfSocket().new();
|
| this.socket = socket;
|
| this.ignoreBody = false;
|
| this.headersWritten = false;
|
| @@ -44060,16 +44740,6 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| writeHeaders(opts) {
|
| let drainRequest = opts && 'drainRequest' in opts ? opts.drainRequest : true;
|
| let setOutgoing = opts && 'setOutgoing' in opts ? opts.setOutgoing : true;
|
| - const write = (function() {
|
| - try {
|
| - this.outbound[_writeHeader]();
|
| - } catch (_) {
|
| - return async.Future.error(new io.HttpException(dart.str`Headers size exceeded the of '${io._OUTGOING_BUFFER_SIZE}'` + " bytes"));
|
| - }
|
| -
|
| - return null;
|
| - }).bind(this);
|
| - dart.fn(write, VoidToFuture());
|
| if (dart.test(this.headersWritten)) return null;
|
| this.headersWritten = true;
|
| let drainFuture = null;
|
| @@ -44091,22 +44761,22 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| } else {
|
| drainRequest = false;
|
| }
|
| - if (dart.test(this.ignoreBody)) {
|
| - return write();
|
| - }
|
| - if (dart.test(setOutgoing)) {
|
| - let contentLength = this.outbound.headers.contentLength;
|
| - if (dart.test(this.outbound.headers.chunkedTransferEncoding)) {
|
| - this.chunked = true;
|
| - if (gzip) this.gzip = true;
|
| - } else if (dart.notNull(contentLength) >= 0) {
|
| - this.contentLength = contentLength;
|
| + if (!dart.test(this.ignoreBody)) {
|
| + if (dart.test(setOutgoing)) {
|
| + let contentLength = this.outbound.headers.contentLength;
|
| + if (dart.test(this.outbound.headers.chunkedTransferEncoding)) {
|
| + this.chunked = true;
|
| + if (gzip) this.gzip = true;
|
| + } else if (dart.notNull(contentLength) >= 0) {
|
| + this.contentLength = contentLength;
|
| + }
|
| + }
|
| + if (drainFuture != null) {
|
| + return drainFuture.then(dart.void)(dart.fn(_ => this.outbound[_writeHeader](), dynamicTovoid()));
|
| }
|
| }
|
| - if (drainFuture != null) {
|
| - return drainFuture.then(dart.dynamic)(dart.fn(_ => write(), dynamicToFuture()));
|
| - }
|
| - return write();
|
| + this.outbound[_writeHeader]();
|
| + return null;
|
| }
|
| addStream(stream) {
|
| if (dart.test(this[_socketError])) {
|
| @@ -44123,10 +44793,10 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| return this.close();
|
| }
|
| let sub = null;
|
| - let controller = async.StreamController.new({onPause: dart.fn(() => dart.dsend(sub, 'pause'), VoidTovoid()), onResume: dart.fn(() => dart.dsend(sub, 'resume'), VoidTovoid()), sync: true});
|
| + let controller = StreamControllerOfListOfint().new({onPause: dart.fn(() => sub.pause(), VoidTovoid()), onResume: dart.fn(() => sub.resume(), VoidTovoid()), sync: true});
|
| const onData = (function(data) {
|
| if (dart.test(this[_socketError])) return;
|
| - if (dart.equals(dart.dload(data, 'length'), 0)) return;
|
| + if (data[dartx.length] == 0) return;
|
| if (dart.test(this.chunked)) {
|
| if (dart.test(this[_gzip])) {
|
| this[_gzipAdd] = dart.bind(controller, 'add');
|
| @@ -44134,28 +44804,28 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| this[_gzipAdd] = null;
|
| return;
|
| }
|
| - this[_addChunk](this[_chunkHeader](core.int._check(dart.dload(data, 'length'))), dart.bind(controller, 'add'));
|
| + this[_addChunk](this[_chunkHeader](data[dartx.length]), dart.bind(controller, 'add'));
|
| this[_pendingChunkedFooter] = 2;
|
| } else {
|
| if (this.contentLength != null) {
|
| - this[_bytesWritten] = dart.notNull(this[_bytesWritten]) + dart.notNull(core.num._check(dart.dload(data, 'length')));
|
| + this[_bytesWritten] = dart.notNull(this[_bytesWritten]) + dart.notNull(data[dartx.length]);
|
| if (dart.notNull(this[_bytesWritten]) > dart.notNull(this.contentLength)) {
|
| - controller.addError(new io.HttpException("Content size exceeds specified contentLength. " + dart.str`${this[_bytesWritten]} bytes written while expected ` + dart.str`${this.contentLength}. ` + dart.str`[${core.String.fromCharCodes(IterableOfint()._check(data))}]`));
|
| + controller.addError(new io.HttpException("Content size exceeds specified contentLength. " + dart.str`${this[_bytesWritten]} bytes written while expected ` + dart.str`${this.contentLength}. ` + dart.str`[${core.String.fromCharCodes(data)}]`));
|
| return;
|
| }
|
| }
|
| }
|
| this[_addChunk](data, dart.bind(controller, 'add'));
|
| }).bind(this);
|
| - dart.fn(onData, dynamicTovoid());
|
| + dart.fn(onData, ListOfintTovoid());
|
| sub = stream.listen(onData, {onError: dart.bind(controller, 'addError'), onDone: dart.bind(controller, 'close'), cancelOnError: true});
|
| if (!dart.test(this.headersWritten)) {
|
| let future = this.writeHeaders();
|
| if (future != null) {
|
| - dart.dsend(sub, 'pause', future);
|
| + sub.pause(future);
|
| }
|
| }
|
| - return this.socket.addStream(StreamOfListOfint()._check(controller.stream)).then(io._HttpOutboundMessage)(dart.fn(_ => this.outbound, dynamicTo_HttpOutboundMessage()), {onError: dart.fn((error, stackTrace) => {
|
| + return this.socket.addStream(controller.stream).then(io._HttpOutboundMessage)(dart.fn(_ => this.outbound, dynamicTo_HttpOutboundMessage()), {onError: dart.fn((error, stackTrace) => {
|
| if (dart.test(this[_gzip])) this[_gzipSink].close();
|
| this[_socketError] = true;
|
| this[_doneCompleter].completeError(error, core.StackTrace._check(stackTrace));
|
| @@ -44228,7 +44898,6 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| }
|
| setHeader(data, length) {
|
| dart.assert(this[_length] == 0);
|
| - dart.assert(data[dartx.length] == io._OUTGOING_BUFFER_SIZE);
|
| this[_buffer] = typed_data.Uint8List._check(data);
|
| this[_length] = length;
|
| }
|
| @@ -44239,10 +44908,10 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| dart.assert(this[_gzipSink] == null);
|
| this[_gzipSink] = new io.ZLibEncoder({gzip: true}).startChunkedConversion(new io._HttpGZipSink(dart.fn(data => {
|
| if (this[_gzipAdd] == null) return;
|
| - this[_addChunk](this[_chunkHeader](core.int._check(dart.dload(data, 'length'))), ListOfintTovoid()._check(this[_gzipAdd]));
|
| + this[_addChunk](this[_chunkHeader](data[dartx.length]), this[_gzipAdd]);
|
| this[_pendingChunkedFooter] = 2;
|
| - this[_addChunk](data, ListOfintTovoid()._check(this[_gzipAdd]));
|
| - }, dynamicToNull())));
|
| + this[_addChunk](data, this[_gzipAdd]);
|
| + }, ListOfintToNull())));
|
| }
|
| }
|
| [_ignoreError](error) {
|
| @@ -44250,19 +44919,19 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| }
|
| [_addGZipChunk](chunk, add) {
|
| if (!dart.test(this.outbound.bufferOutput)) {
|
| - add(ListOfint()._check(chunk));
|
| + add(chunk);
|
| return;
|
| }
|
| - if (dart.test(dart.dsend(dart.dload(chunk, 'length'), '>', dart.notNull(this[_gzipBuffer][dartx.length]) - dart.notNull(this[_gzipBufferLength])))) {
|
| + if (dart.notNull(chunk[dartx.length]) > dart.notNull(this[_gzipBuffer][dartx.length]) - dart.notNull(this[_gzipBufferLength])) {
|
| add(typed_data.Uint8List.view(this[_gzipBuffer][dartx.buffer], 0, this[_gzipBufferLength]));
|
| this[_gzipBuffer] = typed_data.Uint8List.new(io._OUTGOING_BUFFER_SIZE);
|
| this[_gzipBufferLength] = 0;
|
| }
|
| - if (dart.test(dart.dsend(dart.dload(chunk, 'length'), '>', io._OUTGOING_BUFFER_SIZE))) {
|
| - add(ListOfint()._check(chunk));
|
| + if (dart.notNull(chunk[dartx.length]) > io._OUTGOING_BUFFER_SIZE) {
|
| + add(chunk);
|
| } else {
|
| - this[_gzipBuffer][dartx.setRange](this[_gzipBufferLength], dart.asInt(dart.notNull(this[_gzipBufferLength]) + dart.notNull(core.num._check(dart.dload(chunk, 'length')))), IterableOfint()._check(chunk));
|
| - this[_gzipBufferLength] = dart.notNull(this[_gzipBufferLength]) + dart.notNull(core.num._check(dart.dload(chunk, 'length')));
|
| + this[_gzipBuffer][dartx.setRange](this[_gzipBufferLength], dart.notNull(this[_gzipBufferLength]) + dart.notNull(chunk[dartx.length]), chunk);
|
| + this[_gzipBufferLength] = dart.notNull(this[_gzipBufferLength]) + dart.notNull(chunk[dartx.length]);
|
| }
|
| }
|
| [_addChunk](chunk, add) {
|
| @@ -44272,19 +44941,19 @@ io._HttpOutgoing = class _HttpOutgoing extends core.Object {
|
| this[_buffer] = null;
|
| this[_length] = 0;
|
| }
|
| - add(ListOfint()._check(chunk));
|
| + add(chunk);
|
| return;
|
| }
|
| - if (dart.test(dart.dsend(dart.dload(chunk, 'length'), '>', dart.notNull(this[_buffer][dartx.length]) - dart.notNull(this[_length])))) {
|
| + if (dart.notNull(chunk[dartx.length]) > dart.notNull(this[_buffer][dartx.length]) - dart.notNull(this[_length])) {
|
| add(typed_data.Uint8List.view(this[_buffer][dartx.buffer], 0, this[_length]));
|
| this[_buffer] = typed_data.Uint8List.new(io._OUTGOING_BUFFER_SIZE);
|
| this[_length] = 0;
|
| }
|
| - if (dart.test(dart.dsend(dart.dload(chunk, 'length'), '>', io._OUTGOING_BUFFER_SIZE))) {
|
| - add(ListOfint()._check(chunk));
|
| + if (dart.notNull(chunk[dartx.length]) > io._OUTGOING_BUFFER_SIZE) {
|
| + add(chunk);
|
| } else {
|
| - this[_buffer][dartx.setRange](this[_length], dart.asInt(dart.notNull(this[_length]) + dart.notNull(core.num._check(dart.dload(chunk, 'length')))), IterableOfint()._check(chunk));
|
| - this[_length] = dart.notNull(this[_length]) + dart.notNull(core.num._check(dart.dload(chunk, 'length')));
|
| + this[_buffer][dartx.setRange](this[_length], dart.notNull(this[_length]) + dart.notNull(chunk[dartx.length]), chunk);
|
| + this[_length] = dart.notNull(this[_length]) + dart.notNull(chunk[dartx.length]);
|
| }
|
| }
|
| [_chunkHeader](length) {
|
| @@ -44318,7 +44987,7 @@ io._HttpOutgoing[dart.implements] = () => [StreamConsumerOfListOfint()];
|
| dart.setSignature(io._HttpOutgoing, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._HttpOutgoing, [io.Socket])}),
|
| fields: () => ({
|
| - [_doneCompleter]: async.Completer,
|
| + [_doneCompleter]: CompleterOfSocket(),
|
| socket: io.Socket,
|
| ignoreBody: core.bool,
|
| headersWritten: core.bool,
|
| @@ -44331,13 +45000,13 @@ dart.setSignature(io._HttpOutgoing, {
|
| [_bytesWritten]: core.int,
|
| [_gzip]: core.bool,
|
| [_gzipSink]: convert.ByteConversionSink,
|
| - [_gzipAdd]: core.Function,
|
| + [_gzipAdd]: io._BytesConsumer,
|
| [_gzipBuffer]: typed_data.Uint8List,
|
| [_gzipBufferLength]: core.int,
|
| [_socketError]: core.bool,
|
| outbound: io._HttpOutboundMessage
|
| }),
|
| - getters: () => ({done: dart.definiteFunctionType(async.Future, [])}),
|
| + getters: () => ({done: dart.definiteFunctionType(async.Future$(io.Socket), [])}),
|
| setters: () => ({gzip: dart.definiteFunctionType(dart.void, [core.bool])}),
|
| methods: () => ({
|
| writeHeaders: dart.definiteFunctionType(async.Future, [], {drainRequest: core.bool, setOutgoing: core.bool}),
|
| @@ -44345,8 +45014,8 @@ dart.setSignature(io._HttpOutgoing, {
|
| close: dart.definiteFunctionType(async.Future, []),
|
| setHeader: dart.definiteFunctionType(dart.void, [ListOfint(), core.int]),
|
| [_ignoreError]: dart.definiteFunctionType(core.bool, [dart.dynamic]),
|
| - [_addGZipChunk]: dart.definiteFunctionType(dart.void, [dart.dynamic, ListOfintTovoid()]),
|
| - [_addChunk]: dart.definiteFunctionType(dart.void, [dart.dynamic, ListOfintTovoid()]),
|
| + [_addGZipChunk]: dart.definiteFunctionType(dart.void, [ListOfint(), ListOfintTovoid()]),
|
| + [_addChunk]: dart.definiteFunctionType(dart.void, [ListOfint(), ListOfintTovoid()]),
|
| [_chunkHeader]: dart.definiteFunctionType(core.List$(core.int), [core.int])
|
| }),
|
| sfields: () => ({
|
| @@ -44458,7 +45127,7 @@ io._HttpClientConnection = class _HttpClientConnection extends core.Object {
|
| }
|
| }
|
| this[_httpParser].isHead = method == "HEAD";
|
| - this[_streamFuture] = outgoing.done.then(dart.dynamic)(dart.fn(s => {
|
| + this[_streamFuture] = outgoing.done.then(io.Socket)(dart.fn(s => {
|
| this[_nextResponseCompleter] = CompleterOf_HttpIncoming().new();
|
| this[_nextResponseCompleter].future.then(dart.dynamic)(dart.fn(incoming => {
|
| this[_currentUri] = null;
|
| @@ -44501,13 +45170,13 @@ io._HttpClientConnection = class _HttpClientConnection extends core.Object {
|
| }, dynamicAnddynamicToNull()));
|
| this[_subscription].resume();
|
| return s;
|
| - }, dynamicTodynamic()), {onError: dart.fn(e => {
|
| + }, SocketToSocket()), {onError: dart.fn(e => {
|
| this.destroy();
|
| }, dynamicToNull())});
|
| return request;
|
| }
|
| detachSocket() {
|
| - return this[_streamFuture].then(io._DetachedSocket)(dart.fn(_ => new io._DetachedSocket(this[_socket], this[_httpParser].detachIncoming()), dynamicTo_DetachedSocket()));
|
| + return this[_streamFuture].then(io._DetachedSocket)(dart.fn(_ => new io._DetachedSocket(this[_socket], this[_httpParser].detachIncoming()), SocketTo_DetachedSocket()));
|
| }
|
| destroy() {
|
| this.closed = true;
|
| @@ -44517,12 +45186,12 @@ io._HttpClientConnection = class _HttpClientConnection extends core.Object {
|
| close() {
|
| this.closed = true;
|
| this[_httpClient][_connectionClosed](this);
|
| - this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid()));
|
| + this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), SocketTovoid()));
|
| }
|
| createProxyTunnel(host, port, proxy, callback) {
|
| - let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
|
| - if (dart.test(dart.dload(proxy, 'isAuthenticated'))) {
|
| - let auth = io._CryptoUtils.bytesToBase64(convert.UTF8.encode(dart.str`${dart.dload(proxy, 'username')}:${dart.dload(proxy, 'password')}`));
|
| + let request = this.send(core.Uri.new({host: host, port: port}), port, "CONNECT", proxy);
|
| + if (dart.test(proxy.isAuthenticated)) {
|
| + let auth = io._CryptoUtils.bytesToBase64(convert.UTF8.encode(dart.str`${proxy.username}:${proxy.password}`));
|
| request.headers.set(io.HttpHeaders.PROXY_AUTHORIZATION, dart.str`Basic ${auth}`);
|
| }
|
| return request.close().then(io.SecureSocket)(dart.fn(response => {
|
| @@ -44530,9 +45199,9 @@ io._HttpClientConnection = class _HttpClientConnection extends core.Object {
|
| dart.throw("Proxy failed to establish tunnel " + dart.str`(${response.statusCode} ${response.reasonPhrase})`);
|
| }
|
| let socket = io._HttpClientResponse.as(response)[_httpRequest][_httpClientConnection][_socket];
|
| - return io.SecureSocket.secure(socket, {host: host, context: this[_context], onBadCertificate: X509CertificateTobool()._check(callback)});
|
| + return io.SecureSocket.secure(socket, {host: host, context: this[_context], onBadCertificate: callback});
|
| }, HttpClientResponseToFutureOfSecureSocket())).then(io._HttpClientConnection)(dart.fn(secureSocket => {
|
| - let key = core.String._check(io._HttpClientConnection.makeKey(true, core.String._check(host), core.int._check(port)));
|
| + let key = core.String._check(io._HttpClientConnection.makeKey(true, host, port));
|
| return new io._HttpClientConnection(key, secureSocket, request[_httpClient], true);
|
| }, SecureSocketTo_HttpClientConnection()));
|
| }
|
| @@ -44571,7 +45240,7 @@ dart.setSignature(io._HttpClientConnection, {
|
| closed: core.bool,
|
| [_currentUri]: core.Uri,
|
| [_nextResponseCompleter]: CompleterOf_HttpIncoming(),
|
| - [_streamFuture]: async.Future
|
| + [_streamFuture]: FutureOfSocket()
|
| }),
|
| getters: () => ({connectionInfo: dart.definiteFunctionType(io.HttpConnectionInfo, [])}),
|
| methods: () => ({
|
| @@ -44579,7 +45248,7 @@ dart.setSignature(io._HttpClientConnection, {
|
| detachSocket: dart.definiteFunctionType(async.Future$(io.Socket), []),
|
| destroy: dart.definiteFunctionType(dart.void, []),
|
| close: dart.definiteFunctionType(dart.void, []),
|
| - createProxyTunnel: dart.definiteFunctionType(async.Future$(io._HttpClientConnection), [dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]),
|
| + createProxyTunnel: dart.definiteFunctionType(async.Future$(io._HttpClientConnection), [core.String, core.int, io._Proxy, X509CertificateTobool()]),
|
| stopTimer: dart.definiteFunctionType(dart.void, []),
|
| startTimer: dart.definiteFunctionType(dart.void, [])
|
| }),
|
| @@ -44674,11 +45343,11 @@ io._ConnectionTarget = class _ConnectionTarget extends core.Object {
|
| return FutureOf_ConnectionInfo().value(new io._ConnectionInfo(connection, proxy));
|
| }
|
| if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
|
| - let completer = async.Completer.new();
|
| + let completer = CompleterOf_ConnectionInfo().new();
|
| this[_pending].add(dart.fn(() => {
|
| - this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
|
| + completer.complete(this.connect(uriHost, uriPort, proxy, client));
|
| }, VoidToNull()));
|
| - return FutureOf_ConnectionInfo()._check(completer.future);
|
| + return completer.future;
|
| }
|
| let currentBadCertificateCallback = client[_badCertificateCallback];
|
| function callback(certificate) {
|
| @@ -45180,7 +45849,7 @@ io._HttpConnection = class _HttpConnection extends dart.mixin(collection.LinkedL
|
| }
|
|
|
| io._HttpConnection._connections[dartx._set](this[_serviceId], this);
|
| - this[_httpParser].listenToStream(StreamOfListOfint()._check(this[_socket]));
|
| + this[_httpParser].listenToStream(io.Socket.as(this[_socket]));
|
| this[_subscription] = this[_httpParser].listen(dart.fn(incoming => {
|
| this[_httpServer][_markActive](this);
|
| incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
|
| @@ -45202,7 +45871,7 @@ io._HttpConnection = class _HttpConnection extends dart.mixin(collection.LinkedL
|
| } else {
|
| this.destroy();
|
| }
|
| - }, dynamicToNull()), {onError: dart.fn(_ => {
|
| + }, SocketToNull()), {onError: dart.fn(_ => {
|
| this.destroy();
|
| }, dynamicToNull())});
|
| outgoing.ignoreBody = request.method == "HEAD";
|
| @@ -45233,7 +45902,7 @@ io._HttpConnection = class _HttpConnection extends dart.mixin(collection.LinkedL
|
| let detachedIncoming = this[_httpParser].detachIncoming();
|
| return this[_streamFuture].then(io._DetachedSocket)(dart.fn(_ => {
|
| io._HttpConnection._connections[dartx.remove](this[_serviceId]);
|
| - return new io._DetachedSocket(this[_socket], detachedIncoming);
|
| + return new io._DetachedSocket(io.Socket._check(this[_socket]), detachedIncoming);
|
| }, dynamicTo_DetachedSocket()));
|
| }
|
| get connectionInfo() {
|
| @@ -45763,61 +46432,61 @@ io._DetachedSocket = class _DetachedSocket extends async.Stream$(core.List$(core
|
| return this[_incoming].listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError});
|
| }
|
| get encoding() {
|
| - return convert.Encoding._check(dart.dload(this[_socket], 'encoding'));
|
| + return this[_socket].encoding;
|
| }
|
| set encoding(value) {
|
| - dart.dput(this[_socket], 'encoding', value);
|
| + this[_socket].encoding = value;
|
| }
|
| write(obj) {
|
| - dart.dsend(this[_socket], 'write', obj);
|
| + this[_socket].write(obj);
|
| }
|
| writeln(obj) {
|
| if (obj === void 0) obj = "";
|
| - dart.dsend(this[_socket], 'writeln', obj);
|
| + this[_socket].writeln(obj);
|
| }
|
| writeCharCode(charCode) {
|
| - dart.dsend(this[_socket], 'writeCharCode', charCode);
|
| + this[_socket].writeCharCode(charCode);
|
| }
|
| writeAll(objects, separator) {
|
| if (separator === void 0) separator = "";
|
| - dart.dsend(this[_socket], 'writeAll', objects, separator);
|
| + this[_socket].writeAll(objects, separator);
|
| }
|
| add(bytes) {
|
| - dart.dsend(this[_socket], 'add', bytes);
|
| + this[_socket].add(bytes);
|
| }
|
| addError(error, stackTrace) {
|
| if (stackTrace === void 0) stackTrace = null;
|
| - return dart.dsend(this[_socket], 'addError', error, stackTrace);
|
| + return this[_socket].addError(error, stackTrace);
|
| }
|
| addStream(stream) {
|
| - return FutureOfSocket()._check(dart.dsend(this[_socket], 'addStream', stream));
|
| + return this[_socket].addStream(stream);
|
| }
|
| destroy() {
|
| - dart.dsend(this[_socket], 'destroy');
|
| + this[_socket].destroy();
|
| }
|
| flush() {
|
| - return async.Future._check(dart.dsend(this[_socket], 'flush'));
|
| + return this[_socket].flush();
|
| }
|
| close() {
|
| - return async.Future._check(dart.dsend(this[_socket], 'close'));
|
| + return this[_socket].close();
|
| }
|
| get done() {
|
| - return FutureOfSocket()._check(dart.dload(this[_socket], 'done'));
|
| + return this[_socket].done;
|
| }
|
| get port() {
|
| - return core.int._check(dart.dload(this[_socket], 'port'));
|
| + return this[_socket].port;
|
| }
|
| get address() {
|
| - return io.InternetAddress._check(dart.dload(this[_socket], 'address'));
|
| + return this[_socket].address;
|
| }
|
| get remoteAddress() {
|
| - return io.InternetAddress._check(dart.dload(this[_socket], 'remoteAddress'));
|
| + return this[_socket].remoteAddress;
|
| }
|
| get remotePort() {
|
| - return core.int._check(dart.dload(this[_socket], 'remotePort'));
|
| + return this[_socket].remotePort;
|
| }
|
| setOption(option, enabled) {
|
| - return core.bool._check(dart.dsend(this[_socket], 'setOption', option, enabled));
|
| + return this[_socket].setOption(option, enabled);
|
| }
|
| [_toJSON](ref) {
|
| return core.Map._check(dart.dsend(this[_socket], _toJSON, ref));
|
| @@ -45829,10 +46498,10 @@ io._DetachedSocket = class _DetachedSocket extends async.Stream$(core.List$(core
|
| dart.addSimpleTypeTests(io._DetachedSocket);
|
| io._DetachedSocket[dart.implements] = () => [io.Socket];
|
| dart.setSignature(io._DetachedSocket, {
|
| - constructors: () => ({new: dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic, StreamOfListOfint()])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(io._DetachedSocket, [io.Socket, StreamOfListOfint()])}),
|
| fields: () => ({
|
| [_incoming]: StreamOfListOfint(),
|
| - [_socket]: dart.dynamic
|
| + [_socket]: io.Socket
|
| }),
|
| getters: () => ({
|
| encoding: dart.definiteFunctionType(convert.Encoding, []),
|
| @@ -45854,10 +46523,10 @@ dart.setSignature(io._DetachedSocket, {
|
| writeAll: dart.definiteFunctionType(dart.void, [core.Iterable], [core.String]),
|
| add: dart.definiteFunctionType(dart.void, [ListOfint()]),
|
| addError: dart.definiteFunctionType(dart.void, [dart.dynamic], [core.StackTrace]),
|
| - addStream: dart.definiteFunctionType(async.Future$(io.Socket), [StreamOfListOfint()]),
|
| + addStream: dart.definiteFunctionType(async.Future, [StreamOfListOfint()]),
|
| destroy: dart.definiteFunctionType(dart.void, []),
|
| flush: dart.definiteFunctionType(async.Future, []),
|
| - close: dart.definiteFunctionType(async.Future, []),
|
| + close: dart.definiteFunctionType(async.Future$(io.Socket), []),
|
| setOption: dart.definiteFunctionType(core.bool, [io.SocketOption, core.bool]),
|
| [_toJSON]: dart.definiteFunctionType(core.Map, [core.bool])
|
| })
|
| @@ -46389,24 +47058,22 @@ io._HttpDetachedIncoming = class _HttpDetachedIncoming extends async.Stream$(cor
|
| this.subscription.onError(onError);
|
| this.subscription.onDone(onDone);
|
| if (this.bufferedData == null) {
|
| - return StreamSubscriptionOfListOfint()._check(((() => {
|
| - this.subscription.resume();
|
| - return this.subscription;
|
| - })()));
|
| + this.subscription.resume();
|
| + return this.subscription;
|
| }
|
| - let _ = new io._HttpDetachedStreamSubscription(StreamSubscriptionOfListOfint()._check(this.subscription), this.bufferedData, onData);
|
| + let _ = new io._HttpDetachedStreamSubscription(this.subscription, this.bufferedData, onData);
|
| _.resume();
|
| return _;
|
| } else {
|
| - return StreamOfint().fromIterable(this.bufferedData).listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError});
|
| + return StreamOfListOfint().fromIterable(JSArrayOfListOfint().of([this.bufferedData])).listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError});
|
| }
|
| }
|
| };
|
| dart.addSimpleTypeTests(io._HttpDetachedIncoming);
|
| dart.setSignature(io._HttpDetachedIncoming, {
|
| - constructors: () => ({new: dart.definiteFunctionType(io._HttpDetachedIncoming, [async.StreamSubscription, ListOfint()])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(io._HttpDetachedIncoming, [StreamSubscriptionOfListOfint(), ListOfint()])}),
|
| fields: () => ({
|
| - subscription: async.StreamSubscription,
|
| + subscription: StreamSubscriptionOfListOfint(),
|
| bufferedData: ListOfint()
|
| }),
|
| methods: () => ({listen: dart.definiteFunctionType(async.StreamSubscription$(core.List$(core.int)), [ListOfintTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool})})
|
| @@ -47196,7 +47863,7 @@ dart.setSignature(io._HttpParser, {
|
| [_remainingContent]: core.int,
|
| [_headers]: io._HttpHeaders,
|
| [_incoming]: io._HttpIncoming,
|
| - [_socketSubscription]: async.StreamSubscription,
|
| + [_socketSubscription]: StreamSubscriptionOfListOfint(),
|
| [_paused]: core.bool,
|
| [_bodyPaused]: core.bool,
|
| [_controller]: StreamControllerOf_HttpIncoming(),
|
| @@ -47508,7 +48175,7 @@ io._IOResourceInfo = class _IOResourceInfo extends core.Object {
|
| this.id = io._IOResourceInfo.getNextID();
|
| }
|
| get referenceValueMap() {
|
| - return dart.map({type: dart.str`@${this.type}`, id: this.id, name: this.name}, core.String, core.String);
|
| + return dart.map({type: dart.str`@${this.type}`, id: this.id, name: this.name}, core.String, core.Object);
|
| }
|
| static getNextID() {
|
| return (() => {
|
| @@ -47524,7 +48191,7 @@ dart.setSignature(io._IOResourceInfo, {
|
| type: core.String,
|
| id: core.int
|
| }),
|
| - getters: () => ({referenceValueMap: dart.definiteFunctionType(core.Map$(core.String, core.String), [])}),
|
| + getters: () => ({referenceValueMap: dart.definiteFunctionType(core.Map$(core.String, dart.dynamic), [])}),
|
| sfields: () => ({
|
| _count: core.int,
|
| _sw: core.Stopwatch,
|
| @@ -47571,7 +48238,7 @@ io._ReadWriteResourceInfo = class _ReadWriteResourceInfo extends io._IOResourceI
|
| super.new(type);
|
| }
|
| get fullValueMap() {
|
| - return dart.map({type: this.type, id: this.id, name: this.name, totalRead: this.totalRead, totalWritten: this.totalWritten, readCount: this.readCount, writeCount: this.writeCount, lastRead: this.lastRead, lastWrite: this.lastWrite}, core.String, core.String);
|
| + return dart.map({type: this.type, id: this.id, name: this.name, totalRead: this.totalRead, totalWritten: this.totalWritten, readCount: this.readCount, writeCount: this.writeCount, lastRead: this.lastRead, lastWrite: this.lastWrite}, core.String, core.Object);
|
| }
|
| };
|
| dart.setSignature(io._ReadWriteResourceInfo, {
|
| @@ -47584,7 +48251,7 @@ dart.setSignature(io._ReadWriteResourceInfo, {
|
| lastRead: core.double,
|
| lastWrite: core.double
|
| }),
|
| - getters: () => ({fullValueMap: dart.definiteFunctionType(core.Map$(core.String, core.String), [])}),
|
| + getters: () => ({fullValueMap: dart.definiteFunctionType(core.Map$(core.String, dart.dynamic), [])}),
|
| methods: () => ({
|
| addRead: dart.definiteFunctionType(dart.void, [core.int]),
|
| didRead: dart.definiteFunctionType(dart.void, []),
|
| @@ -47606,7 +48273,7 @@ io._FileResourceInfo = class _FileResourceInfo extends io._ReadWriteResourceInfo
|
| io._FileResourceInfo.openFiles[dartx.remove](info.id);
|
| }
|
| static getOpenFilesList() {
|
| - return ListOfMapOfString$String().from(io._FileResourceInfo.openFiles[dartx.values][dartx.map](MapOfString$String())(dart.fn(e => e.referenceValueMap, _FileResourceInfoToMapOfString$String())));
|
| + return ListOfMapOfString$String().from(io._FileResourceInfo.openFiles[dartx.values][dartx.map](MapOfString$dynamic())(dart.fn(e => e.referenceValueMap, _FileResourceInfoToMapOfString$dynamic())));
|
| }
|
| static getOpenFiles(func, params) {
|
| dart.assert(dart.equals(func, 'ext.dart.io.getOpenFiles'));
|
| @@ -47615,8 +48282,7 @@ io._FileResourceInfo = class _FileResourceInfo extends io._ReadWriteResourceInfo
|
| return FutureOfServiceExtensionResponse().value(new developer.ServiceExtensionResponse.result(json));
|
| }
|
| getFileInfoMap() {
|
| - let result = this.fullValueMap;
|
| - return result;
|
| + return this.fullValueMap;
|
| }
|
| static getFileInfoMapByID(func, params) {
|
| dart.assert(dart.dsend(params, 'containsKey', 'id'));
|
| @@ -47633,7 +48299,7 @@ dart.setSignature(io._FileResourceInfo, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._FileResourceInfo, [dart.dynamic])}),
|
| fields: () => ({file: dart.dynamic}),
|
| getters: () => ({name: dart.definiteFunctionType(core.String, [])}),
|
| - methods: () => ({getFileInfoMap: dart.definiteFunctionType(core.Map$(core.String, core.String), [])}),
|
| + methods: () => ({getFileInfoMap: dart.definiteFunctionType(core.Map$(core.String, dart.dynamic), [])}),
|
| sfields: () => ({
|
| TYPE: core.String,
|
| openFiles: MapOfint$_FileResourceInfo()
|
| @@ -47670,7 +48336,7 @@ io._ProcessResourceInfo = class _ProcessResourceInfo extends io._IOResourceInfo
|
| io._ProcessResourceInfo.ProcessStopped(this);
|
| }
|
| get fullValueMap() {
|
| - return dart.map({type: this.type, id: this.id, name: this.name, pid: core.String._check(dart.dload(this.process, 'pid')), startedAt: this.startedAt, arguments: core.String._check(dart.dload(this.process, _arguments)), workingDirectory: core.String._check(dart.dload(this.process, _workingDirectory) == null ? '.' : dart.dload(this.process, _workingDirectory))}, core.String, core.String);
|
| + return dart.map({type: this.type, id: this.id, name: this.name, pid: dart.dload(this.process, 'pid'), startedAt: this.startedAt, arguments: dart.dload(this.process, _arguments), workingDirectory: dart.dload(this.process, _workingDirectory) == null ? '.' : dart.dload(this.process, _workingDirectory)}, core.String, core.Object);
|
| }
|
| static ProcessStarted(info) {
|
| dart.assert(!dart.test(io._ProcessResourceInfo.startedProcesses[dartx.containsKey](info.id)));
|
| @@ -47681,7 +48347,7 @@ io._ProcessResourceInfo = class _ProcessResourceInfo extends io._IOResourceInfo
|
| io._ProcessResourceInfo.startedProcesses[dartx.remove](info.id);
|
| }
|
| static getStartedProcessesList() {
|
| - return ListOfMapOfString$String().from(io._ProcessResourceInfo.startedProcesses[dartx.values][dartx.map](MapOfString$String())(dart.fn(e => e.referenceValueMap, _ProcessResourceInfoToMapOfString$String())));
|
| + return ListOfMapOfString$String().from(io._ProcessResourceInfo.startedProcesses[dartx.values][dartx.map](MapOfString$dynamic())(dart.fn(e => e.referenceValueMap, _ProcessResourceInfoToMapOfString$dynamic())));
|
| }
|
| static getStartedProcesses(func, params) {
|
| dart.assert(func == 'ext.dart.io.getProcesses');
|
| @@ -47704,7 +48370,7 @@ dart.setSignature(io._ProcessResourceInfo, {
|
| }),
|
| getters: () => ({
|
| name: dart.definiteFunctionType(core.String, []),
|
| - fullValueMap: dart.definiteFunctionType(core.Map$(core.String, core.String), [])
|
| + fullValueMap: dart.definiteFunctionType(core.Map$(core.String, dart.dynamic), [])
|
| }),
|
| methods: () => ({stopped: dart.definiteFunctionType(dart.void, [])}),
|
| sfields: () => ({
|
| @@ -47748,18 +48414,18 @@ io._SocketResourceInfo = class _SocketResourceInfo extends io._ReadWriteResource
|
| return dart.str`${dart.dload(dart.dload(this.socket, 'address'), 'host')}:${dart.dload(this.socket, 'port')}${remote}`;
|
| }
|
| static getOpenSocketsList() {
|
| - return ListOfMapOfString$String().from(io._SocketResourceInfo.openSockets[dartx.values][dartx.map](MapOfString$String())(dart.fn(e => e.referenceValueMap, _SocketResourceInfoToMapOfString$String())));
|
| + return ListOfMapOfString$String().from(io._SocketResourceInfo.openSockets[dartx.values][dartx.map](MapOfString$dynamic())(dart.fn(e => e.referenceValueMap, _SocketResourceInfoToMapOfString$dynamic())));
|
| }
|
| getSocketInfoMap() {
|
| let result = this.fullValueMap;
|
| result[dartx._set]('socketType', dart.test(dart.dload(this.socket, 'isTcp')) ? io._SocketResourceInfo.TCP_STRING : io._SocketResourceInfo.UDP_STRING);
|
| - result[dartx._set]('listening', core.String._check(dart.dload(this.socket, 'isListening')));
|
| - result[dartx._set]('host', core.String._check(dart.dload(dart.dload(this.socket, 'address'), 'host')));
|
| - result[dartx._set]('port', core.String._check(dart.dload(this.socket, 'port')));
|
| + result[dartx._set]('listening', dart.dload(this.socket, 'isListening'));
|
| + result[dartx._set]('host', dart.dload(dart.dload(this.socket, 'address'), 'host'));
|
| + result[dartx._set]('port', dart.dload(this.socket, 'port'));
|
| if (!dart.test(dart.dload(this.socket, 'isListening'))) {
|
| try {
|
| - result[dartx._set]('remoteHost', core.String._check(dart.dload(dart.dload(this.socket, 'remoteAddress'), 'host')));
|
| - result[dartx._set]('remotePort', core.String._check(dart.dload(this.socket, 'remotePort')));
|
| + result[dartx._set]('remoteHost', dart.dload(dart.dload(this.socket, 'remoteAddress'), 'host'));
|
| + result[dartx._set]('remotePort', dart.dload(this.socket, 'remotePort'));
|
| } catch (e) {
|
| result[dartx._set]('remotePort', 'NA');
|
| result[dartx._set]('remoteHost', 'NA');
|
| @@ -47769,7 +48435,7 @@ io._SocketResourceInfo = class _SocketResourceInfo extends io._ReadWriteResource
|
| result[dartx._set]('remotePort', 'NA');
|
| result[dartx._set]('remoteHost', 'NA');
|
| }
|
| - result[dartx._set]('addressType', core.String._check(dart.dload(dart.dload(dart.dload(this.socket, 'address'), 'type'), 'name')));
|
| + result[dartx._set]('addressType', dart.dload(dart.dload(dart.dload(this.socket, 'address'), 'type'), 'name'));
|
| return result;
|
| }
|
| static getSocketInfoMapByID(func, params) {
|
| @@ -47798,7 +48464,7 @@ dart.setSignature(io._SocketResourceInfo, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._SocketResourceInfo, [dart.dynamic])}),
|
| fields: () => ({socket: dart.dynamic}),
|
| getters: () => ({name: dart.definiteFunctionType(core.String, [])}),
|
| - methods: () => ({getSocketInfoMap: dart.definiteFunctionType(core.Map$(core.String, core.String), [])}),
|
| + methods: () => ({getSocketInfoMap: dart.definiteFunctionType(core.Map$(core.String, dart.dynamic), [])}),
|
| sfields: () => ({
|
| TCP_STRING: core.String,
|
| UDP_STRING: core.String,
|
| @@ -47847,33 +48513,36 @@ io._FILE_SET_POSITION = 9;
|
| io._FILE_TRUNCATE = 10;
|
| io._FILE_LENGTH = 11;
|
| io._FILE_LENGTH_FROM_PATH = 12;
|
| -io._FILE_LAST_MODIFIED = 13;
|
| -io._FILE_FLUSH = 14;
|
| -io._FILE_READ_BYTE = 15;
|
| -io._FILE_WRITE_BYTE = 16;
|
| -io._FILE_READ = 17;
|
| -io._FILE_READ_INTO = 18;
|
| -io._FILE_WRITE_FROM = 19;
|
| -io._FILE_CREATE_LINK = 20;
|
| -io._FILE_DELETE_LINK = 21;
|
| -io._FILE_RENAME_LINK = 22;
|
| -io._FILE_LINK_TARGET = 23;
|
| -io._FILE_TYPE = 24;
|
| -io._FILE_IDENTICAL = 25;
|
| -io._FILE_STAT = 26;
|
| -io._FILE_LOCK = 27;
|
| -io._SOCKET_LOOKUP = 28;
|
| -io._SOCKET_LIST_INTERFACES = 29;
|
| -io._SOCKET_REVERSE_LOOKUP = 30;
|
| -io._DIRECTORY_CREATE = 31;
|
| -io._DIRECTORY_DELETE = 32;
|
| -io._DIRECTORY_EXISTS = 33;
|
| -io._DIRECTORY_CREATE_TEMP = 34;
|
| -io._DIRECTORY_LIST_START = 35;
|
| -io._DIRECTORY_LIST_NEXT = 36;
|
| -io._DIRECTORY_LIST_STOP = 37;
|
| -io._DIRECTORY_RENAME = 38;
|
| -io._SSL_PROCESS_FILTER = 39;
|
| +io._FILE_LAST_ACCESSED = 13;
|
| +io._FILE_SET_LAST_ACCESSED = 14;
|
| +io._FILE_LAST_MODIFIED = 15;
|
| +io._FILE_SET_LAST_MODIFIED = 16;
|
| +io._FILE_FLUSH = 17;
|
| +io._FILE_READ_BYTE = 18;
|
| +io._FILE_WRITE_BYTE = 19;
|
| +io._FILE_READ = 20;
|
| +io._FILE_READ_INTO = 21;
|
| +io._FILE_WRITE_FROM = 22;
|
| +io._FILE_CREATE_LINK = 23;
|
| +io._FILE_DELETE_LINK = 24;
|
| +io._FILE_RENAME_LINK = 25;
|
| +io._FILE_LINK_TARGET = 26;
|
| +io._FILE_TYPE = 27;
|
| +io._FILE_IDENTICAL = 28;
|
| +io._FILE_STAT = 29;
|
| +io._FILE_LOCK = 30;
|
| +io._SOCKET_LOOKUP = 31;
|
| +io._SOCKET_LIST_INTERFACES = 32;
|
| +io._SOCKET_REVERSE_LOOKUP = 33;
|
| +io._DIRECTORY_CREATE = 34;
|
| +io._DIRECTORY_DELETE = 35;
|
| +io._DIRECTORY_EXISTS = 36;
|
| +io._DIRECTORY_CREATE_TEMP = 37;
|
| +io._DIRECTORY_LIST_START = 38;
|
| +io._DIRECTORY_LIST_NEXT = 39;
|
| +io._DIRECTORY_LIST_STOP = 40;
|
| +io._DIRECTORY_RENAME = 41;
|
| +io._SSL_PROCESS_FILTER = 42;
|
| io._IOService = class _IOService extends core.Object {
|
| static _dispatch(request, data) {
|
| dart.throw(new core.UnsupportedError("_IOService._dispatch"));
|
| @@ -47919,12 +48588,6 @@ io._Link = class _Link extends io.FileSystemEntity {
|
| get absolute() {
|
| return io.Link.new(this[_absolutePath]);
|
| }
|
| - stat() {
|
| - return io.FileStat.stat(this.path);
|
| - }
|
| - statSync() {
|
| - return io.FileStat.statSync(this.path);
|
| - }
|
| create(target, opts) {
|
| let recursive = opts && 'recursive' in opts ? opts.recursive : false;
|
| if (dart.test(io.Platform.isWindows)) {
|
| @@ -48049,8 +48712,6 @@ dart.setSignature(io._Link, {
|
| methods: () => ({
|
| exists: dart.definiteFunctionType(async.Future$(core.bool), []),
|
| existsSync: dart.definiteFunctionType(core.bool, []),
|
| - stat: dart.definiteFunctionType(async.Future$(io.FileStat), []),
|
| - statSync: dart.definiteFunctionType(io.FileStat, []),
|
| create: dart.definiteFunctionType(async.Future$(io.Link), [core.String], {recursive: core.bool}),
|
| createSync: dart.definiteFunctionType(dart.void, [core.String], {recursive: core.bool}),
|
| [_makeWindowsLinkTarget]: dart.definiteFunctionType(core.String, [core.String]),
|
| @@ -48117,7 +48778,8 @@ dart.setSignature(io.Platform, {
|
| isMacOS: core.bool,
|
| isWindows: core.bool,
|
| isAndroid: core.bool,
|
| - isIOS: core.bool
|
| + isIOS: core.bool,
|
| + isFuchsia: core.bool
|
| }),
|
| sgetters: () => ({
|
| numberOfProcessors: dart.definiteFunctionType(core.int, []),
|
| @@ -48164,6 +48826,9 @@ dart.defineLazy(io.Platform, {
|
| },
|
| get isIOS() {
|
| return io.Platform._operatingSystem == "ios";
|
| + },
|
| + get isFuchsia() {
|
| + return io.Platform._operatingSystem == "fuchsia";
|
| }
|
| });
|
| io._Platform = class _Platform extends core.Object {
|
| @@ -48225,14 +48890,17 @@ io._Platform = class _Platform extends core.Object {
|
| let env = io._Platform._environment();
|
| if (!io.OSError.is(env)) {
|
| let isWindows = io._Platform.operatingSystem == 'windows';
|
| - let result = isWindows ? new io._CaseInsensitiveStringMap() : core.Map.new();
|
| + let result = isWindows ? new (_CaseInsensitiveStringMapOfString())() : MapOfString$String().new();
|
| for (let str of core.Iterable._check(env)) {
|
| + if (str == null) {
|
| + continue;
|
| + }
|
| let equalsIndex = dart.dsend(str, 'indexOf', '=');
|
| if (dart.test(dart.dsend(equalsIndex, '>', 0))) {
|
| - result[dartx._set](dart.dsend(str, 'substring', 0, equalsIndex), dart.dsend(str, 'substring', dart.dsend(equalsIndex, '+', 1)));
|
| + result[dartx._set](core.String._check(dart.dsend(str, 'substring', 0, equalsIndex)), core.String._check(dart.dsend(str, 'substring', dart.dsend(equalsIndex, '+', 1))));
|
| }
|
| }
|
| - io._Platform._environmentCache = new (UnmodifiableMapViewOfString$String())(MapOfString$String()._check(result));
|
| + io._Platform._environmentCache = new (UnmodifiableMapViewOfString$String())(result);
|
| } else {
|
| io._Platform._environmentCache = env;
|
| }
|
| @@ -48240,7 +48908,7 @@ io._Platform = class _Platform extends core.Object {
|
| if (io.OSError.is(io._Platform._environmentCache)) {
|
| dart.throw(io._Platform._environmentCache);
|
| } else {
|
| - return MapOfString$String()._check(io._Platform._environmentCache);
|
| + return MapOfString$String().as(io._Platform._environmentCache);
|
| }
|
| }
|
| static get version() {
|
| @@ -48305,6 +48973,7 @@ io._CaseInsensitiveStringMap$ = dart.generic(V => {
|
| let MapOfString$V = () => (MapOfString$V = dart.constFn(core.Map$(core.String, V)))();
|
| let VoidToV = () => (VoidToV = dart.constFn(dart.functionType(V, [])))();
|
| let StringAndVTovoid = () => (StringAndVTovoid = dart.constFn(dart.functionType(dart.void, [core.String, V])))();
|
| + let StringAndVToV = () => (StringAndVToV = dart.constFn(dart.definiteFunctionType(V, [core.String, V])))();
|
| class _CaseInsensitiveStringMap extends core.Object {
|
| new() {
|
| this[_map] = MapOfString$V().new();
|
| @@ -48328,7 +48997,8 @@ io._CaseInsensitiveStringMap$ = dart.generic(V => {
|
| return this[_map][dartx.putIfAbsent](key[dartx.toUpperCase](), ifAbsent);
|
| }
|
| addAll(other) {
|
| - other[dartx.forEach](dart.fn((key, value) => this._set(core.String._check(dart.dsend(key, 'toUpperCase')), V._check(value)), dynamicAnddynamicTovoid()));
|
| + MapOfString$V()._check(other);
|
| + other[dartx.forEach](dart.fn((key, value) => this._set(key[dartx.toUpperCase](), value), StringAndVToV()));
|
| }
|
| remove(key) {
|
| return typeof key == 'string' ? this[_map][dartx.remove](key[dartx.toUpperCase]()) : null;
|
| @@ -48375,7 +49045,7 @@ io._CaseInsensitiveStringMap$ = dart.generic(V => {
|
| _get: dart.definiteFunctionType(V, [core.Object]),
|
| _set: dart.definiteFunctionType(dart.void, [core.String, V]),
|
| putIfAbsent: dart.definiteFunctionType(V, [core.String, VoidToV()]),
|
| - addAll: dart.definiteFunctionType(dart.void, [core.Map]),
|
| + addAll: dart.definiteFunctionType(dart.void, [MapOfString$V()]),
|
| remove: dart.definiteFunctionType(V, [core.Object]),
|
| clear: dart.definiteFunctionType(dart.void, []),
|
| forEach: dart.definiteFunctionType(dart.void, [StringAndVTovoid()])
|
| @@ -48483,9 +49153,6 @@ dart.defineEnumValues(io.ProcessStartMode, [
|
| 'DETACHED_WITH_STDIO'
|
| ]);
|
| io.Process = class Process extends core.Object {
|
| - new() {
|
| - this.exitCode = null;
|
| - }
|
| static start(executable, arguments$, opts) {
|
| let workingDirectory = opts && 'workingDirectory' in opts ? opts.workingDirectory : null;
|
| let environment = opts && 'environment' in opts ? opts.environment : null;
|
| @@ -48518,7 +49185,6 @@ io.Process = class Process extends core.Object {
|
| }
|
| };
|
| dart.setSignature(io.Process, {
|
| - fields: () => ({exitCode: FutureOfint()}),
|
| statics: () => ({
|
| start: dart.definiteFunctionType(async.Future$(io.Process), [core.String, ListOfString()], {workingDirectory: core.String, environment: MapOfString$String(), includeParentEnvironment: core.bool, runInShell: core.bool, mode: io.ProcessStartMode}),
|
| run: dart.definiteFunctionType(async.Future$(io.ProcessResult), [core.String, ListOfString()], {workingDirectory: core.String, environment: MapOfString$String(), includeParentEnvironment: core.bool, runInShell: core.bool, stdoutEncoding: convert.Encoding, stderrEncoding: convert.Encoding}),
|
| @@ -48749,22 +49415,14 @@ io.SecureSocket = class SecureSocket extends core.Object {
|
| let host = opts && 'host' in opts ? opts.host : null;
|
| let context = opts && 'context' in opts ? opts.context : null;
|
| let onBadCertificate = opts && 'onBadCertificate' in opts ? opts.onBadCertificate : null;
|
| - let completer = async.Completer.new();
|
| - dart.dsend(dart.dsend(dart.dsend(socket, _detachRaw), 'then', dart.fn(detachedRaw => io.RawSecureSocket.secure(io.RawSocket._check(dart.dindex(detachedRaw, 0)), {subscription: async.StreamSubscription._check(dart.dindex(detachedRaw, 1)), host: host, context: context, onBadCertificate: onBadCertificate}), dynamicToFutureOfRawSecureSocket())), 'then', dart.fn(raw => {
|
| - completer.complete(io.SecureSocket._(io.RawSecureSocket._check(raw)));
|
| - }, dynamicToNull()));
|
| - return FutureOfSecureSocket()._check(completer.future);
|
| + return async.Future.as(dart.dsend(socket, _detachRaw)).then(io.RawSecureSocket)(dart.fn(detachedRaw => io.RawSecureSocket.secure(io.RawSocket.as(dart.dindex(detachedRaw, 0)), {subscription: StreamSubscriptionOfRawSocketEvent().as(dart.dindex(detachedRaw, 1)), host: host, context: context, onBadCertificate: onBadCertificate}), dynamicToFutureOfRawSecureSocket())).then(io.SecureSocket)(dart.fn(raw => io.SecureSocket._(raw), RawSecureSocketToSecureSocket()));
|
| }
|
| static secureServer(socket, context, opts) {
|
| let bufferedData = opts && 'bufferedData' in opts ? opts.bufferedData : null;
|
| let requestClientCertificate = opts && 'requestClientCertificate' in opts ? opts.requestClientCertificate : false;
|
| let requireClientCertificate = opts && 'requireClientCertificate' in opts ? opts.requireClientCertificate : false;
|
| let supportedProtocols = opts && 'supportedProtocols' in opts ? opts.supportedProtocols : null;
|
| - let completer = async.Completer.new();
|
| - dart.dsend(dart.dsend(dart.dsend(socket, _detachRaw), 'then', dart.fn(detachedRaw => io.RawSecureSocket.secureServer(io.RawSocket._check(dart.dindex(detachedRaw, 0)), context, {subscription: async.StreamSubscription._check(dart.dindex(detachedRaw, 1)), bufferedData: bufferedData, requestClientCertificate: requestClientCertificate, requireClientCertificate: requireClientCertificate, supportedProtocols: supportedProtocols}), dynamicToFutureOfRawSecureSocket())), 'then', dart.fn(raw => {
|
| - completer.complete(io.SecureSocket._(io.RawSecureSocket._check(raw)));
|
| - }, dynamicToNull()));
|
| - return FutureOfSecureSocket()._check(completer.future);
|
| + return async.Future.as(dart.dsend(socket, _detachRaw)).then(io.RawSecureSocket)(dart.fn(detachedRaw => io.RawSecureSocket.secureServer(io.RawSocket.as(dart.dindex(detachedRaw, 0)), context, {subscription: StreamSubscriptionOfRawSocketEvent().as(dart.dindex(detachedRaw, 1)), bufferedData: bufferedData, requestClientCertificate: requestClientCertificate, requireClientCertificate: requireClientCertificate, supportedProtocols: supportedProtocols}), dynamicToFutureOfRawSecureSocket())).then(io.SecureSocket)(dart.fn(raw => io.SecureSocket._(raw), RawSecureSocketToSecureSocket()));
|
| }
|
| };
|
| io.SecureSocket[dart.implements] = () => [io.Socket];
|
| @@ -48862,8 +49520,8 @@ io.RawSecureSocket[dart.implements] = () => [io.RawSocket];
|
| dart.setSignature(io.RawSecureSocket, {
|
| statics: () => ({
|
| connect: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), [dart.dynamic, core.int], {context: io.SecurityContext, onBadCertificate: X509CertificateTobool(), supportedProtocols: ListOfString()}),
|
| - secure: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), [io.RawSocket], {subscription: async.StreamSubscription, host: dart.dynamic, context: io.SecurityContext, onBadCertificate: X509CertificateTobool(), supportedProtocols: ListOfString()}),
|
| - secureServer: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), [io.RawSocket, io.SecurityContext], {subscription: async.StreamSubscription, bufferedData: ListOfint(), requestClientCertificate: core.bool, requireClientCertificate: core.bool, supportedProtocols: ListOfString()})
|
| + secure: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), [io.RawSocket], {subscription: StreamSubscriptionOfRawSocketEvent(), host: dart.dynamic, context: io.SecurityContext, onBadCertificate: X509CertificateTobool(), supportedProtocols: ListOfString()}),
|
| + secureServer: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), [io.RawSocket, io.SecurityContext], {subscription: StreamSubscriptionOfRawSocketEvent(), bufferedData: ListOfint(), requestClientCertificate: core.bool, requireClientCertificate: core.bool, supportedProtocols: ListOfString()})
|
| }),
|
| names: ['connect', 'secure', 'secureServer']
|
| });
|
| @@ -49093,12 +49751,12 @@ io._RawSecureSocket = class _RawSecureSocket extends async.Stream$(io.RawSocketE
|
| if (host != null) {
|
| address = io.InternetAddress._cloneWithNewHost(address, core.String._check(host));
|
| }
|
| - return new io._RawSecureSocket(address, requestedPort, is_server, context, socket, StreamSubscriptionOfRawSocketEvent()._check(subscription), bufferedData, requestClientCertificate, requireClientCertificate, onBadCertificate, supportedProtocols)[_handshakeComplete].future;
|
| + return new io._RawSecureSocket(address, requestedPort, is_server, context, socket, subscription, bufferedData, requestClientCertificate, requireClientCertificate, onBadCertificate, supportedProtocols)[_handshakeComplete].future;
|
| }
|
| new(address, requestedPort, is_server, context, socket, socketSubscription, bufferedData, requestClientCertificate, requireClientCertificate, onBadCertificate, supportedProtocols) {
|
| this[_handshakeComplete] = CompleterOf_RawSecureSocket().new();
|
| this[_status] = io._RawSecureSocket.HANDSHAKE;
|
| - this[_closeCompleter] = async.Completer.new();
|
| + this[_closeCompleter] = CompleterOfRawSecureSocket().new();
|
| this[_filterStatus] = new io._FilterStatus();
|
| this[_secureFilter] = io._SecureFilter.new();
|
| this.address = address;
|
| @@ -49208,7 +49866,7 @@ io._RawSecureSocket = class _RawSecureSocket extends async.Stream$(io.RawSocketE
|
| }
|
| close() {
|
| this.shutdown(io.SocketDirection.BOTH);
|
| - return FutureOfRawSecureSocket()._check(this[_closeCompleter].future);
|
| + return this[_closeCompleter].future;
|
| }
|
| [_completeCloseCompleter](dummy) {
|
| if (dummy === void 0) dummy = null;
|
| @@ -49655,7 +50313,7 @@ dart.setSignature(io._RawSecureSocket, {
|
| [_socketClosedWrite]: core.bool,
|
| [_closedRead]: core.bool,
|
| [_closedWrite]: core.bool,
|
| - [_closeCompleter]: async.Completer,
|
| + [_closeCompleter]: CompleterOfRawSecureSocket(),
|
| [_filterStatus]: io._FilterStatus,
|
| [_connectPending]: core.bool,
|
| [_filterPending]: core.bool,
|
| @@ -49681,7 +50339,7 @@ dart.setSignature(io._RawSecureSocket, {
|
| listen: dart.definiteFunctionType(async.StreamSubscription$(io.RawSocketEvent), [RawSocketEventTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
|
| available: dart.definiteFunctionType(core.int, []),
|
| close: dart.definiteFunctionType(async.Future$(io.RawSecureSocket), []),
|
| - [_completeCloseCompleter]: dart.definiteFunctionType(dart.void, [], [dart.dynamic]),
|
| + [_completeCloseCompleter]: dart.definiteFunctionType(dart.void, [], [io.RawSocket]),
|
| [_close]: dart.definiteFunctionType(dart.void, []),
|
| shutdown: dart.definiteFunctionType(dart.void, [io.SocketDirection]),
|
| read: dart.definiteFunctionType(core.List$(core.int), [], [core.int]),
|
| @@ -49721,7 +50379,7 @@ dart.setSignature(io._RawSecureSocket, {
|
| }),
|
| statics: () => ({
|
| _isBufferEncrypted: dart.definiteFunctionType(core.bool, [core.int]),
|
| - connect: dart.definiteFunctionType(async.Future$(io._RawSecureSocket), [dart.dynamic, core.int], {is_server: core.bool, context: io.SecurityContext, socket: io.RawSocket, subscription: async.StreamSubscription, bufferedData: ListOfint(), requestClientCertificate: core.bool, requireClientCertificate: core.bool, onBadCertificate: X509CertificateTobool(), supportedProtocols: ListOfString()}),
|
| + connect: dart.definiteFunctionType(async.Future$(io._RawSecureSocket), [dart.dynamic, core.int], {is_server: core.bool, context: io.SecurityContext, socket: io.RawSocket, subscription: StreamSubscriptionOfRawSocketEvent(), bufferedData: ListOfint(), requestClientCertificate: core.bool, requireClientCertificate: core.bool, onBadCertificate: X509CertificateTobool(), supportedProtocols: ListOfString()}),
|
| _verifyFields: dart.definiteFunctionType(dart.void, [dart.dynamic, core.int, core.bool, core.bool, core.bool, core.Function])
|
| }),
|
| names: ['_isBufferEncrypted', 'connect', '_verifyFields']
|
| @@ -49827,7 +50485,7 @@ io._ExternalBuffer = class _ExternalBuffer extends core.Object {
|
| while (true) {
|
| let toWrite = this.linearLength;
|
| if (toWrite == 0) return false;
|
| - let bytes = socket.write(ListOfint()._check(this.data), this.start, toWrite);
|
| + let bytes = socket.write(this.data, this.start, toWrite);
|
| this.advanceStart(bytes);
|
| if (dart.notNull(bytes) < dart.notNull(toWrite)) {
|
| return true;
|
| @@ -49838,7 +50496,7 @@ io._ExternalBuffer = class _ExternalBuffer extends core.Object {
|
| dart.setSignature(io._ExternalBuffer, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._ExternalBuffer, [dart.dynamic])}),
|
| fields: () => ({
|
| - data: core.List,
|
| + data: ListOfint(),
|
| start: core.int,
|
| end: core.int,
|
| size: dart.dynamic
|
| @@ -50357,7 +51015,7 @@ io.Stdin = class Stdin extends io._StdStream {
|
| let retainNewlines = opts && 'retainNewlines' in opts ? opts.retainNewlines : false;
|
| let CR = 13;
|
| let LF = 10;
|
| - let line = [];
|
| + let line = JSArrayOfint().of([]);
|
| let crIsNewline = dart.test(io.Platform.isWindows) && dart.equals(io.stdioType(io.stdin), io.StdioType.TERMINAL) && !dart.test(/* Unimplemented unknown name */lineMode);
|
| if (dart.test(retainNewlines)) {
|
| let byte = null;
|
| @@ -50400,7 +51058,7 @@ io.Stdin = class Stdin extends io._StdStream {
|
| line[dartx.add](byte);
|
| }
|
| }
|
| - return encoding.decode(ListOfint()._check(line));
|
| + return encoding.decode(line);
|
| }
|
| set echoMode(enabled) {
|
| dart.throw(new core.UnsupportedError("Stdin.echoMode"));
|
| @@ -50572,6 +51230,24 @@ dart.setSignature(io.StdoutException, {
|
| osError: io.OSError
|
| })
|
| });
|
| +io.StdinException = class StdinException extends core.Object {
|
| + new(message, osError) {
|
| + if (osError === void 0) osError = null;
|
| + this.message = message;
|
| + this.osError = osError;
|
| + }
|
| + toString() {
|
| + return dart.str`StdinException: ${this.message}${this.osError == null ? "" : dart.str`, ${this.osError}`}`;
|
| + }
|
| +};
|
| +io.StdinException[dart.implements] = () => [io.IOException];
|
| +dart.setSignature(io.StdinException, {
|
| + constructors: () => ({new: dart.definiteFunctionType(io.StdinException, [core.String], [io.OSError])}),
|
| + fields: () => ({
|
| + message: core.String,
|
| + osError: io.OSError
|
| + })
|
| +});
|
| io._StdConsumer = class _StdConsumer extends core.Object {
|
| new(fd) {
|
| this[_file] = io._File._openStdioSync(fd);
|
| @@ -50800,6 +51476,7 @@ io._WindowsCodePageEncoder = class _WindowsCodePageEncoder extends convert.Conve
|
| }
|
| };
|
| dart.addSimpleTypeTests(io._WindowsCodePageEncoder);
|
| +io._WindowsCodePageEncoder[dart.implements] = () => [ChunkedConverterOfString$ListOfint$String$ListOfint()];
|
| dart.setSignature(io._WindowsCodePageEncoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._WindowsCodePageEncoder, [])}),
|
| methods: () => ({
|
| @@ -50854,6 +51531,7 @@ io._WindowsCodePageDecoder = class _WindowsCodePageDecoder extends convert.Conve
|
| }
|
| };
|
| dart.addSimpleTypeTests(io._WindowsCodePageDecoder);
|
| +io._WindowsCodePageDecoder[dart.implements] = () => [ChunkedConverterOfListOfint$String$ListOfint$String()];
|
| dart.setSignature(io._WindowsCodePageDecoder, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._WindowsCodePageDecoder, [])}),
|
| methods: () => ({
|
| @@ -51145,6 +51823,15 @@ io._WebSocketOpcode.RESERVED_C = 12;
|
| io._WebSocketOpcode.RESERVED_D = 13;
|
| io._WebSocketOpcode.RESERVED_E = 14;
|
| io._WebSocketOpcode.RESERVED_F = 15;
|
| +io._EncodedString = class _EncodedString extends core.Object {
|
| + new(bytes) {
|
| + this.bytes = bytes;
|
| + }
|
| +};
|
| +dart.setSignature(io._EncodedString, {
|
| + constructors: () => ({new: dart.definiteFunctionType(io._EncodedString, [ListOfint()])}),
|
| + fields: () => ({bytes: ListOfint()})
|
| +});
|
| io._CompressionMaxWindowBits = class _CompressionMaxWindowBits extends core.Object {
|
| new(headerValue, maxWindowBits) {
|
| if (headerValue === void 0) headerValue = null;
|
| @@ -51485,7 +52172,7 @@ io._WebSocketProtocolTransformer = class _WebSocketProtocolTransformer extends c
|
| this[_unmaskingIndex] = 0;
|
| }
|
| };
|
| -io._WebSocketProtocolTransformer[dart.implements] = () => [StreamTransformerOfListOfint$dynamic(), EventSinkOfUint8List()];
|
| +io._WebSocketProtocolTransformer[dart.implements] = () => [EventSinkOfListOfint(), StreamTransformerOfListOfint$dynamic()];
|
| dart.setSignature(io._WebSocketProtocolTransformer, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._WebSocketProtocolTransformer, [], [core.bool, io._WebSocketPerMessageDeflate])}),
|
| fields: () => ({
|
| @@ -51509,7 +52196,7 @@ dart.setSignature(io._WebSocketProtocolTransformer, {
|
| [_deflate]: io._WebSocketPerMessageDeflate
|
| }),
|
| methods: () => ({
|
| - bind: dart.definiteFunctionType(async.Stream, [async.Stream]),
|
| + bind: dart.definiteFunctionType(async.Stream, [StreamOfListOfint()]),
|
| addError: dart.definiteFunctionType(dart.void, [core.Object], [core.StackTrace]),
|
| close: dart.definiteFunctionType(dart.void, []),
|
| add: dart.definiteFunctionType(dart.void, [ListOfint()]),
|
| @@ -51569,6 +52256,7 @@ dart.setSignature(io._WebSocketPong, {
|
| constructors: () => ({new: dart.definiteFunctionType(io._WebSocketPong, [], [ListOfint()])}),
|
| fields: () => ({payload: ListOfint()})
|
| });
|
| +io._ProtocolSelector = dart.typedef('_ProtocolSelector', () => dart.functionType(dart.dynamic, [ListOfString()]));
|
| const _protocolSelector = Symbol('_protocolSelector');
|
| const _compression = Symbol('_compression');
|
| io._WebSocketTransformerImpl = class _WebSocketTransformerImpl extends core.Object {
|
| @@ -51606,24 +52294,24 @@ io._WebSocketTransformerImpl = class _WebSocketTransformerImpl extends core.Obje
|
| }
|
| let deflate = io._WebSocketTransformerImpl._negotiateCompression(request, response, compression);
|
| response.headers.contentLength = 0;
|
| - return response.detachSocket().then(io._WebSocketImpl)(dart.fn(socket => new io._WebSocketImpl._fromSocket(socket, protocol, compression, true, deflate), SocketTo_WebSocketImpl()));
|
| + return response.detachSocket().then(io.WebSocket)(dart.fn(socket => new io._WebSocketImpl._fromSocket(socket, protocol, compression, true, deflate), SocketTo_WebSocketImpl()));
|
| }
|
| - dart.fn(upgrade, StringToFuture());
|
| + dart.fn(upgrade, StringToFutureOfWebSocket());
|
| let protocols = request.headers._get('Sec-WebSocket-Protocol');
|
| if (protocols != null && _protocolSelector != null) {
|
| protocols = io._HttpParser._tokenizeFieldValue(protocols[dartx.join](', '));
|
| - return async.Future.new(dart.fn(() => dart.dcall(_protocolSelector, protocols), VoidTodynamic())).then(dart.dynamic)(dart.fn(protocol => {
|
| - if (dart.notNull(protocols[dartx.indexOf](core.String._check(protocol))) < 0) {
|
| + return FutureOfString().new(dart.fn(() => _protocolSelector(protocols), VoidTodynamic())).then(core.String)(dart.fn(protocol => {
|
| + if (dart.notNull(protocols[dartx.indexOf](protocol)) < 0) {
|
| dart.throw(new io.WebSocketException("Selected protocol is not in the list of available protocols"));
|
| }
|
| return protocol;
|
| - }, dynamicTodynamic())).catchError(dart.fn(error => {
|
| + }, StringToString())).catchError(dart.fn(error => {
|
| response.statusCode = io.HttpStatus.INTERNAL_SERVER_ERROR;
|
| response.close();
|
| dart.throw(error);
|
| }, dynamicToNull())).then(io.WebSocket)(upgrade);
|
| } else {
|
| - return FutureOfWebSocket()._check(upgrade(null));
|
| + return upgrade(null);
|
| }
|
| }
|
| static _negotiateCompression(request, response, compression) {
|
| @@ -51670,15 +52358,15 @@ io._WebSocketTransformerImpl = class _WebSocketTransformerImpl extends core.Obje
|
| };
|
| io._WebSocketTransformerImpl[dart.implements] = () => [io.WebSocketTransformer];
|
| dart.setSignature(io._WebSocketTransformerImpl, {
|
| - constructors: () => ({new: dart.definiteFunctionType(io._WebSocketTransformerImpl, [core.Function, io.CompressionOptions])}),
|
| + constructors: () => ({new: dart.definiteFunctionType(io._WebSocketTransformerImpl, [io._ProtocolSelector, io.CompressionOptions])}),
|
| fields: () => ({
|
| [_controller]: StreamControllerOfWebSocket(),
|
| - [_protocolSelector]: core.Function,
|
| + [_protocolSelector]: io._ProtocolSelector,
|
| [_compression]: io.CompressionOptions
|
| }),
|
| methods: () => ({bind: dart.definiteFunctionType(async.Stream$(io.WebSocket), [StreamOfHttpRequest()])}),
|
| statics: () => ({
|
| - _upgrade: dart.definiteFunctionType(async.Future$(io.WebSocket), [io.HttpRequest, dart.dynamic, io.CompressionOptions]),
|
| + _upgrade: dart.definiteFunctionType(async.Future$(io.WebSocket), [io.HttpRequest, io._ProtocolSelector, io.CompressionOptions]),
|
| _negotiateCompression: dart.definiteFunctionType(io._WebSocketPerMessageDeflate, [io.HttpRequest, io.HttpResponse, io.CompressionOptions]),
|
| _isUpgradeRequest: dart.definiteFunctionType(core.bool, [io.HttpRequest])
|
| }),
|
| @@ -51714,25 +52402,24 @@ io._WebSocketPerMessageDeflate = class _WebSocketPerMessageDeflate extends core.
|
| }
|
| processIncomingMessage(msg) {
|
| this[_ensureDecoder]();
|
| - let data = [];
|
| + let data = JSArrayOfint().of([]);
|
| data[dartx.addAll](msg);
|
| data[dartx.addAll](const || (const = dart.constList([0, 0, 255, 255], core.int)));
|
| - this.decoder.process(ListOfint()._check(data), 0, data[dartx.length]);
|
| - let result = [];
|
| + this.decoder.process(data, 0, data[dartx.length]);
|
| + let result = JSArrayOfint().of([]);
|
| let out = null;
|
| while ((out = this.decoder.processed()) != null) {
|
| - result[dartx.addAll](core.Iterable._check(out));
|
| + result[dartx.addAll](out);
|
| }
|
| if (dart.test(this.serverSide) && dart.test(this.clientNoContextTakeover) || !dart.test(this.serverSide) && dart.test(this.serverNoContextTakeover)) {
|
| this.decoder = null;
|
| }
|
| - return typed_data.Uint8List.fromList(ListOfint()._check(result));
|
| + return typed_data.Uint8List.fromList(result);
|
| }
|
| processOutgoingMessage(msg) {
|
| this[_ensureEncoder]();
|
| - let result = [];
|
| + let result = JSArrayOfint().of([]);
|
| let buffer = null;
|
| - let out = null;
|
| if (!typed_data.Uint8List.is(msg)) {
|
| for (let i = 0; i < dart.notNull(msg[dartx.length]); i++) {
|
| if (dart.notNull(msg[dartx._get](i)) < 0 || 255 < dart.notNull(msg[dartx._get](i))) {
|
| @@ -51744,8 +52431,9 @@ io._WebSocketPerMessageDeflate = class _WebSocketPerMessageDeflate extends core.
|
| buffer = typed_data.Uint8List._check(msg);
|
| }
|
| this.encoder.process(buffer, 0, buffer[dartx.length]);
|
| + let out = null;
|
| while ((out = this.encoder.processed()) != null) {
|
| - result[dartx.addAll](core.Iterable._check(out));
|
| + result[dartx.addAll](out);
|
| }
|
| if (!dart.test(this.serverSide) && dart.test(this.clientNoContextTakeover) || dart.test(this.serverSide) && dart.test(this.serverNoContextTakeover)) {
|
| this.encoder = null;
|
| @@ -51753,7 +52441,7 @@ io._WebSocketPerMessageDeflate = class _WebSocketPerMessageDeflate extends core.
|
| if (dart.notNull(result[dartx.length]) > 4) {
|
| result = result[dartx.sublist](0, dart.notNull(result[dartx.length]) - 4);
|
| }
|
| - return ListOfint()._check(result);
|
| + return result;
|
| }
|
| };
|
| dart.setSignature(io._WebSocketPerMessageDeflate, {
|
| @@ -51808,13 +52496,14 @@ io._WebSocketOutgoingTransformer = class _WebSocketOutgoingTransformer extends c
|
| if (typeof message == 'string') {
|
| opcode = io._WebSocketOpcode.TEXT;
|
| data = convert.UTF8.encode(message);
|
| + } else if (ListOfint().is(message)) {
|
| + opcode = io._WebSocketOpcode.BINARY;
|
| + data = message;
|
| + } else if (io._EncodedString.is(message)) {
|
| + opcode = io._WebSocketOpcode.TEXT;
|
| + data = message.bytes;
|
| } else {
|
| - if (ListOfint().is(message)) {
|
| - data = message;
|
| - opcode = io._WebSocketOpcode.BINARY;
|
| - } else {
|
| - dart.throw(new core.ArgumentError(message));
|
| - }
|
| + dart.throw(new core.ArgumentError(message));
|
| }
|
| if (this[_deflateHelper] != null) {
|
| data = this[_deflateHelper].processOutgoingMessage(data);
|
| @@ -51844,7 +52533,7 @@ io._WebSocketOutgoingTransformer = class _WebSocketOutgoingTransformer extends c
|
| this[_eventSink].close();
|
| }
|
| addFrame(opcode, data) {
|
| - return io._WebSocketOutgoingTransformer.createFrame(opcode, data, this.webSocket[_serverSide], this[_deflateHelper] != null && (opcode == io._WebSocketOpcode.TEXT || opcode == io._WebSocketOpcode.BINARY))[dartx.forEach](dart.fn(e => {
|
| + io._WebSocketOutgoingTransformer.createFrame(opcode, data, this.webSocket[_serverSide], this[_deflateHelper] != null && (opcode == io._WebSocketOpcode.TEXT || opcode == io._WebSocketOpcode.BINARY))[dartx.forEach](dart.fn(e => {
|
| this[_eventSink].add(e);
|
| }, ListOfintToNull()));
|
| }
|
| @@ -52037,7 +52726,7 @@ io._WebSocketConsumer = class _WebSocketConsumer extends core.Object {
|
| this[_ensureController]();
|
| const closeSocket = (function() {
|
| return this.socket.close().catchError(dart.fn(_ => {
|
| - }, dynamicToNull())).then(io._WebSocketImpl)(dart.fn(_ => this.webSocket, dynamicTo_WebSocketImpl()));
|
| + }, dynamicToNull())).then(io._WebSocketImpl)(dart.fn(_ => this.webSocket, SocketTo_WebSocketImpl()));
|
| }).bind(this);
|
| dart.fn(closeSocket, VoidToFuture());
|
| this[_controller].close();
|
| @@ -52285,6 +52974,12 @@ io._WebSocketImpl = class _WebSocketImpl extends dart.mixin(async.Stream, io._Se
|
| add(data) {
|
| this[_sink].add(data);
|
| }
|
| + addUtf8Text(bytes) {
|
| + if (!ListOfint().is(bytes)) {
|
| + dart.throw(new core.ArgumentError.value(bytes, "bytes", "Is not a list of bytes"));
|
| + }
|
| + this[_sink].add(new io._EncodedString(bytes));
|
| + }
|
| addError(error, stackTrace) {
|
| if (stackTrace === void 0) stackTrace = null;
|
| this[_sink].addError(error, stackTrace);
|
| @@ -52395,6 +53090,7 @@ dart.setSignature(io._WebSocketImpl, {
|
| methods: () => ({
|
| listen: dart.definiteFunctionType(async.StreamSubscription, [dynamicTovoid()], {onError: core.Function, onDone: VoidTovoid(), cancelOnError: core.bool}),
|
| add: dart.definiteFunctionType(dart.void, [dart.dynamic]),
|
| + addUtf8Text: dart.definiteFunctionType(dart.void, [ListOfint()]),
|
| addError: dart.definiteFunctionType(dart.void, [dart.dynamic], [core.StackTrace]),
|
| addStream: dart.definiteFunctionType(async.Future, [async.Stream]),
|
| close: dart.definiteFunctionType(async.Future, [], [core.int, core.String]),
|
| @@ -52450,10 +53146,46 @@ isolate.Isolate = class Isolate extends core.Object {
|
| static get current() {
|
| return isolate.Isolate._currentIsolateCache;
|
| }
|
| + static get packageRoot() {
|
| + dart.throw(new core.UnsupportedError("Isolate.packageRoot"));
|
| + }
|
| + static get packageConfig() {
|
| + dart.throw(new core.UnsupportedError("Isolate.packageConfig"));
|
| + }
|
| + static resolvePackageUri(packageUri) {
|
| + return dart.async(function*(packageUri) {
|
| + if (packageUri.scheme != 'package') return packageUri;
|
| + return isolate.Isolate._packageBase.resolveUri(packageUri.replace({scheme: ''}));
|
| + }, core.Uri, packageUri);
|
| + }
|
| static spawn(entryPoint, message, opts) {
|
| let paused = opts && 'paused' in opts ? opts.paused : false;
|
| + let errorsAreFatal = opts && 'errorsAreFatal' in opts ? opts.errorsAreFatal : null;
|
| + let onExit = opts && 'onExit' in opts ? opts.onExit : null;
|
| + let onError = opts && 'onError' in opts ? opts.onError : null;
|
| + let forcePause = errorsAreFatal != null || onExit != null || onError != null;
|
| try {
|
| - return _isolate_helper.IsolateNatives.spawnFunction(entryPoint, message, paused).then(isolate.Isolate)(dart.fn(msg => new isolate.Isolate(isolate.SendPort._check(msg[dartx._get](1)), {pauseCapability: isolate.Capability._check(msg[dartx._get](2)), terminateCapability: isolate.Capability._check(msg[dartx._get](3))}), ListToIsolate()));
|
| + if (!isolate._UnaryFunction.is(entryPoint)) {
|
| + dart.throw(new core.ArgumentError(entryPoint));
|
| + }
|
| + return _isolate_helper.IsolateNatives.spawnFunction(entryPoint, message, dart.test(paused) || forcePause).then(isolate.Isolate)(dart.fn(msg => {
|
| + let isolate = new isolate.Isolate(isolate.SendPort._check(msg[dartx._get](1)), {pauseCapability: isolate.Capability._check(msg[dartx._get](2)), terminateCapability: isolate.Capability._check(msg[dartx._get](3))});
|
| + if (forcePause) {
|
| + if (errorsAreFatal != null) {
|
| + isolate.setErrorsFatal(errorsAreFatal);
|
| + }
|
| + if (onExit != null) {
|
| + isolate.addOnExitListener(onExit);
|
| + }
|
| + if (onError != null) {
|
| + isolate.addErrorListener(onError);
|
| + }
|
| + if (!dart.test(paused)) {
|
| + isolate.resume(isolate.pauseCapability);
|
| + }
|
| + }
|
| + return isolate;
|
| + }, ListToIsolate()));
|
| } catch (e) {
|
| let st = dart.stackTrace(e);
|
| return FutureOfIsolate().error(e, st);
|
| @@ -52462,10 +53194,20 @@ isolate.Isolate = class Isolate extends core.Object {
|
| }
|
| static spawnUri(uri, args, message, opts) {
|
| let paused = opts && 'paused' in opts ? opts.paused : false;
|
| + let onExit = opts && 'onExit' in opts ? opts.onExit : null;
|
| + let onError = opts && 'onError' in opts ? opts.onError : null;
|
| + let errorsAreFatal = opts && 'errorsAreFatal' in opts ? opts.errorsAreFatal : null;
|
| + let checked = opts && 'checked' in opts ? opts.checked : null;
|
| + let environment = opts && 'environment' in opts ? opts.environment : null;
|
| let packageRoot = opts && 'packageRoot' in opts ? opts.packageRoot : null;
|
| + let packageConfig = opts && 'packageConfig' in opts ? opts.packageConfig : null;
|
| + let automaticPackageResolution = opts && 'automaticPackageResolution' in opts ? opts.automaticPackageResolution : false;
|
| + if (environment != null) dart.throw(new core.UnimplementedError("environment"));
|
| if (packageRoot != null) dart.throw(new core.UnimplementedError("packageRoot"));
|
| + if (packageConfig != null) dart.throw(new core.UnimplementedError("packageConfig"));
|
| + let forcePause = errorsAreFatal != null || onExit != null || onError != null;
|
| try {
|
| - if (core.List.is(args)) {
|
| + if (ListOfString().is(args)) {
|
| for (let i = 0; i < dart.notNull(args[dartx.length]); i++) {
|
| if (!(typeof args[dartx._get](i) == 'string')) {
|
| dart.throw(new core.ArgumentError(dart.str`Args must be a list of Strings ${args}`));
|
| @@ -52474,7 +53216,24 @@ isolate.Isolate = class Isolate extends core.Object {
|
| } else if (args != null) {
|
| dart.throw(new core.ArgumentError(dart.str`Args must be a list of Strings ${args}`));
|
| }
|
| - return _isolate_helper.IsolateNatives.spawnUri(uri, args, message, paused).then(isolate.Isolate)(dart.fn(msg => new isolate.Isolate(isolate.SendPort._check(msg[dartx._get](1)), {pauseCapability: isolate.Capability._check(msg[dartx._get](2)), terminateCapability: isolate.Capability._check(msg[dartx._get](3))}), ListToIsolate()));
|
| + return _isolate_helper.IsolateNatives.spawnUri(uri, args, message, dart.test(paused) || forcePause).then(isolate.Isolate)(dart.fn(msg => {
|
| + let isolate = new isolate.Isolate(isolate.SendPort._check(msg[dartx._get](1)), {pauseCapability: isolate.Capability._check(msg[dartx._get](2)), terminateCapability: isolate.Capability._check(msg[dartx._get](3))});
|
| + if (forcePause) {
|
| + if (errorsAreFatal != null) {
|
| + isolate.setErrorsFatal(errorsAreFatal);
|
| + }
|
| + if (onExit != null) {
|
| + isolate.addOnExitListener(onExit);
|
| + }
|
| + if (onError != null) {
|
| + isolate.addErrorListener(onError);
|
| + }
|
| + if (!dart.test(paused)) {
|
| + isolate.resume(isolate.pauseCapability);
|
| + }
|
| + }
|
| + return isolate;
|
| + }, ListToIsolate()));
|
| } catch (e) {
|
| let st = dart.stackTrace(e);
|
| return FutureOfIsolate().error(e, st);
|
| @@ -52483,7 +53242,8 @@ isolate.Isolate = class Isolate extends core.Object {
|
| }
|
| pause(resumeCapability) {
|
| if (resumeCapability === void 0) resumeCapability = null;
|
| - if (resumeCapability == null) resumeCapability = isolate.Capability.new();
|
| + let t = resumeCapability;
|
| + t == null ? resumeCapability = isolate.Capability.new() : t;
|
| this[_pause](resumeCapability);
|
| return resumeCapability;
|
| }
|
| @@ -52500,10 +53260,12 @@ isolate.Isolate = class Isolate extends core.Object {
|
| message[dartx._set](1, resumeCapability);
|
| this.controlPort.send(message);
|
| }
|
| - addOnExitListener(responsePort) {
|
| - let message = core.List.new(2);
|
| + addOnExitListener(responsePort, opts) {
|
| + let response = opts && 'response' in opts ? opts.response : null;
|
| + let message = core.List.new(3);
|
| message[dartx._set](0, "add-ondone");
|
| message[dartx._set](1, responsePort);
|
| + message[dartx._set](2, response);
|
| this.controlPort.send(message);
|
| }
|
| removeOnExitListener(responsePort) {
|
| @@ -52519,16 +53281,18 @@ isolate.Isolate = class Isolate extends core.Object {
|
| message[dartx._set](2, errorsAreFatal);
|
| this.controlPort.send(message);
|
| }
|
| - kill(priority) {
|
| - if (priority === void 0) priority = isolate.Isolate.BEFORE_NEXT_EVENT;
|
| + kill(opts) {
|
| + let priority = opts && 'priority' in opts ? opts.priority : isolate.Isolate.BEFORE_NEXT_EVENT;
|
| this.controlPort.send(JSArrayOfObject().of(["kill", this.terminateCapability, priority]));
|
| }
|
| - ping(responsePort, pingType) {
|
| - if (pingType === void 0) pingType = isolate.Isolate.IMMEDIATE;
|
| - let message = core.List.new(3);
|
| + ping(responsePort, opts) {
|
| + let response = opts && 'response' in opts ? opts.response : null;
|
| + let priority = opts && 'priority' in opts ? opts.priority : isolate.Isolate.IMMEDIATE;
|
| + let message = core.List.new(4);
|
| message[dartx._set](0, "ping");
|
| message[dartx._set](1, responsePort);
|
| - message[dartx._set](2, pingType);
|
| + message[dartx._set](2, priority);
|
| + message[dartx._set](3, response);
|
| this.controlPort.send(message);
|
| }
|
| addErrorListener(port) {
|
| @@ -52576,34 +53340,42 @@ dart.setSignature(isolate.Isolate, {
|
| pause: dart.definiteFunctionType(isolate.Capability, [], [isolate.Capability]),
|
| [_pause]: dart.definiteFunctionType(dart.void, [isolate.Capability]),
|
| resume: dart.definiteFunctionType(dart.void, [isolate.Capability]),
|
| - addOnExitListener: dart.definiteFunctionType(dart.void, [isolate.SendPort]),
|
| + addOnExitListener: dart.definiteFunctionType(dart.void, [isolate.SendPort], {response: core.Object}),
|
| removeOnExitListener: dart.definiteFunctionType(dart.void, [isolate.SendPort]),
|
| setErrorsFatal: dart.definiteFunctionType(dart.void, [core.bool]),
|
| - kill: dart.definiteFunctionType(dart.void, [], [core.int]),
|
| - ping: dart.definiteFunctionType(dart.void, [isolate.SendPort], [core.int]),
|
| + kill: dart.definiteFunctionType(dart.void, [], {priority: core.int}),
|
| + ping: dart.definiteFunctionType(dart.void, [isolate.SendPort], {response: core.Object, priority: core.int}),
|
| addErrorListener: dart.definiteFunctionType(dart.void, [isolate.SendPort]),
|
| removeErrorListener: dart.definiteFunctionType(dart.void, [isolate.SendPort])
|
| }),
|
| sfields: () => ({
|
| IMMEDIATE: core.int,
|
| BEFORE_NEXT_EVENT: core.int,
|
| - AS_EVENT: core.int,
|
| - _currentIsolateCache: isolate.Isolate
|
| + _currentIsolateCache: isolate.Isolate,
|
| + _packageBase: core.Uri
|
| + }),
|
| + sgetters: () => ({
|
| + current: dart.definiteFunctionType(isolate.Isolate, []),
|
| + packageRoot: dart.definiteFunctionType(async.Future$(core.Uri), []),
|
| + packageConfig: dart.definiteFunctionType(async.Future$(core.Uri), [])
|
| }),
|
| - sgetters: () => ({current: dart.definiteFunctionType(isolate.Isolate, [])}),
|
| statics: () => ({
|
| - spawn: dart.definiteFunctionType(async.Future$(isolate.Isolate), [dynamicTovoid(), dart.dynamic], {paused: core.bool}),
|
| - spawnUri: dart.definiteFunctionType(async.Future$(isolate.Isolate), [core.Uri, ListOfString(), dart.dynamic], {paused: core.bool, packageRoot: core.Uri})
|
| + resolvePackageUri: dart.definiteFunctionType(async.Future$(core.Uri), [core.Uri]),
|
| + spawn: dart.definiteFunctionType(async.Future$(isolate.Isolate), [dynamicTovoid(), dart.dynamic], {paused: core.bool, errorsAreFatal: core.bool, onExit: isolate.SendPort, onError: isolate.SendPort}),
|
| + spawnUri: dart.definiteFunctionType(async.Future$(isolate.Isolate), [core.Uri, ListOfString(), dart.dynamic], {paused: core.bool, onExit: isolate.SendPort, onError: isolate.SendPort, errorsAreFatal: core.bool, checked: core.bool, environment: MapOfString$String(), packageRoot: core.Uri, packageConfig: core.Uri, automaticPackageResolution: core.bool})
|
| }),
|
| - names: ['spawn', 'spawnUri']
|
| + names: ['resolvePackageUri', 'spawn', 'spawnUri']
|
| });
|
| isolate.Isolate.IMMEDIATE = 0;
|
| isolate.Isolate.BEFORE_NEXT_EVENT = 1;
|
| -isolate.Isolate.AS_EVENT = 2;
|
| dart.defineLazy(isolate.Isolate, {
|
| get _currentIsolateCache() {
|
| return _isolate_helper.IsolateNatives.currentIsolate;
|
| - }
|
| + },
|
| + get _packageBase() {
|
| + return core.Uri.base.resolve(core.String._check(dart.dload(_isolate_helper.IsolateNatives, 'packagesBase')));
|
| + },
|
| + set _packageBase(_) {}
|
| });
|
| isolate.SendPort = class SendPort extends core.Object {};
|
| isolate.SendPort[dart.implements] = () => [isolate.Capability];
|
| @@ -52631,30 +53403,11 @@ isolate.RawReceivePort = class RawReceivePort extends core.Object {
|
| dart.setSignature(isolate.RawReceivePort, {
|
| constructors: () => ({new: dart.definiteFunctionType(isolate.RawReceivePort, [], [dynamicTovoid()])})
|
| });
|
| -isolate._IsolateUnhandledException = class _IsolateUnhandledException extends core.Object {
|
| - new(message, source, stackTrace) {
|
| - this.message = message;
|
| - this.source = source;
|
| - this.stackTrace = stackTrace;
|
| - }
|
| - toString() {
|
| - return 'IsolateUnhandledException: exception while handling message: ' + dart.str`${this.message} \n ` + dart.str`${dart.toString(this.source)[dartx.replaceAll]("\n", "\n ")}\n` + 'original stack trace:\n ' + dart.str`${dart.toString(this.stackTrace)[dartx.replaceAll]("\n", "\n ")}`;
|
| - }
|
| -};
|
| -isolate._IsolateUnhandledException[dart.implements] = () => [core.Exception];
|
| -dart.setSignature(isolate._IsolateUnhandledException, {
|
| - constructors: () => ({new: dart.definiteFunctionType(isolate._IsolateUnhandledException, [dart.dynamic, dart.dynamic, core.StackTrace])}),
|
| - fields: () => ({
|
| - message: dart.dynamic,
|
| - source: dart.dynamic,
|
| - stackTrace: core.StackTrace
|
| - })
|
| -});
|
| const _description = Symbol('_description');
|
| isolate.RemoteError = class RemoteError extends core.Object {
|
| new(description, stackDescription) {
|
| this[_description] = description;
|
| - this.stackTrace = new isolate._RemoteStackTrace(stackDescription);
|
| + this.stackTrace = core.StackTrace.fromString(stackDescription);
|
| }
|
| toString() {
|
| return this[_description];
|
| @@ -52668,20 +53421,7 @@ dart.setSignature(isolate.RemoteError, {
|
| stackTrace: core.StackTrace
|
| })
|
| });
|
| -const _trace = Symbol('_trace');
|
| -isolate._RemoteStackTrace = class _RemoteStackTrace extends core.Object {
|
| - new(trace) {
|
| - this[_trace] = trace;
|
| - }
|
| - toString() {
|
| - return this[_trace];
|
| - }
|
| -};
|
| -isolate._RemoteStackTrace[dart.implements] = () => [core.StackTrace];
|
| -dart.setSignature(isolate._RemoteStackTrace, {
|
| - constructors: () => ({new: dart.definiteFunctionType(isolate._RemoteStackTrace, [core.String])}),
|
| - fields: () => ({[_trace]: core.String})
|
| -});
|
| +isolate._UnaryFunction = dart.typedef('_UnaryFunction', () => dart.functionType(dart.dynamic, [dart.dynamic]));
|
| isolate.Capability = class Capability extends core.Object {
|
| static new() {
|
| return new _isolate_helper.CapabilityImpl();
|
| @@ -53218,13 +53958,40 @@ math.SQRT1_2 = 0.7071067811865476;
|
| math.SQRT2 = 1.4142135623730951;
|
| math.min = function(T) {
|
| return (a, b) => {
|
| - return Math.min(_js_helper.checkNum(a), _js_helper.checkNum(b));
|
| + if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a));
|
| + if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b));
|
| + if (dart.notNull(a) > dart.notNull(b)) return b;
|
| + if (dart.notNull(a) < dart.notNull(b)) return a;
|
| + if (typeof b == 'number') {
|
| + if (typeof a == 'number') {
|
| + if (a == 0.0) {
|
| + return (dart.notNull(a) + dart.notNull(b)) * dart.notNull(a) * dart.notNull(b);
|
| + }
|
| + }
|
| + if (a == 0 && dart.test(b[dartx.isNegative]) || dart.test(b[dartx.isNaN])) return b;
|
| + return a;
|
| + }
|
| + return a;
|
| };
|
| };
|
| dart.fn(math.min, TAndTToT());
|
| math.max = function(T) {
|
| return (a, b) => {
|
| - return Math.max(_js_helper.checkNum(a), _js_helper.checkNum(b));
|
| + if (!(typeof a == 'number')) dart.throw(new core.ArgumentError(a));
|
| + if (!(typeof b == 'number')) dart.throw(new core.ArgumentError(b));
|
| + if (dart.notNull(a) > dart.notNull(b)) return a;
|
| + if (dart.notNull(a) < dart.notNull(b)) return b;
|
| + if (typeof b == 'number') {
|
| + if (typeof a == 'number') {
|
| + if (a == 0.0) {
|
| + return dart.notNull(a) + dart.notNull(b);
|
| + }
|
| + }
|
| + if (dart.test(b[dartx.isNaN])) return b;
|
| + return a;
|
| + }
|
| + if (b == 0 && dart.test(a[dartx.isNegative])) return b;
|
| + return a;
|
| };
|
| };
|
| dart.fn(math.max, TAndTToT());
|
| @@ -53641,8 +54408,7 @@ math._RectangleBase$ = dart.generic(T => {
|
| }
|
| ['=='](other) {
|
| if (!RectangleOfnum().is(other)) return false;
|
| - let otherRect = RectangleOfnum().as(other);
|
| - return this[dartx.left] == otherRect[dartx.left] && this[dartx.top] == otherRect[dartx.top] && this[dartx.right] == otherRect[dartx.right] && this[dartx.bottom] == otherRect[dartx.bottom];
|
| + return dart.equals(this[dartx.left], dart.dload(other, 'left')) && dart.equals(this[dartx.top], dart.dload(other, 'top')) && dart.equals(this[dartx.right], dart.dload(other, 'right')) && dart.equals(this[dartx.bottom], dart.dload(other, 'bottom'));
|
| }
|
| get hashCode() {
|
| return math._JenkinsSmiHash.hash4(dart.hashCode(this[dartx.left]), dart.hashCode(this[dartx.top]), dart.hashCode(this[dartx.right]), dart.hashCode(this[dartx.bottom]));
|
|
|