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

Unified Diff: runtime/vm/runtime_entry.h

Issue 1705163003: Move native entry argument exception throwing code out of line (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« runtime/vm/native_entry.h ('K') | « runtime/vm/native_entry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/runtime_entry.h
diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h
index d3f8428a39f29bd2b2ddb32568933f82841f22cf..c52b6b55b05965e23c61c31a5da583c8deee9037 100644
--- a/runtime/vm/runtime_entry.h
+++ b/runtime/vm/runtime_entry.h
@@ -76,6 +76,15 @@ class RuntimeEntry : public ValueObject {
DISALLOW_COPY_AND_ASSIGN(RuntimeEntry);
};
+#ifndef PRODUCT
+#define TRACE_RUNTIME_CALL(format, name) \
+ if (FLAG_trace_runtime_calls) { \
+ OS::Print("Runtime call: " format "\n", name); \
+ }
+#else
+#define TRACE_RUNTIME_CALL(format, name) \
+ do { } while (0)
+#endif
// Helper macros for declaring and defining runtime entries.
@@ -91,7 +100,7 @@ class RuntimeEntry : public ValueObject {
CHECK_STACK_ALIGNMENT; \
VERIFY_ON_TRANSITION; \
ASSERT(arguments.ArgCount() == argument_count); \
- if (FLAG_trace_runtime_calls) OS::Print("Runtime call: %s\n", ""#name); \
+ TRACE_RUNTIME_CALL("%s", ""#name); \
{ \
Thread* thread = arguments.thread(); \
ASSERT(thread == Thread::Current()); \
« runtime/vm/native_entry.h ('K') | « runtime/vm/native_entry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698