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

Unified Diff: runtime/bin/builtin_natives.cc

Issue 11360121: When building standalone Dart executable, put implementation of dart:io natives in a separate libra… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix grammar. 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/builtin_natives.cc
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 68258c33d60446caaafd3c96e195ee4f0db1f8c7..d2d6771520d9ae2372ec347aad0f4ff5f767e9bf 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -12,8 +12,10 @@
#include "platform/assert.h"
-// List all native functions implemented in standalone dart that is used
-// to inject additional functionality e.g: Logger, file I/O, socket I/O etc.
+// Lists the native functions implementing basic functionality in
+// standalone dart, such as printing, file I/O, and platform information.
+// Advanced I/O classes like sockets and process management are implemented
+// using functions listed in io_natives.cc.
#define BUILTIN_NATIVE_LIST(V) \
V(Common_IsBuiltinList, 1) \
V(Crypto_GetRandomBytes, 1) \
Mads Ager (google) 2012/11/08 09:32:26 I think these first two can be moved too?
@@ -24,8 +26,6 @@
V(Directory_Delete, 2) \
V(Directory_Rename, 2) \
V(Directory_NewServicePort, 0) \
- V(EventHandler_Start, 1) \
- V(EventHandler_SendData, 4) \
V(Exit, 1) \
V(File_Open, 2) \
V(File_Exists, 1) \
@@ -53,21 +53,7 @@
V(Platform_OperatingSystem, 0) \
V(Platform_PathSeparator, 0) \
V(Platform_LocalHostname, 0) \
- V(Platform_Environment, 0) \
- V(Process_Start, 10) \
- V(Process_Kill, 3) \
- V(ServerSocket_CreateBindListen, 4) \
- V(ServerSocket_Accept, 2) \
- V(Socket_CreateConnect, 3) \
- V(Socket_Available, 1) \
- V(Socket_Read, 2) \
- V(Socket_ReadList, 4) \
- V(Socket_WriteList, 4) \
- V(Socket_GetPort, 1) \
- V(Socket_GetRemotePeer, 1) \
- V(Socket_GetError, 1) \
- V(Socket_GetStdioHandle, 2) \
- V(Socket_NewServicePort, 0)
+ V(Platform_Environment, 0)
BUILTIN_NATIVE_LIST(DECLARE_FUNCTION);
@@ -81,8 +67,8 @@ static struct NativeEntries {
};
-Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
- int argument_count) {
+Dart_NativeFunction Builtin::BuiltinNativeLookup(Dart_Handle name,
+ int argument_count) {
const char* function_name = NULL;
Dart_Handle result = Dart_StringToCString(name, &function_name);
DART_CHECK_VALID(result);

Powered by Google App Engine
This is Rietveld 408576698