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

Side by Side Diff: runtime/bin/builtin_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/builtin_impl_sources.gypi ('k') | runtime/bin/directory.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) 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 10
(...skipping 12 matching lines...) Expand all
23 // using functions listed in io_natives.cc. 23 // using functions listed in io_natives.cc.
24 #define BUILTIN_NATIVE_LIST(V) \ 24 #define BUILTIN_NATIVE_LIST(V) \
25 V(Directory_Exists, 1) \ 25 V(Directory_Exists, 1) \
26 V(Directory_Create, 1) \ 26 V(Directory_Create, 1) \
27 V(Directory_Current, 0) \ 27 V(Directory_Current, 0) \
28 V(Directory_SetCurrent, 1) \ 28 V(Directory_SetCurrent, 1) \
29 V(Directory_CreateTemp, 1) \ 29 V(Directory_CreateTemp, 1) \
30 V(Directory_Delete, 2) \ 30 V(Directory_Delete, 2) \
31 V(Directory_Rename, 2) \ 31 V(Directory_Rename, 2) \
32 V(Directory_List, 3) \ 32 V(Directory_List, 3) \
33 V(Directory_NewServicePort, 0) \
34 V(File_Open, 2) \ 33 V(File_Open, 2) \
35 V(File_Exists, 1) \ 34 V(File_Exists, 1) \
36 V(File_Close, 1) \ 35 V(File_Close, 1) \
37 V(File_ReadByte, 1) \ 36 V(File_ReadByte, 1) \
38 V(File_WriteByte, 2) \ 37 V(File_WriteByte, 2) \
39 V(File_Read, 2) \ 38 V(File_Read, 2) \
40 V(File_ReadInto, 4) \ 39 V(File_ReadInto, 4) \
41 V(File_WriteFrom, 4) \ 40 V(File_WriteFrom, 4) \
42 V(File_Position, 1) \ 41 V(File_Position, 1) \
43 V(File_SetPosition, 2) \ 42 V(File_SetPosition, 2) \
44 V(File_Truncate, 2) \ 43 V(File_Truncate, 2) \
45 V(File_Length, 1) \ 44 V(File_Length, 1) \
46 V(File_LengthFromPath, 1) \ 45 V(File_LengthFromPath, 1) \
47 V(File_Stat, 1) \ 46 V(File_Stat, 1) \
48 V(File_LastModified, 1) \ 47 V(File_LastModified, 1) \
49 V(File_Flush, 1) \ 48 V(File_Flush, 1) \
50 V(File_Create, 1) \ 49 V(File_Create, 1) \
51 V(File_CreateLink, 2) \ 50 V(File_CreateLink, 2) \
52 V(File_LinkTarget, 1) \ 51 V(File_LinkTarget, 1) \
53 V(File_Delete, 1) \ 52 V(File_Delete, 1) \
54 V(File_DeleteLink, 1) \ 53 V(File_DeleteLink, 1) \
55 V(File_Rename, 2) \ 54 V(File_Rename, 2) \
56 V(File_RenameLink, 2) \ 55 V(File_RenameLink, 2) \
57 V(File_ResolveSymbolicLinks, 1) \ 56 V(File_ResolveSymbolicLinks, 1) \
58 V(File_OpenStdio, 1) \ 57 V(File_OpenStdio, 1) \
59 V(File_GetStdioHandleType, 1) \ 58 V(File_GetStdioHandleType, 1) \
60 V(File_GetType, 2) \ 59 V(File_GetType, 2) \
61 V(File_AreIdentical, 2) \ 60 V(File_AreIdentical, 2) \
62 V(File_NewServicePort, 0) \
63 V(FileSystemWatcher_IsSupported, 0) \ 61 V(FileSystemWatcher_IsSupported, 0) \
64 V(FileSystemWatcher_ReadEvents, 1) \ 62 V(FileSystemWatcher_ReadEvents, 1) \
65 V(FileSystemWatcher_UnwatchPath, 1) \ 63 V(FileSystemWatcher_UnwatchPath, 1) \
66 V(FileSystemWatcher_WatchPath, 4) \ 64 V(FileSystemWatcher_WatchPath, 4) \
67 V(Logger_PrintString, 1) 65 V(Logger_PrintString, 1)
68 66
69 BUILTIN_NATIVE_LIST(DECLARE_FUNCTION); 67 BUILTIN_NATIVE_LIST(DECLARE_FUNCTION);
70 68
71 static struct NativeEntries { 69 static struct NativeEntries {
72 const char* name_; 70 const char* name_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 fputs(Dart_GetError(result), stdout); 111 fputs(Dart_GetError(result), stdout);
114 } else { 112 } else {
115 fwrite(chars, sizeof(*chars), length, stdout); 113 fwrite(chars, sizeof(*chars), length, stdout);
116 } 114 }
117 fputc('\n', stdout); 115 fputc('\n', stdout);
118 fflush(stdout); 116 fflush(stdout);
119 } 117 }
120 118
121 } // namespace bin 119 } // namespace bin
122 } // namespace dart 120 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/builtin_impl_sources.gypi ('k') | runtime/bin/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698