Bug 863804 - Fix -Wunused-but-set-variable warnings in NunboxAssembler.h. r=dvander
authorChris Peterson <cpeterson@mozilla.com>
Thu, 18 Apr 2013 19:30:22 -0700
changeset 140610 f7526aecfa5b6b24dc6b9c5ea40667f2c13c1fd4
parent 140609 d715a456d2cc49f3931871c2847c319db2fd20ab
child 140611 de74564a8bf371937b5b512c0ec494a402c61bde
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs863804
milestone23.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 863804 - Fix -Wunused-but-set-variable warnings in NunboxAssembler.h. r=dvander
js/src/methodjit/NunboxAssembler.h
--- a/js/src/methodjit/NunboxAssembler.h
+++ b/js/src/methodjit/NunboxAssembler.h
@@ -184,82 +184,85 @@ class NunboxAssembler : public JSC::Macr
 
     /*
      * Store a (64b) js::Value from type |treg| and payload |dreg| into |address|, and
      * return a label which can be used by
      * ICRepatcher::patchAddressOffsetForValueStore to patch the address'
      * offset.
      */
     DataLabel32 storeValueWithAddressOffsetPatch(RegisterID treg, RegisterID dreg, Address address) {
-        DataLabel32 start = dataLabel32();
 #if defined JS_CPU_X86
         /*
          * On x86 there are two stores to patch and they both encode the offset
          * in-line.
          */
+        DataLabel32 start = dataLabel32();
         storeTypeTag(treg, address);
         DBGLABEL_NOMASM(endType);
         storePayload(dreg, address);
         DBGLABEL_NOMASM(endPayload);
         JS_ASSERT(differenceBetween(start, endType) == 6);
         JS_ASSERT(differenceBetween(endType, endPayload) == 6);
         return start;
 #elif defined JS_CPU_ARM || defined JS_CPU_SPARC
         return store64WithAddressOffsetPatch(treg, dreg, address);
 #elif defined JS_CPU_MIPS
         /*
          * On MIPS there are LUI/ORI to patch.
          */
+        DataLabel32 start = dataLabel32();
         store64WithPatch(address, treg, dreg, TAG_OFFSET, PAYLOAD_OFFSET);
         return start;
 #endif
     }
 
     /* Overloaded for storing a constant type. */
     DataLabel32 storeValueWithAddressOffsetPatch(ImmType type, RegisterID dreg, Address address) {
+#if defined JS_CPU_X86
         DataLabel32 start = dataLabel32();
-#if defined JS_CPU_X86
         storeTypeTag(type, address);
         DBGLABEL_NOMASM(endType);
         storePayload(dreg, address);
         DBGLABEL_NOMASM(endPayload);
         JS_ASSERT(differenceBetween(start, endType) == 10);
         JS_ASSERT(differenceBetween(endType, endPayload) == 6);
         return start;
 #elif defined JS_CPU_ARM || defined JS_CPU_SPARC
         return store64WithAddressOffsetPatch(type, dreg, address);
 #elif defined JS_CPU_MIPS
         /*
          * On MIPS there are LUI/ORI to patch.
          */
+        DataLabel32 start = dataLabel32();
         store64WithPatch(address, type, dreg, TAG_OFFSET, PAYLOAD_OFFSET);
         return start;
 #endif
     }
 
     /* Overloaded for storing constant type and data. */
     DataLabel32 storeValueWithAddressOffsetPatch(const Value &v, Address address) {
         jsval_layout jv = JSVAL_TO_IMPL(v);
         ImmTag type(jv.s.tag);
         Imm32 payload(jv.s.payload.u32);
+#if defined JS_CPU_X86
         DataLabel32 start = dataLabel32();
-#if defined JS_CPU_X86
         store32(type, tagOf(address));
         DBGLABEL_NOMASM(endType);
         store32(payload, payloadOf(address));
         DBGLABEL_NOMASM(endPayload);
         JS_ASSERT(differenceBetween(start, endType) == 10);
         JS_ASSERT(differenceBetween(endType, endPayload) == 10);
         return start;
 #elif defined JS_CPU_ARM || defined JS_CPU_SPARC
         return store64WithAddressOffsetPatch(type, payload, address);
 #elif defined JS_CPU_MIPS
         /*
          * On MIPS there are LUI/ORI to patch.
          */
+        DataLabel32 start = dataLabel32();
         store64WithPatch(address, type, payload, TAG_OFFSET, PAYLOAD_OFFSET);
         return start;
 #endif
     }
 
     /* Overloaded for store with value remat info. */
     DataLabel32 storeValueWithAddressOffsetPatch(const ValueRemat &vr, Address address) {
         JS_ASSERT(!vr.isFPRegister());