Index: runtime/platform/globals.h |
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h |
index 4c5d053bb4de8bd9e034c9784b7a2de21d87af21..f06f04c75c40a3f347c74ac67f1e56933b633625 100644 |
--- a/runtime/platform/globals.h |
+++ b/runtime/platform/globals.h |
@@ -124,6 +124,19 @@ typedef struct { |
#error Architecture was not detected as supported by Dart. |
#endif |
+// DART_FORCE_INLINE strongly hints to the compiler that a function should |
+// be inlined. Your function is not guaranteed to be inlined but this is |
+// stronger than just using "inline". |
+// See: http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx for an |
+// explanation of some the cases when a function can never be inlined. |
+#ifdef _MSC_VER |
+#define DART_FORCE_INLINE __forceinline |
+#elif __GNUC__ |
+#define DART_FORCE_INLINE inline __attribute__((always_inline)) |
+#else |
Søren Gjesse
2013/02/27 12:57:44
Wouldn't an empty define for DART_FORCE_INLINE wor
|
+#error Automatic compiler detection failed. |
+#endif |
+ |
#if !defined(TARGET_ARCH_MIPS) |
#if !defined(TARGET_ARCH_ARM) |
#if !defined(TARGET_ARCH_X64) |