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

Side by Side Diff: runtime/bin/io_natives.cc

Issue 24395013: Merge services into a shared IOService in dart:io, and use a native port. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Finish off native_service Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/io_impl_sources.gypi ('k') | runtime/bin/io_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/io_natives.h" 5 #include "bin/io_natives.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/builtin.h" 10 #include "bin/builtin.h"
(...skipping 10 matching lines...) Expand all
21 // builtin_natives.cc instead. 21 // builtin_natives.cc instead.
22 #define IO_NATIVE_LIST(V) \ 22 #define IO_NATIVE_LIST(V) \
23 V(Crypto_GetRandomBytes, 1) \ 23 V(Crypto_GetRandomBytes, 1) \
24 V(EventHandler_SendData, 3) \ 24 V(EventHandler_SendData, 3) \
25 V(Filter_CreateZLibDeflate, 3) \ 25 V(Filter_CreateZLibDeflate, 3) \
26 V(Filter_CreateZLibInflate, 1) \ 26 V(Filter_CreateZLibInflate, 1) \
27 V(Filter_End, 1) \ 27 V(Filter_End, 1) \
28 V(Filter_Process, 4) \ 28 V(Filter_Process, 4) \
29 V(Filter_Processed, 3) \ 29 V(Filter_Processed, 3) \
30 V(InternetAddress_Fixed, 1) \ 30 V(InternetAddress_Fixed, 1) \
31 V(IOService_NewServicePort, 0) \
31 V(Platform_NumberOfProcessors, 0) \ 32 V(Platform_NumberOfProcessors, 0) \
32 V(Platform_OperatingSystem, 0) \ 33 V(Platform_OperatingSystem, 0) \
33 V(Platform_PathSeparator, 0) \ 34 V(Platform_PathSeparator, 0) \
34 V(Platform_LocalHostname, 0) \ 35 V(Platform_LocalHostname, 0) \
35 V(Platform_ExecutableName, 0) \ 36 V(Platform_ExecutableName, 0) \
36 V(Platform_Environment, 0) \ 37 V(Platform_Environment, 0) \
37 V(Platform_ExecutableArguments, 0) \ 38 V(Platform_ExecutableArguments, 0) \
38 V(Platform_PackageRoot, 0) \ 39 V(Platform_PackageRoot, 0) \
39 V(Platform_GetVersion, 0) \ 40 V(Platform_GetVersion, 0) \
40 V(Process_Start, 10) \ 41 V(Process_Start, 10) \
41 V(Process_Wait, 5) \ 42 V(Process_Wait, 5) \
42 V(Process_Kill, 3) \ 43 V(Process_Kill, 3) \
43 V(Process_SetExitCode, 1) \ 44 V(Process_SetExitCode, 1) \
44 V(Process_Exit, 1) \ 45 V(Process_Exit, 1) \
45 V(Process_Sleep, 1) \ 46 V(Process_Sleep, 1) \
46 V(Process_Pid, 1) \ 47 V(Process_Pid, 1) \
47 V(SecureSocket_Connect, 9) \ 48 V(SecureSocket_Connect, 9) \
48 V(SecureSocket_Destroy, 1) \ 49 V(SecureSocket_Destroy, 1) \
49 V(SecureSocket_Handshake, 1) \ 50 V(SecureSocket_Handshake, 1) \
50 V(SecureSocket_Init, 1) \ 51 V(SecureSocket_Init, 1) \
51 V(SecureSocket_PeerCertificate, 1) \ 52 V(SecureSocket_PeerCertificate, 1) \
52 V(SecureSocket_RegisterBadCertificateCallback, 2) \ 53 V(SecureSocket_RegisterBadCertificateCallback, 2) \
53 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ 54 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \
54 V(SecureSocket_Renegotiate, 4) \ 55 V(SecureSocket_Renegotiate, 4) \
55 V(SecureSocket_InitializeLibrary, 3) \ 56 V(SecureSocket_InitializeLibrary, 3) \
56 V(SecureSocket_NewServicePort, 0) \
57 V(SecureSocket_FilterPointer, 1) \ 57 V(SecureSocket_FilterPointer, 1) \
58 V(ServerSocket_CreateBindListen, 5) \ 58 V(ServerSocket_CreateBindListen, 5) \
59 V(ServerSocket_Accept, 2) \ 59 V(ServerSocket_Accept, 2) \
60 V(Socket_CreateConnect, 3) \ 60 V(Socket_CreateConnect, 3) \
61 V(Socket_Available, 1) \ 61 V(Socket_Available, 1) \
62 V(Socket_Read, 2) \ 62 V(Socket_Read, 2) \
63 V(Socket_WriteList, 4) \ 63 V(Socket_WriteList, 4) \
64 V(Socket_GetPort, 1) \ 64 V(Socket_GetPort, 1) \
65 V(Socket_GetRemotePeer, 1) \ 65 V(Socket_GetRemotePeer, 1) \
66 V(Socket_GetError, 1) \ 66 V(Socket_GetError, 1) \
67 V(Socket_GetStdioHandle, 2) \ 67 V(Socket_GetStdioHandle, 2) \
68 V(Socket_NewServicePort, 0) \
69 V(Socket_GetType, 1) \ 68 V(Socket_GetType, 1) \
70 V(Socket_SetOption, 3) \ 69 V(Socket_SetOption, 3) \
71 V(Socket_SetSocketId, 2) \ 70 V(Socket_SetSocketId, 2) \
72 V(Stdin_ReadByte, 1) \ 71 V(Stdin_ReadByte, 1) \
73 V(Stdin_SetEchoMode, 2) \ 72 V(Stdin_SetEchoMode, 2) \
74 V(Stdin_SetLineMode, 2) \ 73 V(Stdin_SetLineMode, 2) \
75 V(StringToSystemEncoding, 1) \ 74 V(StringToSystemEncoding, 1) \
76 V(SystemEncodingToString, 1) 75 V(SystemEncodingToString, 1)
77 76
78 77
(...skipping 20 matching lines...) Expand all
99 if (!strcmp(function_name, entry->name_) && 98 if (!strcmp(function_name, entry->name_) &&
100 (entry->argument_count_ == argument_count)) { 99 (entry->argument_count_ == argument_count)) {
101 return reinterpret_cast<Dart_NativeFunction>(entry->function_); 100 return reinterpret_cast<Dart_NativeFunction>(entry->function_);
102 } 101 }
103 } 102 }
104 return NULL; 103 return NULL;
105 } 104 }
106 105
107 } // namespace bin 106 } // namespace bin
108 } // namespace dart 107 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/io_impl_sources.gypi ('k') | runtime/bin/io_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698