Reviewers: Hannes Payer,

Description:
Revert "Unbreak build with clang."

This reverts commit r22878 and fixes the actual bug instead.

[email protected]

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

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

Affected files (+9, -5 lines):
  M build/standalone.gypi
  M src/liveedit.cc
  M src/objects.h
  M src/types.h


Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index 9bf45fb17180c8e5f73875db1d1a72316e53940d..2ed19f65eaca08fec636b16b113482a02b0cf8a6 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -216,7 +216,8 @@
        or OS=="netbsd"', {
       'target_defaults': {
         'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
-                    '-Wno-long-long', '-pthread', '-fno-exceptions' ],
+                    '-Wno-long-long', '-pthread', '-fno-exceptions',
+                    '-pedantic' ],
         'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-std=gnu++0x' ],
         'ldflags': [ '-pthread', ],
         'conditions': [
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index ebe1d1f1e6eb1ccee0306a9a14ab663cb5681475..57258b0c5136178f32279d108dffe75282ecb2a4 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -174,7 +174,7 @@ class Differencer {

   static const int kDirectionSizeBits = 2;
   static const int kDirectionMask = (1 << kDirectionSizeBits) - 1;
-  static const int kEmptyCellValue = -1 << kDirectionSizeBits;
+  static const int kEmptyCellValue = ~0u << kDirectionSizeBits;

// This method only holds static assert statement (unfortunately you cannot
   // place one in class scope).
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 6c6cefe0d0e5d6cb8d6a0b2aeed5d066c6d707b3..4c50125fc0cd22521483b3b0b923a8bff06120e4 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -9005,7 +9005,8 @@ class Name: public HeapObject {
   STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));

   static const unsigned int kContainsCachedArrayIndexMask =
-      (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) |
+      (~static_cast<unsigned>(kMaxCachedArrayIndexLength)
+       << ArrayIndexLengthBits::kShift) |
       kIsNotArrayIndexMask;

   // Value of empty hash field indicating that the hash is not computed.
@@ -9089,7 +9090,8 @@ class String: public Name {
   STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));

   static const unsigned int kContainsCachedArrayIndexMask =
-      (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) |
+      (~static_cast<unsigned>(kMaxCachedArrayIndexLength)
+       << ArrayIndexLengthBits::kShift) |
       kIsNotArrayIndexMask;

   // Representation of the flat content of a String.
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index f141712bb84f09c5e58124174517eadc7a2241f6..0af790a5ad8cb860006e5955e3fa7e213f698809 100644
--- a/src/types.h
+++ b/src/types.h
@@ -155,7 +155,8 @@ namespace internal {
   V(UntaggedFloat64,  1 << 27 | kSemantic) \
   V(UntaggedPtr,      1 << 28 | kSemantic) \
   V(TaggedInt,        1 << 29 | kSemantic) \
- V(TaggedPtr, -1 << 30 | kSemantic) /* MSB has to be sign-extended */ \
+  /* MSB has to be sign-extended */        \
+  V(TaggedPtr,        static_cast<int>(~0u << 30) | kSemantic) \
   \
   V(UntaggedInt,      kUntaggedInt1 | kUntaggedInt8 |      \
                       kUntaggedInt16 | kUntaggedInt32)     \


--
--
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