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

Unified Diff: include/v8.h

Issue 11434021: Always inline GetAlignedPointerFromInternalField (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 01a4cc9dea7f9e29b565597e3b984215a96ed91f..a52a4f36f803b3b89c059633a7cdedb2ad1a319e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -84,6 +84,14 @@
#define V8_DEPRECATED(func) func
#endif
+#if defined(__GNUC__) && !defined(V8_ENABLE_CHECKS)
+#define V8_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#elif defined(_MSC_VER) && !defined(V8_ENABLE_CHECKS)
+#define V8_ALWAYS_INLINE __forceinline
+#else
+#define V8_ALWAYS_INLINE inline
+#endif
+
/**
* The v8 JavaScript engine.
*/
@@ -1636,7 +1644,7 @@ class Object : public Value {
* must have been set by SetAlignedPointerInInternalField, everything else
* leads to undefined behavior.
*/
- inline void* GetAlignedPointerFromInternalField(int index);
+ V8_ALWAYS_INLINE void* GetAlignedPointerFromInternalField(int index);
/**
* Sets a 2-byte-aligned native pointer in an internal field. To retrieve such
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698