Reviewers: Yang,

Description:
Version 4.1.0.12 (cherry-pick)

Merged e8b9f2d70b8bfd24a69a5a4390a26e8ed945d8e0

src: fix build on freebsd

[email protected]

Please review this at https://codereview.chromium.org/819173005/

Base URL: https://chromium.googlesource.com/v8/[email protected]

Affected files (+6, -6 lines):
  M src/base/platform/platform-freebsd.cc
  M src/base/platform/platform-posix.cc
  M src/debug.cc
  M src/preparser.h
  M src/unique.h
  M src/version.cc


Index: src/base/platform/platform-freebsd.cc
diff --git a/src/base/platform/platform-freebsd.cc b/src/base/platform/platform-freebsd.cc index 507b946f69f57fe001e475169d35256d7070bcd0..58316f8bc1a9abf0ce86549cc0976fce1120ea2d 100644
--- a/src/base/platform/platform-freebsd.cc
+++ b/src/base/platform/platform-freebsd.cc
@@ -141,7 +141,7 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
     if (bytes_read < 8) break;
     unsigned end = StringToLong(addr_buffer);
     char buffer[MAP_LENGTH];
-    int bytes_read = -1;
+    bytes_read = -1;
     do {
       bytes_read++;
       if (bytes_read >= MAP_LENGTH - 1)
Index: src/base/platform/platform-posix.cc
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc index c2fa26a9ea9364b8009e7b5d4b2a0b290e06a64b..64aed2b8d1f2d0c3d3c86ef86cfd6d8fccd573e9 100644
--- a/src/base/platform/platform-posix.cc
+++ b/src/base/platform/platform-posix.cc
@@ -261,7 +261,7 @@ int OS::GetCurrentThreadId() {
 #elif V8_OS_ANDROID
   return static_cast<int>(gettid());
 #else
-  return static_cast<int>(pthread_self());
+  return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
 #endif
 }

Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 93ef1cfc0973939388f18eb876e021b02a588de5..cdcb0a759f0e4309ddebe829628e28f3e1b02e20 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -573,7 +573,7 @@ void Debug::ThreadInit() {
   thread_local_.step_out_fp_ = 0;
   // TODO(isolates): frames_are_dropped_?
   base::NoBarrier_Store(&thread_local_.current_debug_scope_,
-                        static_cast<base::AtomicWord>(NULL));
+                        static_cast<base::AtomicWord>(0));
   thread_local_.restarter_frame_function_pointer_ = NULL;
 }

Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index e3868ff665a088efa431b4ba025fb82cf3d3d3e0..5fb60d00bb3fe43689c5fc9ba05584da81901f91 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -467,7 +467,7 @@ class ParserBase : public Traits {
   void ReportMessageAt(Scanner::Location location, const char* message,
                        bool is_reference_error = false) {
     Traits::ReportMessageAt(location, message,
-                            reinterpret_cast<const char*>(NULL),
+                            reinterpret_cast<const char*>(0),
                             is_reference_error);
   }

Index: src/unique.h
diff --git a/src/unique.h b/src/unique.h
index 9232f859708366d7a3d8a7a702eeb86deefb0d00..321eb3683dbedac418dd442c9d9f30ce9a9257ba 100644
--- a/src/unique.h
+++ b/src/unique.h
@@ -117,7 +117,7 @@ class Unique {

   // TODO(titzer): this is a hack to migrate to Unique<T> incrementally.
   static Unique<T> CreateUninitialized(Handle<T> handle) {
-    return Unique<T>(reinterpret_cast<Address>(NULL), handle);
+    return Unique<T>(NULL, handle);
   }

   static Unique<T> CreateImmovable(Handle<T> handle) {
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index 170a0c9e7ff65cfd3893e6f67e9225c6a1416deb..6266db9977d43fdad1839dc23325b8a9aa84dece 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     4
 #define MINOR_VERSION     1
 #define BUILD_NUMBER      0
-#define PATCH_LEVEL       11
+#define PATCH_LEVEL       12
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to