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

Unified Diff: include/v8config.h

Issue 23494047: Deuglify V8_INLINE and V8_NOINLINE. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « include/v8.h ('k') | src/cpu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8config.h
diff --git a/include/v8config.h b/include/v8config.h
index 2dfbcfad002f41d676de9431d5188c119a66a6fd..cfafc6ff345b9c353a825ce6975c797fe5e326e8 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -298,23 +298,27 @@
// Helper macros
// A macro used to make better inlining. Don't bother for debug builds.
+// Use like:
+// V8_INLINE int GetZero() { return 0; }
#if !defined(DEBUG) && V8_HAS_ATTRIBUTE_ALWAYS_INLINE
-# define V8_INLINE(declarator) inline __attribute__((always_inline)) declarator
+# define V8_INLINE inline __attribute__((always_inline))
#elif !defined(DEBUG) && V8_HAS___FORCEINLINE
-# define V8_INLINE(declarator) __forceinline declarator
+# define V8_INLINE __forceinline
#else
-# define V8_INLINE(declarator) inline declarator
+# define V8_INLINE inline
#endif
// A macro used to tell the compiler to never inline a particular function.
// Don't bother for debug builds.
+// Use like:
+// V8_NOINLINE int GetMinusOne() { return -1; }
#if !defined(DEBUG) && V8_HAS_ATTRIBUTE_NOINLINE
-# define V8_NOINLINE(declarator) __attribute__((noinline)) declarator
+# define V8_NOINLINE __attribute__((noinline))
#elif !defined(DEBUG) && V8_HAS_DECLSPEC_NOINLINE
-# define V8_NOINLINE(declarator) __declspec(noinline) declarator
+# define V8_NOINLINE __declspec(noinline)
#else
-# define V8_NOINLINE(declarator) declarator
+# define V8_NOINLINE /* NOT SUPPORTED */
#endif
« no previous file with comments | « include/v8.h ('k') | src/cpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698