Revision: 12199
Author: [email protected]
Date: Thu Jul 26 02:18:09 2012
Log: Fix building with GCC 3.x
[email protected]
BUG=v8:2016, v8:2017
TEST=
Review URL: https://chromiumcodereview.appspot.com/10823034
Patch from James Pike <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12199
Modified:
/branches/bleeding_edge/AUTHORS
/branches/bleeding_edge/include/v8-preparser.h
/branches/bleeding_edge/include/v8-profiler.h
/branches/bleeding_edge/include/v8-testing.h
/branches/bleeding_edge/include/v8.h
/branches/bleeding_edge/src/assembler.h
/branches/bleeding_edge/src/heap.h
/branches/bleeding_edge/src/mark-compact.cc
=======================================
--- /branches/bleeding_edge/AUTHORS Mon Jul 16 09:22:28 2012
+++ /branches/bleeding_edge/AUTHORS Thu Jul 26 02:18:09 2012
@@ -28,6 +28,7 @@
Ioseb Dzmanashvili <[email protected]>
Jan de Mooij <[email protected]>
Jay Freeman <[email protected]>
+James Pike <[email protected]>
Joel Stanley <[email protected]>
John Jozwiak <[email protected]>
Jonathan Liu <[email protected]>
=======================================
--- /branches/bleeding_edge/include/v8-preparser.h Fri May 6 04:41:15 2011
+++ /branches/bleeding_edge/include/v8-preparser.h Thu Jul 26 02:18:09 2012
@@ -55,11 +55,12 @@
// Setup for Linux shared library export. There is no need to distinguish
// between building or using the V8 shared library, but we should not
// export symbols when we are building a static library.
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
#define V8EXPORT __attribute__ ((visibility("default")))
-#else // defined(__GNUC__) && (__GNUC__ >= 4)
+#else
#define V8EXPORT
-#endif // defined(__GNUC__) && (__GNUC__ >= 4)
+#endif
#endif // _WIN32
=======================================
--- /branches/bleeding_edge/include/v8-profiler.h Wed Jun 13 04:02:24 2012
+++ /branches/bleeding_edge/include/v8-profiler.h Thu Jul 26 02:18:09 2012
@@ -50,11 +50,12 @@
// Setup for Linux shared library export. See v8.h in this directory for
// information on how to build/use V8 as shared library.
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
#define V8EXPORT __attribute__ ((visibility("default")))
-#else // defined(__GNUC__) && (__GNUC__ >= 4)
+#else
#define V8EXPORT
-#endif // defined(__GNUC__) && (__GNUC__ >= 4)
+#endif
#endif // _WIN32
=======================================
--- /branches/bleeding_edge/include/v8-testing.h Fri Mar 18 12:41:05 2011
+++ /branches/bleeding_edge/include/v8-testing.h Thu Jul 26 02:18:09 2012
@@ -50,11 +50,12 @@
// Setup for Linux shared library export. See v8.h in this directory for
// information on how to build/use V8 as shared library.
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
#define V8EXPORT __attribute__ ((visibility("default")))
-#else // defined(__GNUC__) && (__GNUC__ >= 4)
+#else
#define V8EXPORT
-#endif // defined(__GNUC__) && (__GNUC__ >= 4)
+#endif
#endif // _WIN32
=======================================
--- /branches/bleeding_edge/include/v8.h Mon Jul 23 07:22:46 2012
+++ /branches/bleeding_edge/include/v8.h Thu Jul 26 02:18:09 2012
@@ -63,15 +63,16 @@
#else // _WIN32
// Setup for Linux shared library export.
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(V8_SHARED)
#ifdef BUILDING_V8_SHARED
#define V8EXPORT __attribute__ ((visibility("default")))
#else
#define V8EXPORT
#endif
-#else // defined(__GNUC__) && (__GNUC__ >= 4)
+#else
#define V8EXPORT
-#endif // defined(__GNUC__) && (__GNUC__ >= 4)
+#endif
#endif // _WIN32
=======================================
--- /branches/bleeding_edge/src/assembler.h Thu Jun 14 04:16:47 2012
+++ /branches/bleeding_edge/src/assembler.h Thu Jul 26 02:18:09 2012
@@ -51,7 +51,7 @@
namespace internal {
struct StatsCounter;
-const unsigned kNoASTId = -1;
+const unsigned kNoASTId = UINT_MAX;
//
-----------------------------------------------------------------------------
// Platform independent assembler base class.
=======================================
--- /branches/bleeding_edge/src/heap.h Wed Jul 25 08:23:07 2012
+++ /branches/bleeding_edge/src/heap.h Thu Jul 26 02:18:09 2012
@@ -1154,7 +1154,7 @@
Object* global_contexts_list() { return global_contexts_list_; }
// Number of mark-sweeps.
- int ms_count() { return ms_count_; }
+ unsigned int ms_count() { return ms_count_; }
// Iterates over all roots in the heap.
void IterateRoots(ObjectVisitor* v, VisitMode mode);
@@ -1698,7 +1698,7 @@
// Returns the amount of external memory registered since last global gc.
intptr_t PromotedExternalMemorySize();
- int ms_count_; // how many mark-sweep collections happened
+ unsigned int ms_count_; // how many mark-sweep collections happened
unsigned int gc_count_; // how many gc happened
// For post mortem debugging.
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Wed Jul 25 08:23:07 2012
+++ /branches/bleeding_edge/src/mark-compact.cc Thu Jul 26 02:18:09 2012
@@ -577,7 +577,7 @@
p->ClearEvacuationCandidate();
if (FLAG_stress_compaction) {
- int counter = space->heap()->ms_count();
+ unsigned int counter = space->heap()->ms_count();
uintptr_t page_number = reinterpret_cast<uintptr_t>(p) >>
kPageSizeBits;
if ((counter & 1) == (page_number & 1)) fragmentation = 1;
} else if (mode == REDUCE_MEMORY_FOOTPRINT) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev