Index: vm/native_entry.h |
=================================================================== |
--- vm/native_entry.h (revision 11528) |
+++ vm/native_entry.h (working copy) |
@@ -24,17 +24,13 @@ |
typedef void (*NativeFunction)(NativeArguments* arguments); |
-#define NATIVE_ENTRY_FUNCTION(name) DN_##name |
+#define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name |
-// Helper macros for declaring and defining native entries. |
-#define REGISTER_NATIVE_ENTRY(name, count) \ |
- { ""#name, NATIVE_ENTRY_FUNCTION(name), count }, |
- |
- |
#define DEFINE_NATIVE_ENTRY(name, argument_count) \ |
- static void DN_Helper##name(Isolate* isolate, NativeArguments* arguments); \ |
- void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ |
+ static RawObject* DN_Helper##name(Isolate* isolate, \ |
+ NativeArguments* arguments); \ |
+ void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ |
CHECK_STACK_ALIGNMENT; \ |
VERIFY_ON_TRANSITION; \ |
NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \ |
@@ -43,16 +39,15 @@ |
{ \ |
Zone zone(arguments->isolate()); \ |
HANDLESCOPE(arguments->isolate()); \ |
- DN_Helper##name(arguments->isolate(), arguments); \ |
+ arguments->SetReturnUnsafe( \ |
+ DN_Helper##name(arguments->isolate(), arguments)); \ |
} \ |
VERIFY_ON_TRANSITION; \ |
} \ |
- static void DN_Helper##name(Isolate* isolate, NativeArguments* arguments) |
+ static RawObject* DN_Helper##name(Isolate* isolate, \ |
+ NativeArguments* arguments) |
-#define DECLARE_NATIVE_ENTRY(name, argument_count) \ |
- extern void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments arguments); |
- |
// Natives should throw an exception if an illegal argument is passed. |
// type name = value. |
#define GET_NATIVE_ARGUMENT(type, name, value) \ |