Bug 903501 - part 2 - eliminate signed-unsigned comparison warning in AssemblerBuffer::getInst; r=jandem
authorNathan Froyd <froydnj@mozilla.com>
Fri, 09 Aug 2013 12:18:49 -0400
changeset 141916 645564aa4a30b198e50455f1c31fd0b695ddcf7a
parent 141915 000a3ebae6d91bfe47c6e46e498bc99576536788
child 141917 2b4c8614250ac844034151521c938a9e5bc5971e
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 2 - eliminate signed-unsigned comparison warning in AssemblerBuffer::getInst; r=jandem
js/src/jit/shared/IonAssemblerBuffer.h
--- a/js/src/jit/shared/IonAssemblerBuffer.h
+++ b/js/src/jit/shared/IonAssemblerBuffer.h
@@ -209,31 +209,32 @@ struct AssemblerBuffer
                     local_off -= cur_off;
                     break;
                 }
                 count++;
             }
             JS_ASSERT(cur != NULL);
         } else {
             for (; cur != NULL; cur = cur->getNext()) {
-                if (local_off < cur_off + cur->size()) {
+                int cur_size = cur->size();
+                if (local_off < cur_off + cur_size) {
                     local_off -= cur_off;
                     break;
                 }
-                cur_off += cur->size();
+                cur_off += cur_size;
                 count++;
             }
             JS_ASSERT(cur != NULL);
         }
         if (count > 2 || used_finger) {
             finger = cur;
             finger_offset = cur_off;
         }
         // the offset within this node should not be larger than the node itself.
-        JS_ASSERT(local_off < cur->size());
+        JS_ASSERT(local_off < (int)cur->size());
         return (Inst*)&cur->instructions[local_off];
     }
     BufferOffset nextOffset() const {
         if (tail != NULL)
             return BufferOffset(bufferSize + tail->size());
         else
             return BufferOffset(bufferSize);
     }