Bug 903501 - part 3 - mark DebugOnly variables in AssemblerBufferWithConstantPool methods; r=jandem
authorNathan Froyd <froydnj@mozilla.com>
Fri, 09 Aug 2013 12:19:46 -0400
changeset 141917 2b4c8614250ac844034151521c938a9e5bc5971e
parent 141916 645564aa4a30b198e50455f1c31fd0b695ddcf7a
child 141918 4b5d40e468d523ed94c362ad25b4fc405e1d1efa
push id32287
push usernfroyd@mozilla.com
push dateFri, 09 Aug 2013 20:53:57 +0000
treeherdermozilla-inbound@0d42eb2f5b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs903501
milestone26.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 903501 - part 3 - mark DebugOnly variables in AssemblerBufferWithConstantPool methods; r=jandem
js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
--- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
+++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
@@ -2,16 +2,18 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jit_shared_IonAssemblerBufferWithConstantPools_h
 #define jit_shared_IonAssemblerBufferWithConstantPools_h
 
+#include "mozilla/DebugOnly.h"
+
 #include "assembler/wtf/SegmentedVector.h"
 #include "jit/IonSpewer.h"
 #include "jit/shared/IonAssemblerBuffer.h"
 
 namespace js {
 namespace ion {
 typedef Vector<BufferOffset, 512, IonAllocPolicy> LoadOffsets;
 
@@ -399,17 +401,17 @@ struct AssemblerBufferWithConstantPool :
         if (this->oom())
             return;
         // TODO: only do this when the pool actually has a value in it
         flushPool();
         for (int idx = 0; idx < numPoolKinds; idx++) {
             JS_ASSERT(pools[idx].numEntries == 0 && pools[idx].other->numEntries == 0);
         }
         typedef uint8_t Chunk[InstBaseSize];
-        Chunk *start = (Chunk*)dest_;
+        mozilla::DebugOnly<Chunk *> start = (Chunk*)dest_;
         Chunk *dest = (Chunk*)(((uint32_t)dest_ + instBufferAlign - 1) & ~(instBufferAlign -1));
         int curIndex = 0;
         int curInstOffset = 0;
         JS_ASSERT(start == dest);
         for (BufferSlice * cur = *getHead(); cur != NULL; cur = cur->getNext()) {
             Chunk *src = (Chunk*)cur->instructions;
             for (unsigned int idx = 0; idx <cur->size()/InstBaseSize;
                  idx++, curInstOffset += InstBaseSize) {
@@ -877,17 +879,17 @@ struct AssemblerBufferWithConstantPool :
 
         // We have a perforation.  Time to cut the instruction stream, patch in the pool
         // and possibly re-arrange the pool to accomodate its new location.
         int poolOffset = perforation.getOffset();
         int magicAlign =  getInfo(numDumps-1).finalPos - getInfo(numDumps-1).offset;
         poolOffset += magicAlign;
         poolOffset += headerSize;
         for (int poolIdx = 0; poolIdx < numPoolKinds; poolIdx++) {
-            bool beforePool = true;
+            mozilla::DebugOnly<bool> beforePool = true;
             Pool *p = &pools[poolIdx];
             // Any entries that happened to be after the place we put our pool will need to be
             // switched from the forward-referenced pool to the backward-refrenced pool.
             int idx = 0;
             for (BufferOffset *iter = p->loadOffsets.begin();
                  iter != p->loadOffsets.end(); ++iter, ++idx)
             {
                 if (iter->getOffset() >= perforation.getOffset()) {