Bug 1117468 - Fix Android gcc warnings in js/src/irregxp and js/src/jit. r=jandem
authorChris Peterson <cpeterson@mozilla.com>
Sat, 03 Jan 2015 21:57:49 -0800
changeset 248024 b8ade3d51d5ccdc93113187c231831db5a27ebaf
parent 248023 2074c8fd1f10ba540fe80902ebd2d07af3af088e
child 248025 29a48b9409ea68e9c8da0de649e7ce2651954330
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1117468
milestone37.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 1117468 - Fix Android gcc warnings in js/src/irregxp and js/src/jit. r=jandem
js/src/irregexp/RegExpEngine.cpp
js/src/irregexp/RegExpParser.cpp
js/src/jit/arm/CodeGenerator-arm.cpp
--- a/js/src/irregexp/RegExpEngine.cpp
+++ b/js/src/irregexp/RegExpEngine.cpp
@@ -77,17 +77,17 @@ static const int kWordRanges[] = {
 static const int kWordRangeCount = ArrayLength(kWordRanges);
 static const int kDigitRanges[] = { '0', '9' + 1, 0x10000 };
 static const int kDigitRangeCount = ArrayLength(kDigitRanges);
 static const int kSurrogateRanges[] = { 0xd800, 0xe000, 0x10000 };
 static const int kSurrogateRangeCount = ArrayLength(kSurrogateRanges);
 static const int kLineTerminatorRanges[] = { 0x000A, 0x000B, 0x000D, 0x000E,
     0x2028, 0x202A, 0x10000 };
 static const int kLineTerminatorRangeCount = ArrayLength(kLineTerminatorRanges);
-static const unsigned kMaxOneByteCharCode = 0xff;
+static const int kMaxOneByteCharCode = 0xff;
 static const int kMaxUtf16CodeUnit = 0xffff;
 
 static char16_t
 MaximumCharacter(bool ascii)
 {
     return ascii ? kMaxOneByteCharCode : kMaxUtf16CodeUnit;
 }
 
@@ -3175,17 +3175,17 @@ SplitSearchSpace(RangeBoundaryVector &ra
     // 128-character space can take up a lot of space in the ranges array if,
     // for example, we only want to match every second character (eg. the lower
     // case characters on some Unicode pages).
     int binary_chop_index = (end_index + start_index) / 2;
     // The first test ensures that we get to the code that handles the ASCII
     // range with a single not-taken branch, speeding up this important
     // character range (even non-ASCII charset-based text has spaces and
     // punctuation).
-    if (*border - 1 > (int) kMaxOneByteCharCode &&  // ASCII case.
+    if (*border - 1 > kMaxOneByteCharCode &&  // ASCII case.
         end_index - start_index > (*new_start_index - start_index) * 2 &&
         last - first > kSize * 2 &&
         binary_chop_index > *new_start_index &&
         ranges[binary_chop_index] >= first + 2 * kSize)
     {
         int scan_forward_for_section_border = binary_chop_index;;
         int new_border = (ranges[binary_chop_index] | kMask) + 1;
 
--- a/js/src/irregexp/RegExpParser.cpp
+++ b/js/src/irregexp/RegExpParser.cpp
@@ -513,17 +513,17 @@ RegExpParser<CharT>::ScanForCaptures()
     widechar n;
     while ((n = current()) != kEndMarker) {
         Advance();
         switch (n) {
           case '\\':
             Advance();
             break;
           case '[': {
-            int c;
+            widechar c;
             while ((c = current()) != kEndMarker) {
                 Advance();
                 if (c == '\\') {
                     Advance();
                 } else {
                     if (c == ']') break;
                 }
             }
--- a/js/src/jit/arm/CodeGenerator-arm.cpp
+++ b/js/src/jit/arm/CodeGenerator-arm.cpp
@@ -2122,20 +2122,21 @@ CodeGeneratorARM::visitAsmJSLoadGlobalVa
 
 void
 CodeGeneratorARM::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
 {
     const MAsmJSStoreGlobalVar *mir = ins->mir();
 
     MIRType type = mir->value()->type();
     MOZ_ASSERT(IsNumberType(type));
+
     unsigned addr = mir->globalDataOffset() - AsmJSGlobalRegBias;
-    if (mir->value()->type() == MIRType_Int32) {
+    if (type == MIRType_Int32) {
         masm.ma_dtr(IsStore, GlobalReg, Imm32(addr), ToRegister(ins->value()));
-    } else if (mir->value()->type() == MIRType_Float32) {
+    } else if (type == MIRType_Float32) {
         VFPRegister vd(ToFloatRegister(ins->value()));
         masm.ma_vstr(vd.singleOverlay(), Operand(GlobalReg, addr));
     } else {
         masm.ma_vstr(ToFloatRegister(ins->value()), Operand(GlobalReg, addr));
     }
 }
 
 void