Bug 1020474 - IonMonkey: Pass CodePosition by value r=jandem
authorDan Gohman <sunfish@mozilla.com>
Fri, 06 Jun 2014 08:21:48 -0700
changeset 206451 a2aa79041b93e86fb35322f56c1a6bf340255a8d
parent 206450 a0bb2b2da6ef0a1bf57aad7ad06672f9efa0492e
child 206452 5b4bd2f81719a1a2ef9623ebe0023e771aa7fe25
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1020474
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1020474 - IonMonkey: Pass CodePosition by value r=jandem
js/src/jit/RegisterAllocator.h
--- a/js/src/jit/RegisterAllocator.h
+++ b/js/src/jit/RegisterAllocator.h
@@ -133,17 +133,17 @@ struct AllocationIntegrityState
 // this instruction, it can be clobbered in the output". Just having ranges
 // of instruction IDs is insufficiently expressive to denote all possibilities.
 // This class solves this issue by associating an extra bit with the instruction
 // ID which indicates whether the position is the input half or output half of
 // an instruction.
 class CodePosition
 {
   private:
-    MOZ_CONSTEXPR explicit CodePosition(const uint32_t &bits)
+    MOZ_CONSTEXPR explicit CodePosition(uint32_t bits)
       : bits_(bits)
     { }
 
     static const unsigned int INSTRUCTION_SHIFT = 1;
     static const unsigned int SUBPOSITION_MASK = 1;
     uint32_t bits_;
 
   public:
@@ -173,37 +173,37 @@ class CodePosition
     uint32_t pos() const {
         return bits_;
     }
 
     SubPosition subpos() const {
         return (SubPosition)(bits_ & SUBPOSITION_MASK);
     }
 
-    bool operator <(const CodePosition &other) const {
+    bool operator <(CodePosition other) const {
         return bits_ < other.bits_;
     }
 
-    bool operator <=(const CodePosition &other) const {
+    bool operator <=(CodePosition other) const {
         return bits_ <= other.bits_;
     }
 
-    bool operator !=(const CodePosition &other) const {
+    bool operator !=(CodePosition other) const {
         return bits_ != other.bits_;
     }
 
-    bool operator ==(const CodePosition &other) const {
+    bool operator ==(CodePosition other) const {
         return bits_ == other.bits_;
     }
 
-    bool operator >(const CodePosition &other) const {
+    bool operator >(CodePosition other) const {
         return bits_ > other.bits_;
     }
 
-    bool operator >=(const CodePosition &other) const {
+    bool operator >=(CodePosition other) const {
         return bits_ >= other.bits_;
     }
 
     CodePosition previous() const {
         JS_ASSERT(*this != MIN);
         return CodePosition(bits_ - 1);
     }
     CodePosition next() const {
@@ -263,17 +263,17 @@ class InstructionDataMap
         insData_ = gen->allocate<InstructionData>(numInstructions);
         numIns_ = numInstructions;
         if (!insData_)
             return false;
         memset(insData_, 0, sizeof(InstructionData) * numInstructions);
         return true;
     }
 
-    InstructionData &operator[](const CodePosition &pos) {
+    InstructionData &operator[](CodePosition pos) {
         JS_ASSERT(pos.ins() < numIns_);
         return insData_[pos.ins()];
     }
     InstructionData &operator[](LInstruction *ins) {
         JS_ASSERT(ins->id() < numIns_);
         return insData_[ins->id()];
     }
     InstructionData &operator[](uint32_t ins) {