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

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

Issue 11365149: Move Platform class to dartlib_io target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Delete duplicate copies of moved lines. Created 8 years, 1 month 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') | no next file » | 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) 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"
11 #include "bin/dartutils.h" 11 #include "bin/dartutils.h"
12 #include "include/dart_api.h" 12 #include "include/dart_api.h"
13 #include "platform/assert.h" 13 #include "platform/assert.h"
14 14
15 15
16 // Lists the native functions implementing advanced dart:io classes. 16 // Lists the native functions implementing advanced dart:io classes.
17 // Some classes, like File and Directory, list their implementations in 17 // Some classes, like File and Directory, list their implementations in
18 // builtin_natives.cc instead. 18 // builtin_natives.cc instead.
19 #define IO_NATIVE_LIST(V) \ 19 #define IO_NATIVE_LIST(V) \
20 V(Common_IsBuiltinList, 1) \ 20 V(Common_IsBuiltinList, 1) \
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) \
25 V(Platform_OperatingSystem, 0) \
26 V(Platform_PathSeparator, 0) \
27 V(Platform_LocalHostname, 0) \
28 V(Platform_Environment, 0) \
24 V(Process_Start, 10) \ 29 V(Process_Start, 10) \
25 V(Process_Kill, 3) \ 30 V(Process_Kill, 3) \
26 V(ServerSocket_CreateBindListen, 4) \ 31 V(ServerSocket_CreateBindListen, 4) \
27 V(ServerSocket_Accept, 2) \ 32 V(ServerSocket_Accept, 2) \
28 V(Socket_CreateConnect, 3) \ 33 V(Socket_CreateConnect, 3) \
29 V(Socket_Available, 1) \ 34 V(Socket_Available, 1) \
30 V(Socket_Read, 2) \ 35 V(Socket_Read, 2) \
31 V(Socket_ReadList, 4) \ 36 V(Socket_ReadList, 4) \
32 V(Socket_WriteList, 4) \ 37 V(Socket_WriteList, 4) \
33 V(Socket_GetPort, 1) \ 38 V(Socket_GetPort, 1) \
(...skipping 23 matching lines...) Expand all
57 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); 62 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries);
58 for (int i = 0; i < num_entries; i++) { 63 for (int i = 0; i < num_entries; i++) {
59 struct NativeEntries* entry = &(IOEntries[i]); 64 struct NativeEntries* entry = &(IOEntries[i]);
60 if (!strcmp(function_name, entry->name_) && 65 if (!strcmp(function_name, entry->name_) &&
61 (entry->argument_count_ == argument_count)) { 66 (entry->argument_count_ == argument_count)) {
62 return reinterpret_cast<Dart_NativeFunction>(entry->function_); 67 return reinterpret_cast<Dart_NativeFunction>(entry->function_);
63 } 68 }
64 } 69 }
65 return NULL; 70 return NULL;
66 } 71 }
OLDNEW
« no previous file with comments | « runtime/bin/io_impl_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698