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

Unified Diff: mojo/public/dart/mojo/sdk_ext/src/natives.dart

Issue 1378163004: Dart: Performance improvements to Dart's handle watcher. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Format Created 5 years, 2 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:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/dart/mojo/sdk_ext/src/natives.dart
diff --git a/mojo/public/dart/mojo/sdk_ext/src/natives.dart b/mojo/public/dart/mojo/sdk_ext/src/natives.dart
index 350b0a60ce0bdc0299bfcb36d1f0f60f75f988af..236069efdcbf3c431f211cf9714c88aab69983a3 100644
--- a/mojo/public/dart/mojo/sdk_ext/src/natives.dart
+++ b/mojo/public/dart/mojo/sdk_ext/src/natives.dart
@@ -9,66 +9,74 @@ class MojoCoreNatives {
}
class MojoHandleNatives {
- static int register(
- Object eventStream, int handle) native "MojoHandle_Register";
+ static int register(Object eventStream, int handle)
+ native "MojoHandle_Register";
static int close(int handle) native "MojoHandle_Close";
- static List wait(
- int handle, int signals, int deadline) native "MojoHandle_Wait";
- static List waitMany(List<int> handles, List<int> signals,
- int deadline) native "MojoHandle_WaitMany";
+ static List wait(int handle, int signals, int deadline)
+ native "MojoHandle_Wait";
+ static List waitMany(List<int> handles, List<int> signals, int deadline)
+ native "MojoHandle_WaitMany";
}
class MojoHandleWatcherNatives {
- static int sendControlData(int controlHandle, int mojoHandle, SendPort port,
- int data) native "MojoHandleWatcher_SendControlData";
- static List recvControlData(
- int controlHandle) native "MojoHandleWatcher_RecvControlData";
- static int setControlHandle(
- int controlHandle) native "MojoHandleWatcher_SetControlHandle";
+ static int sendControlData(
+ int controlHandle, int mojoHandle, SendPort port, int data)
+ native "MojoHandleWatcher_SendControlData";
+ static List recvControlData(int controlHandle)
+ native "MojoHandleWatcher_RecvControlData";
+ static int setControlHandle(int controlHandle)
+ native "MojoHandleWatcher_SetControlHandle";
static int getControlHandle() native "MojoHandleWatcher_GetControlHandle";
+ static List growStateArrays(int newLength)
+ native "MojoHandleWatcher_GrowStateArrays";
+ static int waitMany(int length, int deadline)
+ native "MojoHandleWatcher_WaitMany";
}
class MojoMessagePipeNatives {
static List MojoCreateMessagePipe(int flags) native "MojoMessagePipe_Create";
- static int MojoWriteMessage(int handle, ByteData data, int numBytes,
- List<int> handles, int flags) native "MojoMessagePipe_Write";
+ static int MojoWriteMessage(
+ int handle, ByteData data, int numBytes, List<int> handles, int flags)
+ native "MojoMessagePipe_Write";
- static List MojoReadMessage(int handle, ByteData data, int numBytes,
- List<int> handles, int flags) native "MojoMessagePipe_Read";
+ static List MojoReadMessage(
+ int handle, ByteData data, int numBytes, List<int> handles, int flags)
+ native "MojoMessagePipe_Read";
}
class MojoDataPipeNatives {
- static List MojoCreateDataPipe(int elementBytes, int capacityBytes,
- int flags) native "MojoDataPipe_Create";
+ static List MojoCreateDataPipe(int elementBytes, int capacityBytes, int flags)
+ native "MojoDataPipe_Create";
- static List MojoWriteData(int handle, ByteData data, int numBytes,
- int flags) native "MojoDataPipe_WriteData";
+ static List MojoWriteData(int handle, ByteData data, int numBytes, int flags)
+ native "MojoDataPipe_WriteData";
- static List MojoBeginWriteData(int handle, int bufferBytes,
- int flags) native "MojoDataPipe_BeginWriteData";
+ static List MojoBeginWriteData(int handle, int bufferBytes, int flags)
+ native "MojoDataPipe_BeginWriteData";
- static int MojoEndWriteData(
- int handle, int bytesWritten) native "MojoDataPipe_EndWriteData";
+ static int MojoEndWriteData(int handle, int bytesWritten)
+ native "MojoDataPipe_EndWriteData";
- static List MojoReadData(int handle, ByteData data, int numBytes,
- int flags) native "MojoDataPipe_ReadData";
+ static List MojoReadData(int handle, ByteData data, int numBytes, int flags)
+ native "MojoDataPipe_ReadData";
- static List MojoBeginReadData(int handle, int bufferBytes,
- int flags) native "MojoDataPipe_BeginReadData";
+ static List MojoBeginReadData(int handle, int bufferBytes, int flags)
+ native "MojoDataPipe_BeginReadData";
- static int MojoEndReadData(
- int handle, int bytesRead) native "MojoDataPipe_EndReadData";
+ static int MojoEndReadData(int handle, int bytesRead)
+ native "MojoDataPipe_EndReadData";
}
class MojoSharedBufferNatives {
static List Create(int numBytes, int flags) native "MojoSharedBuffer_Create";
- static List Duplicate(
- int bufferHandle, int flags) native "MojoSharedBuffer_Duplicate";
+ static List Duplicate(int bufferHandle, int flags)
+ native "MojoSharedBuffer_Duplicate";
- static List Map(Object buffer, int bufferHandle, int offset, int numBytes,
- int flags) native "MojoSharedBuffer_Map";
+ static List Map(
+ Object buffer, int bufferHandle, int offset, int numBytes, int flags)
+ native "MojoSharedBuffer_Map";
static int Unmap(ByteData buffer) native "MojoSharedBuffer_Unmap";
}
« no previous file with comments | « mojo/public/dart/mojo/sdk_ext/src/handle_watcher.dart ('k') | mojo/public/dart/mojo/sdk_ext/src/wait_many_state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698