Reviewers: Sven Panne, danno,
Message:
I'm sorry that I don't have exact performance numbers for this patch. My
Linux
machine isn't very performance stable. Supposedly I can tweak the BIOS to
make
it more stable, but I haven't done that yet.
This change does have a significant effect on the profile, however, so I'm
pretty sure it will have an effect on the runtime.
Description:
Always inline GetAlignedPointerFromInternalField
On Linux, the compiler isn't smart enough to inline
GetAlignedPointerFromInternalField, so we need to tell it more forcefully.
Please review this at https://codereview.chromium.org/11434021/
SVN Base: git://github.com/v8/v8.git@bleeding_edge
Affected files:
M include/v8.h
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
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev