| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 Loading... |
| 21 V(Crypto_GetRandomBytes, 1) \ | 21 V(Crypto_GetRandomBytes, 1) \ |
| 22 V(EventHandler_Start, 1) \ | 22 V(EventHandler_Start, 1) \ |
| 23 V(EventHandler_SendData, 4) \ | 23 V(EventHandler_SendData, 4) \ |
| 24 V(Platform_NumberOfProcessors, 0) \ | 24 V(Platform_NumberOfProcessors, 0) \ |
| 25 V(Platform_OperatingSystem, 0) \ | 25 V(Platform_OperatingSystem, 0) \ |
| 26 V(Platform_PathSeparator, 0) \ | 26 V(Platform_PathSeparator, 0) \ |
| 27 V(Platform_LocalHostname, 0) \ | 27 V(Platform_LocalHostname, 0) \ |
| 28 V(Platform_Environment, 0) \ | 28 V(Platform_Environment, 0) \ |
| 29 V(Process_Start, 10) \ | 29 V(Process_Start, 10) \ |
| 30 V(Process_Kill, 3) \ | 30 V(Process_Kill, 3) \ |
| 31 V(Process_SetExitCode, 1) \ |
| 32 V(Process_Exit, 1) \ |
| 31 V(ServerSocket_CreateBindListen, 4) \ | 33 V(ServerSocket_CreateBindListen, 4) \ |
| 32 V(ServerSocket_Accept, 2) \ | 34 V(ServerSocket_Accept, 2) \ |
| 33 V(Socket_CreateConnect, 3) \ | 35 V(Socket_CreateConnect, 3) \ |
| 34 V(Socket_Available, 1) \ | 36 V(Socket_Available, 1) \ |
| 35 V(Socket_Read, 2) \ | 37 V(Socket_Read, 2) \ |
| 36 V(Socket_ReadList, 4) \ | 38 V(Socket_ReadList, 4) \ |
| 37 V(Socket_WriteList, 4) \ | 39 V(Socket_WriteList, 4) \ |
| 38 V(Socket_GetPort, 1) \ | 40 V(Socket_GetPort, 1) \ |
| 39 V(Socket_GetRemotePeer, 1) \ | 41 V(Socket_GetRemotePeer, 1) \ |
| 40 V(Socket_GetError, 1) \ | 42 V(Socket_GetError, 1) \ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); | 75 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); |
| 74 for (int i = 0; i < num_entries; i++) { | 76 for (int i = 0; i < num_entries; i++) { |
| 75 struct NativeEntries* entry = &(IOEntries[i]); | 77 struct NativeEntries* entry = &(IOEntries[i]); |
| 76 if (!strcmp(function_name, entry->name_) && | 78 if (!strcmp(function_name, entry->name_) && |
| 77 (entry->argument_count_ == argument_count)) { | 79 (entry->argument_count_ == argument_count)) { |
| 78 return reinterpret_cast<Dart_NativeFunction>(entry->function_); | 80 return reinterpret_cast<Dart_NativeFunction>(entry->function_); |
| 79 } | 81 } |
| 80 } | 82 } |
| 81 return NULL; | 83 return NULL; |
| 82 } | 84 } |
| OLD | NEW |