Bug 1216182: Rename MODE_MASK to MODE_BITS_MASK, r=hv1989
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 20 Oct 2015 10:47:43 +0200
changeset 268343 b3882ed5ba7a11dc9049048e094a9cb53f15503d
parent 268342 98c32b89e38caea8066844ec49cd672af178769b
child 268344 7e63dad468d923b8a183b5c012402c11c192902d
push id18166
push usertdz@users.sourceforge.net
push dateTue, 20 Oct 2015 08:48:40 +0000
treeherderb2g-inbound@b3882ed5ba7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershv1989
bugs1216182
milestone44.0a1
Bug 1216182: Rename MODE_MASK to MODE_BITS_MASK, r=hv1989 On Linux, the enumator value MODE_MASK interferes with a C preprocessor define of the same name. This patch renames MODE_MASK to MODE_BITS_MASK.
js/src/jit/Snapshots.cpp
js/src/jit/Snapshots.h
--- a/js/src/jit/Snapshots.cpp
+++ b/js/src/jit/Snapshots.cpp
@@ -309,17 +309,17 @@ RValueAllocation::readPayload(CompactBuf
         break;
     }
 }
 
 RValueAllocation
 RValueAllocation::read(CompactBufferReader& reader)
 {
     uint8_t mode = reader.readByte();
-    const Layout& layout = layoutFromMode(Mode(mode & MODE_MASK));
+    const Layout& layout = layoutFromMode(Mode(mode & MODE_BITS_MASK));
     Payload arg1, arg2;
 
     readPayload(reader, layout.type1, &mode, &arg1);
     readPayload(reader, layout.type2, &mode, &arg2);
     return RValueAllocation(Mode(mode), arg1, arg2);
 }
 
 void
--- a/js/src/jit/Snapshots.h
+++ b/js/src/jit/Snapshots.h
@@ -75,17 +75,17 @@ class RValueAllocation
         // set on the mode, this inform the snapshot iterator that even if the
         // allocation is readable, the content of if might be incomplete unless
         // all side-effects are executed.
         RECOVER_SIDE_EFFECT_MASK = 0x80,
 
         // This mask represents the set of bits which can be used to encode a
         // value in a snapshot. The mode is used to determine how to interpret
         // the union of values and how to pack the value in memory.
-        MODE_MASK           = 0x17f,
+        MODE_BITS_MASK           = 0x17f,
 
         INVALID = 0x100,
     };
 
     enum { PACKED_TAG_MASK = 0x0f };
 
     // See Payload encoding in Snapshots.cpp
     enum PayloadType {
@@ -289,17 +289,17 @@ class RValueAllocation
 
     void writeHeader(CompactBufferWriter& writer, JSValueType type, uint32_t regCode) const;
   public:
     static RValueAllocation read(CompactBufferReader& reader);
     void write(CompactBufferWriter& writer) const;
 
   public:
     Mode mode() const {
-        return Mode(mode_ & MODE_MASK);
+        return Mode(mode_ & MODE_BITS_MASK);
     }
     bool needSideEffect() const {
         return mode_ & RECOVER_SIDE_EFFECT_MASK;
     }
 
     uint32_t index() const {
         MOZ_ASSERT(layoutFromMode(mode()).type1 == PAYLOAD_INDEX);
         return arg1_.index;