Reviewers: Vyacheslav Egorov,

Message:
This has not been tested with GCC 3, so I am not sure the NO_INLINE macro will
work there. Maybe do the same for GCC 3 as for MSVC?

Description:
Fix GCC 4.4.4 build

Force a number functions to not inline in order th work around a bug in GCC
4.4.4.

See http://codereview.chromium.org/3083016 for more info.

Please review this at http://codereview.chromium.org/3034056/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/globals.h
  M     src/heap.h


Index: src/globals.h
===================================================================
--- src/globals.h       (revision 5170)
+++ src/globals.h       (working copy)
@@ -643,11 +643,14 @@
 #if defined(__GNUC__) && !defined(DEBUG)
 #if (__GNUC__ >= 4)
 #define INLINE(header) inline header  __attribute__((always_inline))
+#define NO_INLINE(header) header __attribute__((noinline))
 #else
 #define INLINE(header) inline __attribute__((always_inline)) header
+#define NO_INLINE(header) __attribute__((noinline)) header
 #endif
 #else
 #define INLINE(header) inline header
+#define NO_INLINE(header) header
 #endif

 // Feature flags bit positions. They are mostly based on the CPUID spec.
Index: src/heap.h
===================================================================
--- src/heap.h  (revision 5170)
+++ src/heap.h  (working copy)
@@ -1195,12 +1195,12 @@
   static bool CreateInitialMaps();
   static bool CreateInitialObjects();

- // These four Create*EntryStub functions are here because of a gcc-4.4 bug
-  // that assigns wrong vtable entries.
-  static void CreateCEntryStub();
-  static void CreateJSEntryStub();
-  static void CreateJSConstructEntryStub();
-  static void CreateRegExpCEntryStub();
+ // These four Create*EntryStub functions are here and forced to not be inlined
+  // because of a gcc-4.4 bug that assigns wrong vtable entries.
+  NO_INLINE(static void CreateCEntryStub());
+  NO_INLINE(static void CreateJSEntryStub());
+  NO_INLINE(static void CreateJSConstructEntryStub());
+  NO_INLINE(static void CreateRegExpCEntryStub());

   static void CreateFixedStubs();



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to