Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: pkg/dev_compiler/lib/js/common/dart_sdk.js

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 28008_futureort Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
index e3e5b33aa9823b526aeec448f479829712f6074b..cf09b7c64a4dd5acfe31b7e6a34a56abb394009b 100644
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
@@ -167,6 +167,8 @@
let _AsyncBroadcastStreamController = () => (_AsyncBroadcastStreamController = dart.constFn(async._AsyncBroadcastStreamController$()))();
let _AsBroadcastStreamController = () => (_AsBroadcastStreamController = dart.constFn(async._AsBroadcastStreamController$()))();
let _DoneSubscription = () => (_DoneSubscription = dart.constFn(async._DoneSubscription$()))();
+ let FutureOr = () => (FutureOr = dart.constFn(async.FutureOr$()))();
+ let dynamicToFutureOr = () => (dynamicToFutureOr = dart.constFn(dart.functionType(async.FutureOr, [dart.dynamic])))();
let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.functionType(dart.dynamic, [])))();
let Future = () => (Future = dart.constFn(async.Future$()))();
let Completer = () => (Completer = dart.constFn(async.Completer$()))();
@@ -387,14 +389,20 @@
let ListOfListOfint = () => (ListOfListOfint = dart.constFn(core.List$(ListOfint())))();
let FutureOfint = () => (FutureOfint = dart.constFn(async.Future$(core.int)))();
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 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 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 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)))();
@@ -403,6 +411,7 @@
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())))();
let _HttpOutboundMessage = () => (_HttpOutboundMessage = dart.constFn(io._HttpOutboundMessage$()))();
@@ -414,11 +423,13 @@
let FutureOfSecureSocket = () => (FutureOfSecureSocket = dart.constFn(async.Future$(io.SecureSocket)))();
let HashSetOf_HttpClientConnection = () => (HashSetOf_HttpClientConnection = dart.constFn(collection.HashSet$(io._HttpClientConnection)))();
let FutureOf_ConnectionInfo = () => (FutureOf_ConnectionInfo = dart.constFn(async.Future$(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)))();
let JSArrayOf_Credentials = () => (JSArrayOf_Credentials = dart.constFn(_interceptors.JSArray$(io._Credentials)))();
let JSArrayOf_ProxyCredentials = () => (JSArrayOf_ProxyCredentials = dart.constFn(_interceptors.JSArray$(io._ProxyCredentials)))();
let FutureOf_HttpClientRequest = () => (FutureOf_HttpClientRequest = dart.constFn(async.Future$(io._HttpClientRequest)))();
+ let FutureOrOf_HttpClientRequest = () => (FutureOrOf_HttpClientRequest = dart.constFn(async.FutureOr$(io._HttpClientRequest)))();
let X509CertificateAndStringAndintTobool = () => (X509CertificateAndStringAndintTobool = dart.constFn(dart.functionType(core.bool, [io.X509Certificate, core.String, core.int])))();
let FutureOfbool = () => (FutureOfbool = dart.constFn(async.Future$(core.bool)))();
let UriAndStringAndStringToFutureOfbool = () => (UriAndStringAndStringToFutureOfbool = dart.constFn(dart.functionType(FutureOfbool(), [core.Uri, core.String, core.String])))();
@@ -546,6 +557,7 @@
let EventStreamProviderOfMidiMessageEvent = () => (EventStreamProviderOfMidiMessageEvent = dart.constFn(html$.EventStreamProvider$(html$.MidiMessageEvent)))();
let ListOfMimeType = () => (ListOfMimeType = dart.constFn(core.List$(html$.MimeType)))();
let ListOfMutationRecord = () => (ListOfMutationRecord = dart.constFn(core.List$(html$.MutationRecord)))();
+ let _wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = () => (_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void = dart.constFn(html$._wrapZoneBinaryCallback$(ListOfMutationRecord(), html$.MutationObserver, dart.void)))();
let MapOfString$bool = () => (MapOfString$bool = dart.constFn(core.Map$(core.String, core.bool)))();
let CompleterOfMediaStream = () => (CompleterOfMediaStream = dart.constFn(async.Completer$(html$.MediaStream)))();
let NodeTobool = () => (NodeTobool = dart.constFn(dart.functionType(core.bool, [html$.Node])))();
@@ -669,8 +681,9 @@
let VoidTobool = () => (VoidTobool = dart.constFn(dart.definiteFunctionType(core.bool, [])))();
let VoidTo_IsolateContext = () => (VoidTo_IsolateContext = dart.constFn(dart.definiteFunctionType(_isolate_helper._IsolateContext, [])))();
let VoidTovoid$ = () => (VoidTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
- let ListTodynamic = () => (ListTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.List])))();
+ let ListToFutureOr = () => (ListToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [core.List])))();
let StringTodynamic = () => (StringTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String])))();
+ let dynamicToFutureOr$ = () => (dynamicToFutureOr$ = dart.constFn(dart.definiteFunctionType(async.FutureOr, [dart.dynamic])))();
let TimerTovoid$ = () => (TimerTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [async.Timer])))();
let dynamicToFuture = () => (dynamicToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [dart.dynamic])))();
let boolTodynamic = () => (boolTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.bool])))();
@@ -796,11 +809,15 @@
let ListAndintAndintTo_BufferAndStart = () => (ListAndintAndintTo_BufferAndStart = dart.constFn(dart.definiteFunctionType(io._BufferAndStart, [core.List, 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])))();
let dynamicTo_Directory = () => (dynamicTo_Directory = dart.constFn(dart.definiteFunctionType(io._Directory, [dart.dynamic])))();
let dynamicToDirectory = () => (dynamicToDirectory = dart.constFn(dart.definiteFunctionType(io.Directory, [dart.dynamic])))();
- let ListOfintTodynamic = () => (ListOfintTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [ListOfint()])))();
+ let dynamicToFutureOrOfString = () => (dynamicToFutureOrOfString = dart.constFn(dart.definiteFunctionType(FutureOrOfString(), [dart.dynamic])))();
+ let dynamicToFutureOrOfbool = () => (dynamicToFutureOrOfbool = dart.constFn(dart.definiteFunctionType(FutureOrOfbool(), [dart.dynamic])))();
+ let dynamicToFutureOrOfint = () => (dynamicToFutureOrOfint = dart.constFn(dart.definiteFunctionType(FutureOrOfint(), [dart.dynamic])))();
+ let ListOfintToFutureOr = () => (ListOfintToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [ListOfint()])))();
let RandomAccessFileTovoid = () => (RandomAccessFileTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.RandomAccessFile])))();
- let RandomAccessFileTodynamic = () => (RandomAccessFileTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RandomAccessFile])))();
+ let RandomAccessFileToFutureOr = () => (RandomAccessFileToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RandomAccessFile])))();
let ListOfintTovoid$ = () => (ListOfintTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint()])))();
let RandomAccessFileToFutureOfRandomAccessFile = () => (RandomAccessFileToFutureOfRandomAccessFile = dart.constFn(dart.definiteFunctionType(FutureOfRandomAccessFile(), [io.RandomAccessFile])))();
let dynamicTo_File = () => (dynamicTo_File = dart.constFn(dart.definiteFunctionType(io._File, [dart.dynamic])))();
@@ -814,6 +831,8 @@
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 dynamicToFileStat = () => (dynamicToFileStat = dart.constFn(dart.definiteFunctionType(io.FileStat, [dart.dynamic])))();
let StringAndListOfStringToListOfString = () => (StringAndListOfStringToListOfString = dart.constFn(dart.definiteFunctionType(ListOfString(), [core.String, ListOfString()])))();
let StringAndListOfStringTovoid$ = () => (StringAndListOfStringTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [core.String, ListOfString()])))();
@@ -826,22 +845,25 @@
let _AuthenticationSchemeTo_Credentials = () => (_AuthenticationSchemeTo_Credentials = dart.constFn(dart.definiteFunctionType(io._Credentials, [io._AuthenticationScheme])))();
let _CredentialsTovoid = () => (_CredentialsTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io._Credentials])))();
let _AuthenticationSchemeAndStringToFuture = () => (_AuthenticationSchemeAndStringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [io._AuthenticationScheme, core.String])))();
+ let dynamicToFutureOrOfHttpClientResponse = () => (dynamicToFutureOrOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOrOfHttpClientResponse(), [dart.dynamic])))();
let CookieTovoid = () => (CookieTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [io.Cookie])))();
+ 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 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__Todynamic$ = () => (dynamic__Todynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic], [core.StackTrace])))();
let _HttpIncomingTovoid$ = () => (_HttpIncomingTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [io._HttpIncoming])))();
- let _HttpIncomingTodynamic = () => (_HttpIncomingTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._HttpIncoming])))();
+ let _HttpIncomingToFutureOr = () => (_HttpIncomingToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._HttpIncoming])))();
let dynamicTo_DetachedSocket = () => (dynamicTo_DetachedSocket = dart.constFn(dart.definiteFunctionType(io._DetachedSocket, [dart.dynamic])))();
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])))();
let _HttpClientConnectionTo_ConnectionInfo = () => (_HttpClientConnectionTo_ConnectionInfo = dart.constFn(dart.definiteFunctionType(io._ConnectionInfo, [io._HttpClientConnection])))();
+ let dynamicToFutureOrOf_ConnectionInfo = () => (dynamicToFutureOrOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOrOf_ConnectionInfo(), [dart.dynamic])))();
let _ConnectionTargetTobool = () => (_ConnectionTargetTobool = dart.constFn(dart.definiteFunctionType(core.bool, [io._ConnectionTarget])))();
let _ConnectionInfoTo_HttpClientRequest = () => (_ConnectionInfoTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._ConnectionInfo])))();
- let _ConnectionInfoTodynamic = () => (_ConnectionInfoTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._ConnectionInfo])))();
+ let _ConnectionInfoToFutureOrOf_HttpClientRequest = () => (_ConnectionInfoToFutureOrOf_HttpClientRequest = dart.constFn(dart.definiteFunctionType(FutureOrOf_HttpClientRequest(), [io._ConnectionInfo])))();
let _HttpClientRequestTo_HttpClientRequest = () => (_HttpClientRequestTo_HttpClientRequest = dart.constFn(dart.definiteFunctionType(io._HttpClientRequest, [io._HttpClientRequest])))();
let VoidTo_ConnectionTarget = () => (VoidTo_ConnectionTarget = dart.constFn(dart.definiteFunctionType(io._ConnectionTarget, [])))();
let dynamicToFutureOf_ConnectionInfo = () => (dynamicToFutureOf_ConnectionInfo = dart.constFn(dart.definiteFunctionType(FutureOf_ConnectionInfo(), [dart.dynamic])))();
@@ -864,9 +886,9 @@
let RawSecureSocketToSecureSocket = () => (RawSecureSocketToSecureSocket = dart.constFn(dart.definiteFunctionType(io.SecureSocket, [io.RawSecureSocket])))();
let dynamicToFutureOfRawSecureSocket = () => (dynamicToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [dart.dynamic])))();
let RawServerSocketToRawSecureServerSocket = () => (RawServerSocketToRawSecureServerSocket = dart.constFn(dart.definiteFunctionType(io.RawSecureServerSocket, [io.RawServerSocket])))();
- let RawSecureSocketTodynamic = () => (RawSecureSocketTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io.RawSecureSocket])))();
+ let RawSecureSocketToFutureOr = () => (RawSecureSocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.RawSecureSocket])))();
let RawSocketToFutureOfRawSecureSocket = () => (RawSocketToFutureOfRawSecureSocket = dart.constFn(dart.definiteFunctionType(FutureOfRawSecureSocket(), [io.RawSocket])))();
- let _FilterStatusTodynamic = () => (_FilterStatusTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [io._FilterStatus])))();
+ let _FilterStatusToFutureOr = () => (_FilterStatusToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io._FilterStatus])))();
let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
let dynamicTo_FilterStatus = () => (dynamicTo_FilterStatus = dart.constFn(dart.definiteFunctionType(io._FilterStatus, [dart.dynamic])))();
let ListOfintAndStringTovoid = () => (ListOfintAndStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [ListOfint(), core.String])))();
@@ -878,6 +900,7 @@
let StringToFuture = () => (StringToFuture = dart.constFn(dart.definiteFunctionType(async.Future, [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 SocketToFutureOr = () => (SocketToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [io.Socket])))();
let HttpClientResponseToFutureOfWebSocket = () => (HttpClientResponseToFutureOfWebSocket = dart.constFn(dart.definiteFunctionType(FutureOfWebSocket(), [io.HttpClientResponse])))();
let HttpClientRequestToFutureOfHttpClientResponse = () => (HttpClientRequestToFutureOfHttpClientResponse = dart.constFn(dart.definiteFunctionType(FutureOfHttpClientResponse(), [io.HttpClientRequest])))();
let dynamicToMap = () => (dynamicToMap = dart.constFn(dart.definiteFunctionType(core.Map, [dart.dynamic])))();
@@ -900,7 +923,7 @@
let EventTovoid$ = () => (EventTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [html$.Event])))();
let RequestToFutureOfT = () => (RequestToFutureOfT = dart.constFn(dart.definiteFunctionType(T => [async.Future$(T), [indexed_db.Request]])))();
let dynamicToTo = () => (dynamicToTo = dart.constFn(dart.definiteFunctionType(To => [To, [dart.dynamic]])))();
- let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
+ let EventToFutureOr = () => (EventToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [html$.Event])))();
let NodeTobool$ = () => (NodeTobool$ = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Node])))();
let MapOfString$dynamicTobool = () => (MapOfString$dynamicTobool = dart.constFn(dart.definiteFunctionType(core.bool, [MapOfString$dynamic()])))();
let UriAndListOfStringAnddynamicToFutureOfIsolate = () => (UriAndListOfStringAnddynamicToFutureOfIsolate = dart.constFn(dart.definiteFunctionType(FutureOfIsolate(), [core.Uri, ListOfString(), dart.dynamic])))();
@@ -934,6 +957,7 @@
let SetOfStringTobool = () => (SetOfStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [SetOfString()])))();
let SetOfStringTovoid = () => (SetOfStringTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [SetOfString()])))();
let EventAndStringTobool = () => (EventAndStringTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.Event, core.String])))();
+ let EventTodynamic = () => (EventTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [html$.Event])))();
let KeyEventTobool = () => (KeyEventTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.KeyEvent])))();
let NodeValidatorTobool = () => (NodeValidatorTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.NodeValidator])))();
let NodeAndNodeToint = () => (NodeAndNodeToint = dart.constFn(dart.definiteFunctionType(core.int, [html$.Node, html$.Node])))();
@@ -1682,7 +1706,9 @@
}
}
if (ret2 === dart.void) return true;
- if (ret1 === dart.void) return ret2 === dart.dynamic;
+ if (ret1 === dart.void) {
+ return ret2 === dart.dynamic || ret2 === async.FutureOr;
+ }
if (!dart._isSubtype(ret1, ret2, isCovariant)) return null;
return true;
};
@@ -1706,6 +1732,9 @@
return type == dart.bottom;
};
dart._isTop = function(type) {
+ if (dart.getGenericClass(type) === dart.getGenericClass(async.FutureOr)) {
+ return dart._isTop(dart.getGenericArgs(type)[0]);
+ }
return type == core.Object || type == dart.dynamic;
};
dart._isSubtype = function(t1, t2, isCovariant) {
@@ -1757,6 +1786,15 @@
}
return true;
}
+ if (raw1 === dart.getGenericClass(async.FutureOr)) {
+ let t1TypeArg = dart.getGenericArgs(t1)[0];
+ let t1Future = dart.getGenericClass(async.Future)(t1TypeArg);
+ return dart.isSubtype(t1Future, t2) && dart.isSubtype(t1TypeArg, t2);
+ } else if (raw2 === dart.getGenericClass(async.FutureOr)) {
+ let t2TypeArg = dart.getGenericArgs(t2)[0];
+ let t2Future = dart.getGenericClass(async.Future)(t2TypeArg);
+ return dart.isSubtype(t1, t2Future) || dart.isSubtype(t1, t2TypeArg);
+ }
let indefinite = false;
function definitive(t1, t2) {
let result = dart.isClassSubType(t1, t2, isCovariant);
@@ -9767,7 +9805,7 @@
let replyPort = dart.dindex(msg, 'replyPort');
_isolate_helper.IsolateNatives.spawn(core.String._check(dart.dindex(msg, 'functionName')), core.String._check(dart.dindex(msg, 'uri')), ListOfString()._check(dart.dindex(msg, 'args')), dart.dindex(msg, 'msg'), false, core.bool._check(dart.dindex(msg, 'isSpawnUri')), core.bool._check(dart.dindex(msg, 'startPaused'))).then(dart.dynamic)(dart.fn(msg => {
dart.dsend(replyPort, 'send', msg);
- }, ListTodynamic()), {onError: dart.fn(errorMessage => {
+ }, ListToFutureOr()), {onError: dart.fn(errorMessage => {
dart.dsend(replyPort, 'send', JSArrayOfString().of([_isolate_helper._SPAWN_FAILED_SIGNAL, errorMessage]));
}, StringTodynamic())});
}
@@ -9826,7 +9864,7 @@
dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
completer.completeError(dart.dindex(msg, 1));
}
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOr$()));
let signalReply = port.sendPort;
if (dart.test(_isolate_helper._globalState.useWorkers) && !dart.test(isLight)) {
_isolate_helper.IsolateNatives._startWorker(functionName, uri, args, message, isSpawnUri, startPaused, signalReply, dart.fn(message => completer.completeError(message), StringTovoid$()));
@@ -10165,6 +10203,7 @@
let IterableOfT = () => (IterableOfT = dart.constFn(core.Iterable$(T)))();
let intToT = () => (intToT = dart.constFn(dart.functionType(T, [core.int])))();
let EventSinkOfTToEventSink = () => (EventSinkOfTToEventSink = dart.constFn(dart.functionType(async.EventSink, [EventSinkOfT()])))();
+ let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
let VoidTo_IterablePendingEventsOfT = () => (VoidTo_IterablePendingEventsOfT = dart.constFn(dart.definiteFunctionType(_IterablePendingEventsOfT(), [])))();
let TTovoid$ = () => (TTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [T])))();
@@ -10182,7 +10221,7 @@
future.then(dart.dynamic)(dart.fn(value => {
controller[_add$](value);
controller[_closeUnchecked]();
- }, TTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+ }, TToFutureOr()), {onError: dart.fn((error, stackTrace) => {
controller[_addError](error, core.StackTrace._check(stackTrace));
controller[_closeUnchecked]();
}, dynamicAnddynamicTodynamic$())});
@@ -10304,7 +10343,7 @@
if (async.Future.is(newValue)) {
subscription.pause();
- newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+ newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
} else {
controller.add(E.as(newValue));
}
@@ -17804,7 +17843,7 @@
}
onDone(handleDone) {
if (handleDone == null) handleDone = async._nullDoneHandler;
- this[_onDone] = this[_zone].registerCallback(dart.dynamic)(handleDone);
+ this[_onDone] = this[_zone].registerCallback(dart.void)(handleDone);
}
pause(resumeSignal) {
if (resumeSignal === void 0) resumeSignal = null;
@@ -17957,7 +17996,7 @@
dart.assert(!dart.test(this[_inCallback]));
let wasInputPaused = this[_isInputPaused];
this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
- this[_zone].runUnaryGuarded(dart.dynamic, T)(this[_onData], data);
+ this[_zone].runUnaryGuarded(dart.void, T)(this[_onData], data);
this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
this[_checkState](wasInputPaused);
}
@@ -17998,7 +18037,7 @@
const sendDone = (function() {
if (!dart.test(this[_waitsForCancel])) return;
this[_state] = (dart.notNull(this[_state]) | async._BufferingStreamSubscription._STATE_CANCELED | async._BufferingStreamSubscription._STATE_CLOSED | async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
- this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+ this[_zone].runGuarded(dart.void)(this[_onDone]);
this[_state] = (dart.notNull(this[_state]) & ~async._BufferingStreamSubscription._STATE_IN_CALLBACK) >>> 0;
}).bind(this);
dart.fn(sendDone, VoidTovoid$());
@@ -18710,7 +18749,7 @@
onDone(handleDone) {}
pause(resumeSignal) {
if (resumeSignal === void 0) resumeSignal = null;
- if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
+ if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
}
resume() {
@@ -18785,6 +18824,20 @@
constructors: () => ({new: dart.definiteFunctionType(async.DeferredLoadException, [core.String])}),
fields: () => ({[_s]: core.String})
});
+ async.FutureOr$ = dart.generic(T => {
+ class FutureOr extends core.Object {
+ _() {
+ dart.throw(new core.UnsupportedError("FutureOr can't be instantiated"));
+ }
+ }
+ dart.addTypeTests(FutureOr);
+ dart.defineNamedConstructor(FutureOr, '_');
+ dart.setSignature(FutureOr, {
+ constructors: () => ({_: dart.definiteFunctionType(async.FutureOr$(T), [])})
+ });
+ return FutureOr;
+ });
+ async.FutureOr = FutureOr();
const _completeWithValue = Symbol('_completeWithValue');
let const$8;
async.Future$ = dart.flattenFutures(dart.generic(T => {
@@ -18848,7 +18901,7 @@
let result = new (_FutureOfT())();
async.Timer.new(duration, dart.fn(() => {
try {
- result[_complete](computation == null ? null : computation());
+ result[_complete](dart.nullSafe(computation, _ => _()));
} catch (e) {
let s = dart.stackTrace(e);
async._completeWithErrorCallback(result, e, s);
@@ -18890,31 +18943,43 @@
}
}
dart.fn(handleError, dynamicAnddynamicTovoid$());
- for (let future of futures) {
- let pos = remaining++;
- future.then(dart.dynamic)(dart.fn(value => {
- remaining--;
- if (values != null) {
- values[dartx._set](pos, value);
- if (remaining == 0) {
- result[_completeWithValue](values);
- }
- } else {
- if (cleanUp != null && value != null) {
- async.Future.sync(dart.fn(() => {
- cleanUp(value);
- }, VoidTodynamic$()));
- }
- if (remaining == 0 && !dart.test(eagerError)) {
- result[_completeError](error, stackTrace);
+ try {
+ for (let future of futures) {
+ let pos = remaining;
+ future.then(dart.dynamic)(dart.fn(value => {
+ remaining--;
+ if (values != null) {
+ values[dartx._set](pos, value);
+ if (remaining == 0) {
+ result[_completeWithValue](values);
+ }
+ } else {
+ if (cleanUp != null && value != null) {
+ async.Future.sync(dart.fn(() => {
+ cleanUp(value);
+ }, VoidTodynamic$()));
+ }
+ if (remaining == 0 && !dart.test(eagerError)) {
+ result[_completeError](error, stackTrace);
+ }
}
- }
- }, dart.definiteFunctionType(dart.dynamic, [T])), {onError: handleError});
- }
- if (remaining == 0) {
- return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
+ }, dart.definiteFunctionType(async.FutureOr, [T])), {onError: handleError});
+ remaining++;
+ }
+ if (remaining == 0) {
+ return async.Future$(core.List$(T)).value(const$8 || (const$8 = dart.constList([], dart.dynamic)));
+ }
+ values = core.List$(T).new(remaining);
+ } catch (e) {
+ let st = dart.stackTrace(e);
+ if (remaining == 0 || dart.test(eagerError)) {
+ return async.Future$(core.List$(T)).error(e, st);
+ } else {
+ error = e;
+ stackTrace = st;
+ }
}
- values = core.List$(T).new(remaining);
+
return result;
};
}
@@ -18945,7 +19010,7 @@
let nextIteration = null;
nextIteration = async.Zone.current.bindUnaryCallback(dart.dynamic, core.bool)(dart.fn(keepGoing => {
if (dart.test(keepGoing)) {
- async.Future.sync(f).then(dart.dynamic)(dynamicTodynamic()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
+ async.Future.sync(f).then(dart.dynamic)(dynamicToFutureOr()._check(nextIteration), {onError: dart.bind(doneSignal, _completeError)});
} else {
doneSignal[_complete](null);
}
@@ -19286,6 +19351,7 @@
const _setChained = Symbol('_setChained');
const _thenNoZoneRegistration = Symbol('_thenNoZoneRegistration');
const _setPendingComplete = Symbol('_setPendingComplete');
+ const _clearPendingComplete = Symbol('_clearPendingComplete');
const _error = Symbol('_error');
const _chainSource = Symbol('_chainSource');
const _setValue = Symbol('_setValue');
@@ -19301,7 +19367,7 @@
let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
let FutureOfT = () => (FutureOfT = dart.constFn(async.Future$(T)))();
let TTodynamic = () => (TTodynamic = dart.constFn(dart.functionType(dart.dynamic, [T])))();
- let TTodynamic$ = () => (TTodynamic$ = dart.constFn(dart.definiteFunctionType(dart.dynamic, [T])))();
+ let TToFutureOr = () => (TToFutureOr = dart.constFn(dart.definiteFunctionType(async.FutureOr, [T])))();
class _Future extends core.Object {
new() {
this[_zone] = async.Zone.current;
@@ -19350,7 +19416,7 @@
let currentZone = async.Zone.current;
let registered = null;
if (!core.identical(currentZone, async._ROOT_ZONE)) {
- f = currentZone.registerUnaryCallback(dart.dynamic, T)(f);
+ f = currentZone.registerUnaryCallback(async.FutureOr$(E), T)(f);
if (onError != null) {
onError = async._registerErrorHandler(T)(onError, currentZone);
}
@@ -19390,6 +19456,10 @@
dart.assert(this[_mayComplete]);
this[_state] = async._Future._PENDING_COMPLETE;
}
+ [_clearPendingComplete]() {
+ dart.assert(this[_isPendingComplete]);
+ this[_state] = async._Future._INCOMPLETE;
+ }
get [_error]() {
dart.assert(this[_hasError]);
return async.AsyncError._check(this[_resultOrListeners]);
@@ -19490,8 +19560,9 @@
try {
source.then(dart.dynamic)(dart.fn(value => {
dart.assert(target[_isPendingComplete]);
- target[_completeWithValue](value);
- }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+ target[_clearPendingComplete]();
+ target[_complete](value);
+ }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
if (stackTrace === void 0) stackTrace = null;
dart.assert(target[_isPendingComplete]);
target[_completeError](error, core.StackTrace._check(stackTrace));
@@ -19741,7 +19812,7 @@
timer.cancel();
result[_completeWithValue](v);
}
- }, TTodynamic$()), {onError: dart.fn((e, s) => {
+ }, TToFutureOr()), {onError: dart.fn((e, s) => {
if (dart.test(timer.isActive)) {
timer.cancel();
result[_completeError](e, core.StackTrace._check(s));
@@ -19777,12 +19848,13 @@
}),
methods: () => ({
[_setChained]: dart.definiteFunctionType(dart.void, [async._Future]),
- then: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic()], {onError: core.Function}]),
+ then: dart.definiteFunctionType(E => [async.Future$(E), [dart.functionType(async.FutureOr$(E), [T])], {onError: core.Function}]),
[_thenNoZoneRegistration]: dart.definiteFunctionType(E => [async.Future$(E), [TTodynamic(), core.Function]]),
catchError: dart.definiteFunctionType(async.Future$(T), [core.Function], {test: dynamicTobool()}),
whenComplete: dart.definiteFunctionType(async.Future$(T), [VoidTodynamic()]),
asStream: dart.definiteFunctionType(async.Stream$(T), []),
[_setPendingComplete]: dart.definiteFunctionType(dart.void, []),
+ [_clearPendingComplete]: dart.definiteFunctionType(dart.void, []),
[_setValue]: dart.definiteFunctionType(dart.void, [T]),
[_setErrorObject]: dart.definiteFunctionType(dart.void, [async.AsyncError]),
[_setError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace]),
@@ -19903,10 +19975,10 @@
}
let implementation = currentZone[_scheduleMicrotask];
if (core.identical(async._ROOT_ZONE, implementation.zone) && dart.test(async._ROOT_ZONE.inSameErrorZone(currentZone))) {
- async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.dynamic)(callback));
+ async._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback(dart.void)(callback));
return;
}
- async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+ async.Zone.current.scheduleMicrotask(async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
};
dart.fn(async.scheduleMicrotask, _AsyncCallbackTovoid());
async._AsyncRun = class _AsyncRun extends core.Object {
@@ -21079,7 +21151,7 @@
this[_state] = (dart.notNull(this[_state]) & ~async._DoneStreamSubscription._SCHEDULED) >>> 0;
if (dart.test(this.isPaused)) return;
this[_state] = (dart.notNull(this[_state]) | async._DoneStreamSubscription._DONE_SENT) >>> 0;
- if (this[_onDone] != null) this[_zone].runGuarded(dart.dynamic)(this[_onDone]);
+ if (this[_onDone] != null) this[_zone].runGuarded(dart.void)(this[_onDone]);
}
}
dart.addTypeTests(_DoneStreamSubscription);
@@ -21164,7 +21236,7 @@
[_onCancel]() {
let shutdown = this[_controller$] == null || dart.test(this[_controller$].isClosed);
if (this[_onCancelHandler] != null) {
- this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+ this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onCancelHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
}
if (shutdown) {
if (this[_subscription] != null) {
@@ -21175,7 +21247,7 @@
}
[_onListen]() {
if (this[_onListenHandler] != null) {
- this[_zone].runUnary(dart.dynamic, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
+ this[_zone].runUnary(dart.void, _BroadcastSubscriptionWrapperOfT())(this[_onListenHandler], new (_BroadcastSubscriptionWrapperOfT())(this));
}
}
[_cancelSubscription]() {
@@ -22411,7 +22483,7 @@
if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
return async.Zone.current.createTimer(duration, callback);
}
- return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.dynamic)(callback, {runGuarded: true}));
+ return async.Zone.current.createTimer(duration, async.Zone.current.bindCallback(dart.void)(callback, {runGuarded: true}));
}
static periodic(duration, callback) {
if (dart.equals(async.Zone.current, async.Zone.ROOT)) {
@@ -23150,7 +23222,7 @@
dart.fn(async._rootScheduleMicrotask, ZoneAndZoneDelegateAndZone__Tovoid());
async._rootCreateTimer = function(self, parent, zone, duration, callback) {
if (!core.identical(async._ROOT_ZONE, zone)) {
- callback = zone.bindCallback(dart.dynamic)(callback);
+ callback = zone.bindCallback(dart.void)(callback);
}
return async.Timer._createTimer(duration, callback);
};
@@ -38497,8 +38569,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "Cannot resolve symbolic links", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfString()._check(response);
+ }, dynamicToFutureOrOfString()));
}
resolveSymbolicLinksSync() {
let result = io.FileSystemEntity._resolveSymbolicLinks(this.path);
@@ -38523,8 +38595,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, dart.str`Error in FileSystemEntity.identical(${path1}, ${path2})`, ""));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfbool()._check(response);
+ }, dynamicToFutureOrOfbool()));
}
get isAbsolute() {
if (dart.test(io.Platform.isWindows)) {
@@ -38619,8 +38691,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "Error getting type", path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(response);
+ }, dynamicToFutureOrOfint()));
}
static _throwIfError(result, msg, path) {
if (path === void 0) path = null;
@@ -38815,7 +38887,7 @@
} else {
return this.create();
}
- }, boolTodynamic()));
+ }, boolToFutureOrOfDirectory()));
} else {
return io._IOService._dispatch(io._DIRECTORY_CREATE, JSArrayOfString().of([this.path])).then(io._Directory)(dart.fn(response => {
if (dart.test(this[_isErrorResponse](response))) {
@@ -39036,7 +39108,7 @@
this.error(response);
this.close();
}
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOr$()));
}
onResume() {
if (!dart.test(this.nextRunning)) {
@@ -39101,7 +39173,7 @@
} else {
this.controller.addError(new io.FileSystemException("Internal error"));
}
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOr$()));
}
[_cleanup]() {
this.controller.close();
@@ -39411,7 +39483,7 @@
if (dart.test(this[_atEnd])) {
this[_closeFile]();
}
- }, ListOfintTodynamic())).catchError(dart.fn((e, s) => {
+ }, ListOfintToFutureOr())).catchError(dart.fn((e, s) => {
if (!dart.test(this[_unsubscribed])) {
this[_controller$0].addError(e, core.StackTrace._check(s));
this[_closeFile]();
@@ -39434,7 +39506,7 @@
dart.fn(onReady, RandomAccessFileTovoid());
const onOpenFile = (function(file) {
if (dart.notNull(this[_position$0]) > 0) {
- file.setPosition(this[_position$0]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
+ file.setPosition(this[_position$0]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
this[_controller$0].addError(e, core.StackTrace._check(s));
this[_readInProgress] = false;
this[_closeFile]();
@@ -39451,7 +39523,7 @@
}).bind(this);
dart.fn(openFailed, dynamicAnddynamicTovoid$());
if (this[_path$] != null) {
- io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
+ io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
} else {
try {
onOpenFile(io._File._openStdioSync(0));
@@ -39518,7 +39590,7 @@
_subscription = stream.listen(dart.fn(d => {
dart.dsend(_subscription, 'pause');
try {
- openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileTodynamic()), {onError: error});
+ openedFile.writeFrom(d, 0, d[dartx.length]).then(dart.dynamic)(dart.fn(_ => dart.dsend(_subscription, 'resume'), RandomAccessFileToFutureOr()), {onError: error});
} catch (e) {
let stackTrace = dart.stackTrace(e);
error(e, stackTrace);
@@ -39527,7 +39599,7 @@
}, ListOfintTovoid$()), {onDone: dart.fn(() => {
completer.complete(this[_file]);
}, VoidTovoid$()), onError: error, cancelOnError: true});
- }, RandomAccessFileTodynamic())).catchError(dart.bind(completer, 'completeError'));
+ }, RandomAccessFileToFutureOr())).catchError(dart.bind(completer, 'completeError'));
return completer.future;
}
close() {
@@ -39565,8 +39637,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "Cannot check existence", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfbool()._check(response);
+ }, dynamicToFutureOrOfbool()));
}
static _exists(path) {
dart.throw(new core.UnsupportedError("File._exists"));
@@ -39690,8 +39762,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "Cannot retrieve length of file", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(response);
+ }, dynamicToFutureOrOfint()));
}
static _lengthFromPath(path) {
dart.throw(new core.UnsupportedError("File._lengthFromPath"));
@@ -39829,7 +39901,7 @@
return this.open({mode: mode}).then(io.File)(dart.fn(file => file.writeFrom(bytes, 0, bytes[dartx.length]).then(dart.dynamic)(dart.fn(_ => {
if (dart.test(flush)) return file.flush().then(io._File)(dart.fn(_ => this, RandomAccessFileTo_File()));
return this;
- }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileTodynamic()));
+ }, RandomAccessFileToObject())).whenComplete(dart.bind(file, 'close')), RandomAccessFileToFutureOrOfFile()));
}
writeAsBytesSync(bytes, opts) {
let mode = opts && 'mode' in opts ? opts.mode : io.FileMode.WRITE;
@@ -39990,8 +40062,8 @@
dart.throw(io._exceptionFromResponse(response, "readByte failed", this.path));
}
this[_resourceInfo].addRead(1);
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(response);
+ }, dynamicToFutureOrOfint()));
}
readByteSync() {
this[_checkAvailable]();
@@ -40011,8 +40083,8 @@
dart.throw(io._exceptionFromResponse(response, "read failed", this.path));
}
this[_resourceInfo].addRead(core.int._check(dart.dload(dart.dindex(response, 1), 'length')));
- return dart.dindex(response, 1);
- }, dynamicTodynamic$()));
+ return FutureOrOfListOfint()._check(dart.dindex(response, 1));
+ }, dynamicToFutureOrOfListOfint()));
}
readSync(bytes) {
this[_checkAvailable]();
@@ -40045,8 +40117,8 @@
let data = dart.dindex(response, 2);
buffer[dartx.setRange](start, dart.asInt(dart.notNull(start) + dart.notNull(core.num._check(read))), IterableOfint()._check(data));
this[_resourceInfo].addRead(core.int._check(read));
- return read;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(read);
+ }, dynamicToFutureOrOfint()));
}
readIntoSync(buffer, start, end) {
if (start === void 0) start = 0;
@@ -40159,8 +40231,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "position failed", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(response);
+ }, dynamicToFutureOrOfint()));
}
positionSync() {
this[_checkAvailable]();
@@ -40205,8 +40277,8 @@
if (dart.test(io._isErrorResponse(response))) {
dart.throw(io._exceptionFromResponse(response, "length failed", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfint()._check(response);
+ }, dynamicToFutureOrOfint()));
}
lengthSync() {
this[_checkAvailable]();
@@ -42947,7 +43019,7 @@
} else {
return this;
}
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOrOfHttpClientResponse()));
}
};
io._HttpClientResponse[dart.implements] = () => [io.HttpClientResponse];
@@ -43060,7 +43132,7 @@
return this.done;
}
[_closeTarget]() {
- this[_target$].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+ this[_target$].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
}
get done() {
return this[_doneCompleter].future;
@@ -43094,7 +43166,7 @@
} else {
this[_closeTarget]();
}
- }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+ }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
if (dart.test(this[_isBound])) {
this[_controllerCompleter].completeError(error, core.StackTrace._check(stackTrace));
this[_controllerCompleter] = null;
@@ -43676,7 +43748,7 @@
}
get done() {
if (this[_response] == null) {
- this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => list[dartx._get](0), ListTodynamic()));
+ this[_response] = async.Future.wait(dart.dynamic)(JSArrayOfFuture().of([this[_responseCompleter].future, super.done]), {eagerError: true}).then(io.HttpClientResponse)(dart.fn(list => FutureOrOfHttpClientResponse()._check(list[dartx._get](0)), ListToFutureOrOfHttpClientResponse()));
}
return this[_response];
}
@@ -43717,7 +43789,7 @@
} else {
future = FutureOfHttpClientResponse().value(response);
}
- future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+ future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
}
[_onError$](error, stackTrace) {
this[_responseCompleter].completeError(error, stackTrace);
@@ -44243,7 +44315,7 @@
if (incoming.statusCode == 100) {
incoming.drain(dart.dynamic)().then(dart.dynamic)(dart.fn(_ => {
this[_subscription$].resume();
- }, dynamicTodynamic$())).catchError(dart.fn((error, stackTrace) => {
+ }, dynamicToFutureOr$())).catchError(dart.fn((error, stackTrace) => {
if (stackTrace === void 0) stackTrace = null;
this[_nextResponseCompleter].completeError(new io.HttpException(core.String._check(dart.dload(error, 'message')), {uri: this[_currentUri]}), stackTrace);
this[_nextResponseCompleter] = null;
@@ -44320,7 +44392,7 @@
} else {
this.destroy();
}
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOr$()));
if (proxyCreds != null && dart.equals(proxyCreds.scheme, io._AuthenticationScheme.DIGEST)) {
let authInfo = incoming.headers._get("proxy-authentication-info");
if (authInfo != null && authInfo[dartx.length] == 1) {
@@ -44338,7 +44410,7 @@
}
}
request[_onIncoming](incoming);
- }, _HttpIncomingTodynamic())).catchError(dart.fn(error => {
+ }, _HttpIncomingToFutureOr())).catchError(dart.fn(error => {
dart.throw(new io.HttpException("Connection closed before data was received", {uri: uri}));
}, dynamicTodynamic$()), {test: dart.fn(error => core.StateError.is(error), ObjectTobool())}).catchError(dart.fn((error, stackTrace) => {
this.destroy();
@@ -44362,7 +44434,7 @@
close() {
this.closed = true;
this[_httpClient][_connectionClosed](this);
- this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
+ this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
}
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));
@@ -44521,7 +44593,7 @@
if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
let completer = async.Completer.new();
this[_pending$].add(dart.fn(() => {
- this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+ this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
}, VoidTodynamic$()));
return FutureOf_ConnectionInfo()._check(completer.future);
}
@@ -44547,7 +44619,7 @@
this.addNewActive(connection);
return new io._ConnectionInfo(connection, proxy);
}
- }, dynamicTodynamic$()), {onError: dart.fn(error => {
+ }, dynamicToFutureOrOf_ConnectionInfo()), {onError: dart.fn(error => {
this[_connecting] = dart.notNull(this[_connecting]) - 1;
this[_checkPending]();
dart.throw(error);
@@ -44746,7 +44818,7 @@
return this[_getConnection](uri.host, port, proxyConf, isSecure).then(io._HttpClientRequest)(send);
}
return send(info);
- }, _ConnectionInfoTodynamic()));
+ }, _ConnectionInfoToFutureOrOf_HttpClientRequest()));
}
[_openUrlFromRequest](method, uri, previous) {
let resolved = previous.uri.resolveUri(uri);
@@ -45030,7 +45102,7 @@
this[_httpServer][_markActive](this);
incoming.dataDone.then(dart.dynamic)(dart.fn(closing => {
if (dart.test(closing)) this.destroy();
- }, dynamicTodynamic$()));
+ }, dynamicToFutureOr$()));
this[_subscription$].pause();
this[_state$1] = io._HttpConnection._ACTIVE;
let outgoing = new io._HttpOutgoing(io.Socket._check(this[_socket]));
@@ -45047,7 +45119,7 @@
} else {
this.destroy();
}
- }, dynamicTodynamic$()), {onError: dart.fn(_ => {
+ }, dynamicToFutureOr$()), {onError: dart.fn(_ => {
this.destroy();
}, dynamicTodynamic$())});
outgoing.ignoreBody = request.method == "HEAD";
@@ -47850,8 +47922,8 @@
if (dart.test(this[_isErrorResponse](response))) {
dart.throw(this[_exceptionFromResponse](response, "Cannot get target of link", this.path));
}
- return response;
- }, dynamicTodynamic$()));
+ return FutureOrOfString()._check(response);
+ }, dynamicToFutureOrOfString()));
}
targetSync() {
let result = io._File._linkTarget(this.path);
@@ -48764,7 +48836,7 @@
} else {
this[_controller$0].add(secureConnection);
}
- }, RawSecureSocketTodynamic())).catchError(dart.fn((e, s) => {
+ }, RawSecureSocketToFutureOr())).catchError(dart.fn((e, s) => {
if (!dart.test(this[_closed])) {
this[_controller$0].addError(e, core.StackTrace._check(s));
}
@@ -49063,7 +49135,7 @@
this[_closedWrite] = true;
this[_closedRead] = true;
if (this[_socket] != null) {
- this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
+ this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
} else {
this[_completeCloseCompleter]();
}
@@ -49348,7 +49420,7 @@
}
}
this[_tryFilter]();
- }, _FilterStatusTodynamic())).catchError(dart.bind(this, _reportError));
+ }, _FilterStatusToFutureOr())).catchError(dart.bind(this, _reportError));
}
}
[_readSocketOrBufferedData](bytes) {
@@ -51424,7 +51496,7 @@
}
bind(stream) {
stream.listen(dart.fn(request => {
- io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
+ io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
}, HttpRequestTovoid$()), {onDone: dart.fn(() => {
this[_controller$0].close();
}, VoidTovoid$())});
@@ -51837,7 +51909,7 @@
this.socket.addStream(stream).then(dart.dynamic)(dart.fn(_ => {
this[_done$]();
this[_closeCompleter].complete(this.webSocket);
- }, dynamicTodynamic$()), {onError: dart.fn((error, stackTrace) => {
+ }, dynamicToFutureOr$()), {onError: dart.fn((error, stackTrace) => {
this[_closed] = true;
this[_cancel$]();
if (core.ArgumentError.is(error)) {
@@ -51973,7 +52045,7 @@
function error(message) {
response.detachSocket().then(dart.dynamic)(dart.fn(socket => {
socket.destroy();
- }, SocketTodynamic()));
+ }, SocketToFutureOr()));
dart.throw(new io.WebSocketException(message));
}
dart.fn(error, StringTovoid$());
@@ -55374,15 +55446,15 @@
let completer = CompleterOfDatabase().new();
this[dartx.onComplete].first.then(dart.dynamic)(dart.fn(_ => {
completer.complete(this[dartx.db]);
- }, EventTodynamic()));
+ }, EventToFutureOr()));
this[dartx.onError].first.then(dart.dynamic)(dart.fn(e => {
completer.completeError(e);
- }, EventTodynamic()));
+ }, EventToFutureOr()));
this[dartx.onAbort].first.then(dart.dynamic)(dart.fn(e => {
if (!dart.test(completer.isCompleted)) {
completer.completeError(e);
}
- }, EventTodynamic()));
+ }, EventToFutureOr()));
return completer.future;
}
static _() {
@@ -81091,7 +81163,7 @@
}
static new(callback) {
0;
- return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(html$._wrapZoneBinaryCallback)(html$._wrapBinaryZone(dart.dynamic, dart.dynamic, dart.dynamic)(callback), 2));
+ return new (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver)(_js_helper.convertDartClosureToJS(_wrapZoneBinaryCallbackOfListOfMutationRecord$MutationObserver$void())(html$._wrapBinaryZone(ListOfMutationRecord(), html$.MutationObserver, dart.void)(callback), 2));
}
};
dart.setSignature(html$.MutationObserver, {
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698