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

Unified Diff: vm/runtime_entry.h

Issue 10592006: Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/code_generator.cc ('k') | vm/runtime_entry_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/runtime_entry.h
===================================================================
--- vm/runtime_entry.h (revision 8859)
+++ vm/runtime_entry.h (working copy)
@@ -72,24 +72,20 @@
#define DECLARE_RUNTIME_ENTRY(name) \
extern const RuntimeEntry k##name##RuntimeEntry
-#define DEFINE_LEAF_RUNTIME_ENTRY(name, argument_count) \
- extern RawObject* DLRT_##name(NativeArguments arguments); \
+#define DEFINE_LEAF_RUNTIME_ENTRY(type, name, ...) \
+ extern "C" type DLRT_##name(__VA_ARGS__); \
extern const RuntimeEntry k##name##RuntimeEntry( \
- "DLRT_"#name, reinterpret_cast<RuntimeFunction>(&DLRT_##name), \
- argument_count, true); \
- static RawObject* DLRT_Helper##name(Isolate* isolate, NativeArguments args); \
- RawObject* DLRT_##name(NativeArguments arguments) { \
+ "DLRT_"#name, reinterpret_cast<RuntimeFunction>(&DLRT_##name), 0, true); \
+ type DLRT_##name(__VA_ARGS__) { \
CHECK_STACK_ALIGNMENT; \
- { \
- NoGCScope no_gc_scope; \
- return DLRT_Helper##name(arguments.isolate(), arguments); \
- } \
- } \
- static RawObject* DLRT_Helper##name(Isolate* isolate, NativeArguments args)
+ NoGCScope no_gc_scope; \
-#define DECLARE_LEAF_RUNTIME_ENTRY(name) \
- extern const RuntimeEntry k##name##RuntimeEntry
+#define END_LEAF_RUNTIME_ENTRY }
+#define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \
+ extern const RuntimeEntry k##name##RuntimeEntry; \
+ extern "C" type DLRT_##name(__VA_ARGS__)
+
} // namespace dart
#endif // VM_RUNTIME_ENTRY_H_
« no previous file with comments | « vm/code_generator.cc ('k') | vm/runtime_entry_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698