| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 V(Platform_OperatingSystem, 0) \ | 30 V(Platform_OperatingSystem, 0) \ |
| 31 V(Platform_PathSeparator, 0) \ | 31 V(Platform_PathSeparator, 0) \ |
| 32 V(Platform_LocalHostname, 0) \ | 32 V(Platform_LocalHostname, 0) \ |
| 33 V(Platform_Environment, 0) \ | 33 V(Platform_Environment, 0) \ |
| 34 V(Process_Start, 10) \ | 34 V(Process_Start, 10) \ |
| 35 V(Process_Kill, 3) \ | 35 V(Process_Kill, 3) \ |
| 36 V(Process_SetExitCode, 1) \ | 36 V(Process_SetExitCode, 1) \ |
| 37 V(Process_Exit, 1) \ | 37 V(Process_Exit, 1) \ |
| 38 V(Process_Sleep, 1) \ | 38 V(Process_Sleep, 1) \ |
| 39 V(Process_Pid, 1) \ | 39 V(Process_Pid, 1) \ |
| 40 V(ServerSocket_CreateBindListen, 4) \ | 40 V(ServerSocket_CreateBindListen, 5) \ |
| 41 V(ServerSocket_Accept, 2) \ | 41 V(ServerSocket_Accept, 2) \ |
| 42 V(Socket_CreateConnect, 3) \ | 42 V(Socket_CreateConnect, 4) \ |
| 43 V(Socket_Available, 1) \ | 43 V(Socket_Available, 1) \ |
| 44 V(Socket_Read, 2) \ | 44 V(Socket_Read, 2) \ |
| 45 V(Socket_ReadList, 4) \ | 45 V(Socket_ReadList, 4) \ |
| 46 V(Socket_WriteList, 4) \ | 46 V(Socket_WriteList, 4) \ |
| 47 V(Socket_GetPort, 1) \ | 47 V(Socket_GetPort, 1) \ |
| 48 V(Socket_GetRemotePeer, 1) \ | 48 V(Socket_GetRemotePeer, 1) \ |
| 49 V(Socket_GetError, 1) \ | 49 V(Socket_GetError, 1) \ |
| 50 V(Socket_GetStdioHandle, 2) \ | 50 V(Socket_GetStdioHandle, 2) \ |
| 51 V(Socket_NewServicePort, 0) \ | 51 V(Socket_NewServicePort, 0) \ |
| 52 V(Socket_GetType, 1) \ | 52 V(Socket_GetType, 1) \ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); | 84 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); |
| 85 for (int i = 0; i < num_entries; i++) { | 85 for (int i = 0; i < num_entries; i++) { |
| 86 struct NativeEntries* entry = &(IOEntries[i]); | 86 struct NativeEntries* entry = &(IOEntries[i]); |
| 87 if (!strcmp(function_name, entry->name_) && | 87 if (!strcmp(function_name, entry->name_) && |
| 88 (entry->argument_count_ == argument_count)) { | 88 (entry->argument_count_ == argument_count)) { |
| 89 return reinterpret_cast<Dart_NativeFunction>(entry->function_); | 89 return reinterpret_cast<Dart_NativeFunction>(entry->function_); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 return NULL; | 92 return NULL; |
| 93 } | 93 } |
| OLD | NEW |