Bug 1128076 - Clean up naming around unboxed scalar MIR accesses, r=jandem.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 12 Mar 2015 10:25:44 -0600
changeset 233387 b0993c742a0d04e471e723b0336a3ee93b3c82d8
parent 233386 90eccf42027effa2f76f31cc91e20e603e1d6130
child 233388 d8d51e983a8ba3c10f71f48e0698df46affcae74
push id28410
push userryanvm@gmail.com
push dateThu, 12 Mar 2015 22:06:36 +0000
treeherdermozilla-central@42afc7ef5ccb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1128076
milestone39.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 1128076 - Clean up naming around unboxed scalar MIR accesses, r=jandem.
js/src/builtin/Utilities.js
js/src/jit/CodeGenerator.cpp
js/src/jit/CodeGenerator.h
js/src/jit/IonBuilder.cpp
js/src/jit/IonBuilder.h
js/src/jit/IonTypes.h
js/src/jit/LIR-Common.h
js/src/jit/LOpcodes.h
js/src/jit/Lowering.cpp
js/src/jit/Lowering.h
js/src/jit/MCallOptimize.cpp
js/src/jit/MIR.cpp
js/src/jit/MIR.h
js/src/jit/MOpcodes.h
js/src/jit/MacroAssembler.cpp
js/src/jit/RangeAnalysis.cpp
js/src/jit/TypePolicy.cpp
js/src/jit/TypePolicy.h
--- a/js/src/builtin/Utilities.js
+++ b/js/src/builtin/Utilities.js
@@ -9,17 +9,17 @@
          unused: false, strict: false, trailing: true,
 */
 
 /*global ToObject: false, ToInteger: false, IsCallable: false,
          ThrowError: false, AssertionFailed: false,
          MakeConstructible: false, DecompileArg: false,
          RuntimeDefaultLocale: false,
          ParallelDo: false, ParallelSlices: false, NewDenseArray: false,
-         UnsafePutElements: false, ShouldForceSequential: false,
+         UnsafePutElements: false,
          ParallelTestsShouldPass: false,
          Dump: false,
          callFunction: false,
          TO_UINT32: false,
          JSMSG_NOT_FUNCTION: false, JSMSG_MISSING_FUN_ARG: false,
          JSMSG_EMPTY_ARRAY_REDUCE: false, JSMSG_CANT_CONVERT_TO: false,
 */
 
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -8657,25 +8657,24 @@ CodeGenerator::visitUnboxObjectOrNull(LU
     if (lir->mir()->fallible()) {
         Label bail;
         masm.branchTestPtr(Assembler::Zero, obj, obj, &bail);
         bailoutFrom(&bail, lir->snapshot());
     }
 }
 
 void
-CodeGenerator::visitLoadTypedArrayElement(LLoadTypedArrayElement *lir)
+CodeGenerator::visitLoadUnboxedScalar(LLoadUnboxedScalar *lir)
 {
     Register elements = ToRegister(lir->elements());
     Register temp = lir->temp()->isBogusTemp() ? InvalidReg : ToRegister(lir->temp());
     AnyRegister out = ToAnyRegister(lir->output());
 
-    Scalar::Type arrayType = lir->mir()->arrayType();
     Scalar::Type readType  = lir->mir()->readType();
-    int width = Scalar::byteSize(arrayType);
+    int width = Scalar::byteSize(lir->mir()->indexType());
 
     Label fail;
     if (lir->index()->isConstant()) {
         Address source(elements, ToInt32(lir->index()) * width + lir->mir()->offsetAdjustment());
         masm.loadFromTypedArray(readType, source, out, temp, &fail,
                                 lir->mir()->canonicalizeDoubles());
     } else {
         BaseIndex source(elements, ToRegister(lir->index()), ScaleFromElemWidth(width),
@@ -8742,23 +8741,23 @@ StoreToTypedArray(MacroAssembler &masm, 
         if (value->isConstant())
             masm.storeToTypedIntArray(writeType, Imm32(ToInt32(value)), dest);
         else
             masm.storeToTypedIntArray(writeType, ToRegister(value), dest);
     }
 }
 
 void
-CodeGenerator::visitStoreTypedArrayElement(LStoreTypedArrayElement *lir)
+CodeGenerator::visitStoreUnboxedScalar(LStoreUnboxedScalar *lir)
 {
     Register elements = ToRegister(lir->elements());
     const LAllocation *value = lir->value();
 
     Scalar::Type writeType = lir->mir()->writeType();
-    int width = Scalar::byteSize(lir->mir()->arrayType());
+    int width = Scalar::byteSize(lir->mir()->indexType());
 
     if (lir->index()->isConstant()) {
         Address dest(elements, ToInt32(lir->index()) * width + lir->mir()->offsetAdjustment());
         StoreToTypedArray(masm, writeType, value, dest);
     } else {
         BaseIndex dest(elements, ToRegister(lir->index()), ScaleFromElemWidth(width),
                        lir->mir()->offsetAdjustment());
         StoreToTypedArray(masm, writeType, value, dest);
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -257,19 +257,19 @@ class CodeGenerator : public CodeGenerat
     void visitArrayPopShiftV(LArrayPopShiftV *lir);
     void visitArrayPopShiftT(LArrayPopShiftT *lir);
     void emitArrayPush(LInstruction *lir, const MArrayPush *mir, Register obj,
                        ConstantOrRegister value, Register elementsTemp, Register length);
     void visitArrayPushV(LArrayPushV *lir);
     void visitArrayPushT(LArrayPushT *lir);
     void visitArrayConcat(LArrayConcat *lir);
     void visitArrayJoin(LArrayJoin *lir);
-    void visitLoadTypedArrayElement(LLoadTypedArrayElement *lir);
+    void visitLoadUnboxedScalar(LLoadUnboxedScalar *lir);
     void visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole *lir);
-    void visitStoreTypedArrayElement(LStoreTypedArrayElement *lir);
+    void visitStoreUnboxedScalar(LStoreUnboxedScalar *lir);
     void visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole *lir);
     void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement *lir);
     void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop *lir);
     void visitClampIToUint8(LClampIToUint8 *lir);
     void visitClampDToUint8(LClampDToUint8 *lir);
     void visitClampVToUint8(LClampVToUint8 *lir);
     void visitCallIteratorStart(LCallIteratorStart *lir);
     void visitIteratorStart(LIteratorStart *lir);
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -7847,20 +7847,20 @@ IonBuilder::pushScalarLoadFromTypedObjec
     MOZ_ASSERT(size == ScalarTypeDescr::alignment(elemType));
 
     // Find location within the owner object.
     MDefinition *elements, *scaledOffset;
     int32_t adjustment;
     loadTypedObjectElements(obj, byteOffset, size, &elements, &scaledOffset, &adjustment);
 
     // Load the element.
-    MLoadTypedArrayElement *load = MLoadTypedArrayElement::New(alloc(), elements, scaledOffset,
-                                                               elemType,
-                                                               DoesNotRequireMemoryBarrier,
-                                                               adjustment);
+    MLoadUnboxedScalar *load = MLoadUnboxedScalar::New(alloc(), elements, scaledOffset,
+                                                       elemType,
+                                                       DoesNotRequireMemoryBarrier,
+                                                       adjustment);
     current->add(load);
     current->push(load);
 
     // If we are reading in-bounds elements, we can use knowledge about
     // the array type to determine the result type, even if the opcode has
     // never executed. The known pushed type is only used to distinguish
     // uint32 reads that may produce either doubles or integers.
     TemporaryTypeSet *resultTypes = bytecodeTypes(pc);
@@ -8608,17 +8608,17 @@ IonBuilder::jsop_getelem_typed(MDefiniti
         MIRType knownType = MIRTypeForTypedArrayRead(arrayType, allowDouble);
 
         // Get length, bounds-check, then get elements, and add all instructions.
         MInstruction *length;
         MInstruction *elements;
         addTypedArrayLengthAndData(obj, DoBoundsCheck, &index, &length, &elements);
 
         // Load the element.
-        MLoadTypedArrayElement *load = MLoadTypedArrayElement::New(alloc(), elements, index, arrayType);
+        MLoadUnboxedScalar *load = MLoadUnboxedScalar::New(alloc(), elements, index, arrayType);
         current->add(load);
         current->push(load);
 
         // Note: we can ignore the type barrier here, we know the type must
         // be valid and unbarriered.
         load->setResultType(knownType);
         return true;
     } else {
@@ -8804,17 +8804,17 @@ IonBuilder::setElemTryScalarElemOfTypedO
     ScalarTypeDescr::Type elemType = elemPrediction.scalarType();
     MOZ_ASSERT(elemSize == ScalarTypeDescr::alignment(elemType));
 
     LinearSum indexAsByteOffset(alloc());
     if (!checkTypedObjectIndexInBounds(elemSize, obj, index, objPrediction, &indexAsByteOffset))
         return true;
 
     // Store the element
-    if (!storeScalarTypedObjectValue(obj, indexAsByteOffset, elemType, false, value))
+    if (!storeScalarTypedObjectValue(obj, indexAsByteOffset, elemType, value))
         return false;
 
     current->push(value);
 
     trackOptimizationSuccess();
     *emitted = true;
     return true;
 }
@@ -9095,19 +9095,16 @@ IonBuilder::jsop_setelem_dense(Temporary
             needsHoleCheck = !packed && !writeOutOfBounds;
         } else {
             needsHoleCheck = false;
         }
 
         MStoreElement *ins = MStoreElement::New(alloc(), elements, id, newValue, needsHoleCheck);
         store = ins;
 
-        if (safety == SetElem_Unsafe)
-            ins->setRacy();
-
         current->add(ins);
 
         if (safety == SetElem_Normal)
             current->push(value);
 
         if (!resumeAfter(ins))
             return false;
     }
@@ -9158,47 +9155,45 @@ IonBuilder::jsop_setelem_typed(Scalar::T
         current->add(toWrite->toInstruction());
     }
 
     // Store the value.
     MInstruction *ins;
     if (expectOOB) {
         ins = MStoreTypedArrayElementHole::New(alloc(), elements, length, id, toWrite, arrayType);
     } else {
-        MStoreTypedArrayElement *store =
-            MStoreTypedArrayElement::New(alloc(), elements, id, toWrite, arrayType);
-        if (safety == SetElem_Unsafe)
-            store->setRacy();
+        MStoreUnboxedScalar *store =
+            MStoreUnboxedScalar::New(alloc(), elements, id, toWrite, arrayType);
         ins = store;
     }
 
     current->add(ins);
 
     if (safety == SetElem_Normal)
         current->push(value);
 
     return resumeAfter(ins);
 }
 
 bool
-IonBuilder::jsop_setelem_typed_object(Scalar::Type arrayType, SetElemSafety safety, bool racy,
+IonBuilder::jsop_setelem_typed_object(Scalar::Type arrayType, SetElemSafety safety,
                                       MDefinition *object, MDefinition *index, MDefinition *value)
 {
     MOZ_ASSERT(safety == SetElem_Unsafe); // Can be fixed, but there's been no reason to as of yet
 
     MInstruction *intIndex = MToInt32::New(alloc(), index);
     current->add(intIndex);
 
     size_t elemSize = ScalarTypeDescr::alignment(arrayType);
 
     LinearSum byteOffset(alloc());
     if (!byteOffset.add(intIndex, elemSize))
         setForceAbort();
 
-    return storeScalarTypedObjectValue(object, byteOffset, arrayType, racy, value);
+    return storeScalarTypedObjectValue(object, byteOffset, arrayType, value);
 }
 
 bool
 IonBuilder::jsop_length()
 {
     if (jsop_length_fastPath())
         return true;
 
@@ -10422,34 +10417,34 @@ IonBuilder::loadUnboxedProperty(MDefinit
 {
     size_t scaledOffsetConstant = offset / UnboxedTypeSize(unboxedType);
     MInstruction *scaledOffset = MConstant::New(alloc(), Int32Value(scaledOffsetConstant));
     current->add(scaledOffset);
 
     MInstruction *load;
     switch (unboxedType) {
       case JSVAL_TYPE_BOOLEAN:
-        load = MLoadTypedArrayElement::New(alloc(), obj, scaledOffset, Scalar::Uint8,
-                                           DoesNotRequireMemoryBarrier,
-                                           UnboxedPlainObject::offsetOfData());
+        load = MLoadUnboxedScalar::New(alloc(), obj, scaledOffset, Scalar::Uint8,
+                                       DoesNotRequireMemoryBarrier,
+                                       UnboxedPlainObject::offsetOfData());
         load->setResultType(MIRType_Boolean);
         break;
 
       case JSVAL_TYPE_INT32:
-        load = MLoadTypedArrayElement::New(alloc(), obj, scaledOffset, Scalar::Int32,
-                                           DoesNotRequireMemoryBarrier,
-                                           UnboxedPlainObject::offsetOfData());
+        load = MLoadUnboxedScalar::New(alloc(), obj, scaledOffset, Scalar::Int32,
+                                       DoesNotRequireMemoryBarrier,
+                                       UnboxedPlainObject::offsetOfData());
         load->setResultType(MIRType_Int32);
         break;
 
       case JSVAL_TYPE_DOUBLE:
-        load = MLoadTypedArrayElement::New(alloc(), obj, scaledOffset, Scalar::Float64,
-                                           DoesNotRequireMemoryBarrier,
-                                           UnboxedPlainObject::offsetOfData(),
-                                           /* canonicalizeDoubles = */ false);
+        load = MLoadUnboxedScalar::New(alloc(), obj, scaledOffset, Scalar::Float64,
+                                       DoesNotRequireMemoryBarrier,
+                                       UnboxedPlainObject::offsetOfData(),
+                                       /* canonicalizeDoubles = */ false);
         load->setResultType(MIRType_Double);
         break;
 
       case JSVAL_TYPE_STRING:
         load = MLoadUnboxedString::New(alloc(), obj, scaledOffset,
                                        UnboxedPlainObject::offsetOfData());
         break;
 
@@ -11240,17 +11235,17 @@ IonBuilder::setPropTryScalarPropOfTypedO
     TypeSet::ObjectKey *globalKey = TypeSet::ObjectKey::get(&script()->global());
     if (globalKey->hasFlags(constraints(), OBJECT_FLAG_TYPED_OBJECT_NEUTERED))
         return true;
 
     LinearSum byteOffset(alloc());
     if (!byteOffset.add(fieldOffset))
         setForceAbort();
 
-    if (!storeScalarTypedObjectValue(obj, byteOffset, fieldType, false, value))
+    if (!storeScalarTypedObjectValue(obj, byteOffset, fieldType, value))
         return false;
 
     current->push(value);
 
     trackOptimizationSuccess();
     *emitted = true;
     return true;
 }
@@ -11321,31 +11316,31 @@ IonBuilder::storeUnboxedProperty(MDefini
 {
     size_t scaledOffsetConstant = offset / UnboxedTypeSize(unboxedType);
     MInstruction *scaledOffset = MConstant::New(alloc(), Int32Value(scaledOffsetConstant));
     current->add(scaledOffset);
 
     MInstruction *store;
     switch (unboxedType) {
       case JSVAL_TYPE_BOOLEAN:
-        store = MStoreTypedArrayElement::New(alloc(), obj, scaledOffset, value, Scalar::Uint8,
-                                             DoesNotRequireMemoryBarrier,
-                                             UnboxedPlainObject::offsetOfData());
+        store = MStoreUnboxedScalar::New(alloc(), obj, scaledOffset, value, Scalar::Uint8,
+                                         DoesNotRequireMemoryBarrier,
+                                         UnboxedPlainObject::offsetOfData());
         break;
 
       case JSVAL_TYPE_INT32:
-        store = MStoreTypedArrayElement::New(alloc(), obj, scaledOffset, value, Scalar::Int32,
-                                             DoesNotRequireMemoryBarrier,
-                                             UnboxedPlainObject::offsetOfData());
+        store = MStoreUnboxedScalar::New(alloc(), obj, scaledOffset, value, Scalar::Int32,
+                                         DoesNotRequireMemoryBarrier,
+                                         UnboxedPlainObject::offsetOfData());
         break;
 
       case JSVAL_TYPE_DOUBLE:
-        store = MStoreTypedArrayElement::New(alloc(), obj, scaledOffset, value, Scalar::Float64,
-                                             DoesNotRequireMemoryBarrier,
-                                             UnboxedPlainObject::offsetOfData());
+        store = MStoreUnboxedScalar::New(alloc(), obj, scaledOffset, value, Scalar::Float64,
+                                         DoesNotRequireMemoryBarrier,
+                                         UnboxedPlainObject::offsetOfData());
         break;
 
       case JSVAL_TYPE_STRING:
         store = MStoreUnboxedString::New(alloc(), obj, scaledOffset, value,
                                          UnboxedPlainObject::offsetOfData());
         break;
 
       case JSVAL_TYPE_OBJECT:
@@ -12648,37 +12643,34 @@ IonBuilder::typeObjectForFieldFromStruct
 
     return unboxFieldType;
 }
 
 bool
 IonBuilder::storeScalarTypedObjectValue(MDefinition *typedObj,
                                         const LinearSum &byteOffset,
                                         ScalarTypeDescr::Type type,
-                                        bool racy,
                                         MDefinition *value)
 {
     // Find location within the owner object.
     MDefinition *elements, *scaledOffset;
     int32_t adjustment;
     size_t alignment = ScalarTypeDescr::alignment(type);
     loadTypedObjectElements(typedObj, byteOffset, alignment, &elements, &scaledOffset, &adjustment);
 
     // Clamp value to [0, 255] when type is Uint8Clamped
     MDefinition *toWrite = value;
     if (type == Scalar::Uint8Clamped) {
         toWrite = MClampToUint8::New(alloc(), value);
         current->add(toWrite->toInstruction());
     }
 
-    MStoreTypedArrayElement *store =
-        MStoreTypedArrayElement::New(alloc(), elements, scaledOffset, toWrite,
-                                     type, DoesNotRequireMemoryBarrier, adjustment);
-    if (racy)
-        store->setRacy();
+    MStoreUnboxedScalar *store =
+        MStoreUnboxedScalar::New(alloc(), elements, scaledOffset, toWrite,
+                                 type, DoesNotRequireMemoryBarrier, adjustment);
     current->add(store);
 
     return true;
 }
 
 bool
 IonBuilder::storeReferenceTypedObjectValue(MDefinition *typedObj,
                                            const LinearSum &byteOffset,
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -513,17 +513,16 @@ class IonBuilder
     bool storeReferenceTypedObjectValue(MDefinition *typedObj,
                                         const LinearSum &byteOffset,
                                         ReferenceTypeDescr::Type type,
                                         MDefinition *value,
                                         PropertyName *name);
     bool storeScalarTypedObjectValue(MDefinition *typedObj,
                                      const LinearSum &byteOffset,
                                      ScalarTypeDescr::Type type,
-                                     bool racy,
                                      MDefinition *value);
     bool checkTypedObjectIndexInBounds(int32_t elemSize,
                                        MDefinition *obj,
                                        MDefinition *index,
                                        TypedObjectPrediction objTypeDescrs,
                                        LinearSum *indexAsByteOffset);
     bool pushDerivedTypedObject(bool *emitted,
                                 MDefinition *obj,
@@ -662,17 +661,17 @@ class IonBuilder
     bool jsop_setelem();
     bool jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
                             SetElemSafety safety,
                             MDefinition *object, MDefinition *index, MDefinition *value);
     bool jsop_setelem_typed(ScalarTypeDescr::Type arrayType,
                             SetElemSafety safety,
                             MDefinition *object, MDefinition *index, MDefinition *value);
     bool jsop_setelem_typed_object(ScalarTypeDescr::Type arrayType,
-                                   SetElemSafety safety, bool racy,
+                                   SetElemSafety safety,
                                    MDefinition *object, MDefinition *index, MDefinition *value);
     bool jsop_length();
     bool jsop_length_fastPath();
     bool jsop_arguments();
     bool jsop_arguments_getelem();
     bool jsop_runonce();
     bool jsop_rest();
     bool jsop_not();
--- a/js/src/jit/IonTypes.h
+++ b/js/src/jit/IonTypes.h
@@ -52,17 +52,17 @@ enum BailoutKind
 
     // Dynamic scope chain lookup produced |undefined|
     Bailout_DynamicNameNotFound,
 
     // Input string contains 'arguments' or 'eval'
     Bailout_StringArgumentsEval,
 
     // Bailout on overflow, but don't immediately invalidate.
-    // Used for abs, sub and LoadTypedArrayElement (when loading a uint32 that
+    // Used for abs, sub and LoadUnboxedScalar (when loading a uint32 that
     // doesn't fit in an int32).
     Bailout_Overflow,
 
     // floor, ceiling and round bail if input is NaN, if output would be -0 or
     // doesn't fit in int32 range
     Bailout_Round,
 
     // Non-primitive value used as input for ToDouble, ToInt32, ToString, etc.
--- a/js/src/jit/LIR-Common.h
+++ b/js/src/jit/LIR-Common.h
@@ -4879,30 +4879,29 @@ class LArrayJoin : public LCallInstructi
     const LAllocation *array() {
         return getOperand(0);
     }
     const LAllocation *separator() {
         return getOperand(1);
     }
 };
 
-// Load a typed value from a typed array's elements vector.
-class LLoadTypedArrayElement : public LInstructionHelper<1, 2, 1>
-{
-  public:
-    LIR_HEADER(LoadTypedArrayElement)
-
-    LLoadTypedArrayElement(const LAllocation &elements, const LAllocation &index,
-                           const LDefinition &temp) {
+class LLoadUnboxedScalar : public LInstructionHelper<1, 2, 1>
+{
+  public:
+    LIR_HEADER(LoadUnboxedScalar)
+
+    LLoadUnboxedScalar(const LAllocation &elements, const LAllocation &index,
+                       const LDefinition &temp) {
         setOperand(0, elements);
         setOperand(1, index);
         setTemp(0, temp);
     }
-    const MLoadTypedArrayElement *mir() const {
-        return mir_->toLoadTypedArrayElement();
+    const MLoadUnboxedScalar *mir() const {
+        return mir_->toLoadUnboxedScalar();
     }
     const LAllocation *elements() {
         return getOperand(0);
     }
     const LAllocation *index() {
         return getOperand(1);
     }
     const LDefinition *temp() {
@@ -4940,30 +4939,30 @@ class LLoadTypedArrayElementStatic : pub
     MLoadTypedArrayElementStatic *mir() const {
         return mir_->toLoadTypedArrayElementStatic();
     }
     const LAllocation *ptr() {
         return getOperand(0);
     }
 };
 
-class LStoreTypedArrayElement : public LInstructionHelper<0, 3, 0>
-{
-  public:
-    LIR_HEADER(StoreTypedArrayElement)
-
-    LStoreTypedArrayElement(const LAllocation &elements, const LAllocation &index,
-                            const LAllocation &value) {
+class LStoreUnboxedScalar : public LInstructionHelper<0, 3, 0>
+{
+  public:
+    LIR_HEADER(StoreUnboxedScalar)
+
+    LStoreUnboxedScalar(const LAllocation &elements, const LAllocation &index,
+                        const LAllocation &value) {
         setOperand(0, elements);
         setOperand(1, index);
         setOperand(2, value);
     }
 
-    const MStoreTypedArrayElement *mir() const {
-        return mir_->toStoreTypedArrayElement();
+    const MStoreUnboxedScalar *mir() const {
+        return mir_->toStoreUnboxedScalar();
     }
     const LAllocation *elements() {
         return getOperand(0);
     }
     const LAllocation *index() {
         return getOperand(1);
     }
     const LAllocation *value() {
--- a/js/src/jit/LOpcodes.h
+++ b/js/src/jit/LOpcodes.h
@@ -215,35 +215,35 @@
     _(InitializedLength)            \
     _(SetInitializedLength)         \
     _(BoundsCheck)                  \
     _(BoundsCheckRange)             \
     _(BoundsCheckLower)             \
     _(LoadElementV)                 \
     _(LoadElementT)                 \
     _(LoadElementHole)              \
+    _(LoadUnboxedScalar)            \
     _(LoadUnboxedPointerV)          \
     _(LoadUnboxedPointerT)          \
     _(UnboxObjectOrNull)            \
     _(StoreElementV)                \
     _(StoreElementT)                \
+    _(StoreUnboxedScalar)           \
     _(StoreUnboxedPointer)          \
     _(ConvertUnboxedObjectToNative) \
     _(ArrayPopShiftV)               \
     _(ArrayPopShiftT)               \
     _(ArrayPushV)                   \
     _(ArrayPushT)                   \
     _(ArrayConcat)                  \
     _(ArrayJoin)                    \
     _(StoreElementHoleV)            \
     _(StoreElementHoleT)            \
-    _(LoadTypedArrayElement)        \
     _(LoadTypedArrayElementHole)    \
     _(LoadTypedArrayElementStatic)  \
-    _(StoreTypedArrayElement)       \
     _(StoreTypedArrayElementHole)   \
     _(StoreTypedArrayElementStatic) \
     _(CompareExchangeTypedArrayElement) \
     _(AtomicTypedArrayElementBinop) \
     _(EffectiveAddress)             \
     _(ClampIToUint8)                \
     _(ClampDToUint8)                \
     _(ClampVToUint8)                \
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -2875,37 +2875,37 @@ LIRGenerator::visitStringSplit(MStringSp
 
     LStringSplit *lir = new(alloc()) LStringSplit(useRegisterAtStart(ins->string()),
                                                   useRegisterAtStart(ins->separator()));
     defineReturn(lir, ins);
     assignSafepoint(lir, ins);
 }
 
 void
-LIRGenerator::visitLoadTypedArrayElement(MLoadTypedArrayElement *ins)
+LIRGenerator::visitLoadUnboxedScalar(MLoadUnboxedScalar *ins)
 {
     MOZ_ASSERT(IsValidElementsType(ins->elements(), ins->offsetAdjustment()));
     MOZ_ASSERT(ins->index()->type() == MIRType_Int32);
 
     const LUse elements = useRegister(ins->elements());
     const LAllocation index = useRegisterOrConstant(ins->index());
 
     MOZ_ASSERT(IsNumberType(ins->type()) || IsSimdType(ins->type()) ||
                ins->type() == MIRType_Boolean);
 
     // We need a temp register for Uint32Array with known double result.
     LDefinition tempDef = LDefinition::BogusTemp();
-    if (ins->arrayType() == Scalar::Uint32 && IsFloatingPointType(ins->type()))
+    if (ins->readType() == Scalar::Uint32 && IsFloatingPointType(ins->type()))
         tempDef = temp();
 
     if (ins->requiresMemoryBarrier()) {
         LMemoryBarrier *fence = new(alloc()) LMemoryBarrier(MembarBeforeLoad);
         add(fence, ins);
     }
-    LLoadTypedArrayElement *lir = new(alloc()) LLoadTypedArrayElement(elements, index, tempDef);
+    LLoadUnboxedScalar *lir = new(alloc()) LLoadUnboxedScalar(elements, index, tempDef);
     if (ins->fallible())
         assignSnapshot(lir, Bailout_Overflow);
     define(lir, ins);
     if (ins->requiresMemoryBarrier()) {
         LMemoryBarrier *fence = new(alloc()) LMemoryBarrier(MembarAfterLoad);
         add(fence, ins);
     }
 }
@@ -2971,17 +2971,17 @@ LIRGenerator::visitLoadTypedArrayElement
 
     // In case of out of bounds, may bail out, or may jump to ool code.
     if (ins->fallible())
         assignSnapshot(lir, Bailout_BoundsCheck);
     define(lir, ins);
 }
 
 void
-LIRGenerator::visitStoreTypedArrayElement(MStoreTypedArrayElement *ins)
+LIRGenerator::visitStoreUnboxedScalar(MStoreUnboxedScalar *ins)
 {
     MOZ_ASSERT(IsValidElementsType(ins->elements(), ins->offsetAdjustment()));
     MOZ_ASSERT(ins->index()->type() == MIRType_Int32);
 
     if (ins->isSimdWrite()) {
         MOZ_ASSERT_IF(ins->writeType() == Scalar::Float32x4, ins->value()->type() == MIRType_Float32x4);
         MOZ_ASSERT_IF(ins->writeType() == Scalar::Int32x4, ins->value()->type() == MIRType_Int32x4);
     } else if (ins->isFloatWrite()) {
@@ -3004,17 +3004,17 @@ LIRGenerator::visitStoreTypedArrayElemen
     // Optimization opportunity for atomics: on some platforms there
     // is a store instruction that incorporates the necessary
     // barriers, and we could use that instead of separate barrier and
     // store instructions.  See bug #1077027.
     if (ins->requiresMemoryBarrier()) {
         LMemoryBarrier *fence = new(alloc()) LMemoryBarrier(MembarBeforeStore);
         add(fence, ins);
     }
-    add(new(alloc()) LStoreTypedArrayElement(elements, index, value), ins);
+    add(new(alloc()) LStoreUnboxedScalar(elements, index, value), ins);
     if (ins->requiresMemoryBarrier()) {
         LMemoryBarrier *fence = new(alloc()) LMemoryBarrier(MembarAfterStore);
         add(fence, ins);
     }
 }
 
 void
 LIRGenerator::visitStoreTypedArrayElementHole(MStoreTypedArrayElementHole *ins)
--- a/js/src/jit/Lowering.h
+++ b/js/src/jit/Lowering.h
@@ -198,20 +198,20 @@ class LIRGenerator : public LIRGenerator
     void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull *ins);
     void visitStoreUnboxedString(MStoreUnboxedString *ins);
     void visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative *ins);
     void visitEffectiveAddress(MEffectiveAddress *ins);
     void visitArrayPopShift(MArrayPopShift *ins);
     void visitArrayPush(MArrayPush *ins);
     void visitArrayConcat(MArrayConcat *ins);
     void visitArrayJoin(MArrayJoin *ins);
-    void visitLoadTypedArrayElement(MLoadTypedArrayElement *ins);
+    void visitLoadUnboxedScalar(MLoadUnboxedScalar *ins);
     void visitLoadTypedArrayElementHole(MLoadTypedArrayElementHole *ins);
     void visitLoadTypedArrayElementStatic(MLoadTypedArrayElementStatic *ins);
-    void visitStoreTypedArrayElement(MStoreTypedArrayElement *ins);
+    void visitStoreUnboxedScalar(MStoreUnboxedScalar *ins);
     void visitStoreTypedArrayElementHole(MStoreTypedArrayElementHole *ins);
     void visitClampToUint8(MClampToUint8 *ins);
     void visitLoadFixedSlot(MLoadFixedSlot *ins);
     void visitStoreFixedSlot(MStoreFixedSlot *ins);
     void visitGetPropertyCache(MGetPropertyCache *ins);
     void visitGetPropertyPolymorphic(MGetPropertyPolymorphic *ins);
     void visitSetPropertyPolymorphic(MSetPropertyPolymorphic *ins);
     void visitGetElementCache(MGetElementCache *ins);
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -2117,17 +2117,17 @@ IonBuilder::inlineUnsafeSetTypedObjectAr
     // in intrinsic_UnsafePutElements():
     // - arr is a typed array
     // - idx < length
 
     MDefinition *obj = callInfo.getArg(base + 0);
     MDefinition *id = callInfo.getArg(base + 1);
     MDefinition *elem = callInfo.getArg(base + 2);
 
-    if (!jsop_setelem_typed_object(arrayType, SetElem_Unsafe, true, obj, id, elem))
+    if (!jsop_setelem_typed_object(arrayType, SetElem_Unsafe, obj, id, elem))
         return false;
 
     return true;
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineHasClass(CallInfo &callInfo,
                            const Class *clasp1, const Class *clasp2,
@@ -2683,19 +2683,19 @@ IonBuilder::inlineAtomicsLoad(CallInfo &
         return InliningStatus_NotInlined;
 
     callInfo.setImplicitlyUsedUnchecked();
 
     MInstruction *elements;
     MDefinition *index;
     atomicsCheckBounds(callInfo, &elements, &index);
 
-    MLoadTypedArrayElement *load =
-        MLoadTypedArrayElement::New(alloc(), elements, index, arrayType,
-                                    DoesRequireMemoryBarrier);
+    MLoadUnboxedScalar *load =
+        MLoadUnboxedScalar::New(alloc(), elements, index, arrayType,
+                                DoesRequireMemoryBarrier);
     load->setResultType(getInlineReturnType());
     current->add(load);
     current->push(load);
 
     return InliningStatus_Inlined;
 }
 
 IonBuilder::InliningStatus
@@ -2720,19 +2720,19 @@ IonBuilder::inlineAtomicsStore(CallInfo 
     MDefinition *index;
     atomicsCheckBounds(callInfo, &elements, &index);
 
     MDefinition *toWrite = value;
     if (value->type() == MIRType_Double) {
         toWrite = MTruncateToInt32::New(alloc(), value);
         current->add(toWrite->toInstruction());
     }
-    MStoreTypedArrayElement *store =
-        MStoreTypedArrayElement::New(alloc(), elements, index, toWrite, arrayType,
-                                     DoesRequireMemoryBarrier);
+    MStoreUnboxedScalar *store =
+        MStoreUnboxedScalar::New(alloc(), elements, index, toWrite, arrayType,
+                                 DoesRequireMemoryBarrier);
     current->add(store);
     current->push(value);
 
     return InliningStatus_Inlined;
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineAtomicsFence(CallInfo &callInfo)
@@ -3201,17 +3201,17 @@ IonBuilder::inlineSimdLoad(CallInfo &cal
     Scalar::Type simdType = SimdTypeToScalarType(type);
 
     MDefinition *index = nullptr;
     MInstruction *elements = nullptr;
     Scalar::Type arrayType;
     if (!prepareForSimdLoadStore(callInfo, simdType, &elements, &index, &arrayType))
         return InliningStatus_NotInlined;
 
-    MLoadTypedArrayElement *load = MLoadTypedArrayElement::New(alloc(), elements, index, arrayType);
+    MLoadUnboxedScalar *load = MLoadUnboxedScalar::New(alloc(), elements, index, arrayType);
     load->setResultType(SimdTypeDescrToMIRType(type));
     load->setReadType(simdType);
 
     return boxSimd(callInfo, load, templateObj);
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineSimdStore(CallInfo &callInfo, JSNative native, SimdTypeDescr::Type type)
@@ -3224,18 +3224,18 @@ IonBuilder::inlineSimdStore(CallInfo &ca
 
     MDefinition *index = nullptr;
     MInstruction *elements = nullptr;
     Scalar::Type arrayType;
     if (!prepareForSimdLoadStore(callInfo, simdType, &elements, &index, &arrayType))
         return InliningStatus_NotInlined;
 
     MDefinition *valueToWrite = callInfo.getArg(2);
-    MStoreTypedArrayElement *store = MStoreTypedArrayElement::New(alloc(), elements, index,
-                                                                  valueToWrite, arrayType);
+    MStoreUnboxedScalar *store = MStoreUnboxedScalar::New(alloc(), elements, index,
+                                                          valueToWrite, arrayType);
     store->setWriteType(simdType);
 
     current->add(store);
     current->push(valueToWrite);
 
     callInfo.setImplicitlyUsedUnchecked();
 
     if (!resumeAfter(store))
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -1022,20 +1022,20 @@ MCompare::printOpcode(FILE *fp) const
 void
 MConstantElements::printOpcode(FILE *fp) const
 {
     PrintOpcodeName(fp, op());
     fprintf(fp, " %p", value());
 }
 
 void
-MLoadTypedArrayElement::printOpcode(FILE *fp) const
+MLoadUnboxedScalar::printOpcode(FILE *fp) const
 {
     MDefinition::printOpcode(fp);
-    fprintf(fp, " %s", ScalarTypeDescr::typeName(arrayType()));
+    fprintf(fp, " %s", ScalarTypeDescr::typeName(indexType()));
 }
 
 void
 MAssertRange::printOpcode(FILE *fp) const
 {
     MDefinition::printOpcode(fp);
     Sprinter sp(GetJitContext()->cx);
     sp.init();
@@ -2026,17 +2026,17 @@ NeedNegativeZeroCheck(MDefinition *def)
             // If sub is truncating -0 and 0 are observed as the same
             if (use_def->toSub()->isTruncated())
                 break;
             /* Fall through...  */
           case MDefinition::Op_StoreElement:
           case MDefinition::Op_StoreElementHole:
           case MDefinition::Op_LoadElement:
           case MDefinition::Op_LoadElementHole:
-          case MDefinition::Op_LoadTypedArrayElement:
+          case MDefinition::Op_LoadUnboxedScalar:
           case MDefinition::Op_LoadTypedArrayElementHole:
           case MDefinition::Op_CharCodeAt:
           case MDefinition::Op_Mod:
             // Only allowed to remove check when definition is the second operand
             if (use_def->getOperand(0) == def)
                 return true;
             for (size_t i = 2, e = use_def->numOperands(); i < e; i++) {
                 if (use_def->getOperand(i) == def)
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -295,22 +295,23 @@ class MNode : public TempObject
 class AliasSet {
   private:
     uint32_t flags_;
 
   public:
     enum Flag {
         None_             = 0,
         ObjectFields      = 1 << 0, // shape, class, slots, length etc.
-        Element           = 1 << 1, // A member of obj->elements, or reference
-                                    // typed object field.
-        DynamicSlot       = 1 << 2, // A member of obj->slots.
-        FixedSlot         = 1 << 3, // A member of obj->fixedSlots().
-        TypedArrayElement = 1 << 4, // A typed array element, or scalar typed
-                                    // object field.
+        Element           = 1 << 1, // A Value member of obj->elements or
+                                    // a typed object.
+        UnboxedElement    = 1 << 2, // An unboxed scalar or reference member of
+                                    // a typed array, typed object, or unboxed
+                                    // object.
+        DynamicSlot       = 1 << 3, // A Value member of obj->slots.
+        FixedSlot         = 1 << 4, // A Value member of obj->fixedSlots().
         DOMProperty       = 1 << 5, // A DOM property
         FrameArgument     = 1 << 6, // An argument kept on the stack frame
         AsmJSGlobalVar    = 1 << 7, // An asm.js global var
         AsmJSHeap         = 1 << 8, // An asm.js heap load
         TypedArrayLength  = 1 << 9,// A typed array's length
         Last              = TypedArrayLength,
         Any               = Last | (Last - 1),
 
@@ -8314,17 +8315,17 @@ class MLoadUnboxedObjectOrNull
         const MLoadUnboxedObjectOrNull *other = ins->toLoadUnboxedObjectOrNull();
         if (nullBehavior() != other->nullBehavior())
             return false;
         if (offsetAdjustment() != other->offsetAdjustment())
             return false;
         return congruentIfOperandsEqual(other);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Load(AliasSet::Element);
+        return AliasSet::Load(AliasSet::UnboxedElement);
     }
 
     ALLOW_CLONE(MLoadUnboxedObjectOrNull)
 };
 
 class MLoadUnboxedString
   : public MBinaryInstruction,
     public SingleObjectPolicy::Data
@@ -8363,55 +8364,47 @@ class MLoadUnboxedString
         if (!ins->isLoadUnboxedString())
             return false;
         const MLoadUnboxedString *other = ins->toLoadUnboxedString();
         if (offsetAdjustment() != other->offsetAdjustment())
             return false;
         return congruentIfOperandsEqual(ins);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Load(AliasSet::Element);
+        return AliasSet::Load(AliasSet::UnboxedElement);
     }
 
     ALLOW_CLONE(MLoadUnboxedString)
 };
 
 class MStoreElementCommon
 {
     MIRType elementType_;
     bool needsBarrier_;
-    bool racy_; // if true, exempted from normal data race req. during par. exec.
 
   protected:
     MStoreElementCommon()
       : elementType_(MIRType_Value),
-        needsBarrier_(false),
-        racy_(false)
+        needsBarrier_(false)
     { }
 
   public:
     MIRType elementType() const {
         return elementType_;
     }
     void setElementType(MIRType elementType) {
         MOZ_ASSERT(elementType != MIRType_None);
         elementType_ = elementType;
     }
     bool needsBarrier() const {
         return needsBarrier_;
     }
     void setNeedsBarrier() {
         needsBarrier_ = true;
     }
-    bool racy() const {
-        return racy_;
-    }
-    void setRacy() {
-        racy_ = true;
-    }
 };
 
 // Store a value to a dense array slots vector.
 class MStoreElement
   : public MAryInstruction<3>,
     public MStoreElementCommon,
     public MixPolicy<SingleObjectPolicy, NoFloatPolicy<2> >::Data
 {
@@ -8552,18 +8545,17 @@ class MStoreUnboxedObjectOrNull
     }
     MDefinition *typedObj() const {
         return getOperand(3);
     }
     int32_t offsetAdjustment() const {
         return offsetAdjustment_;
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        // Use AliasSet::Element for reference typed object fields.
-        return AliasSet::Store(AliasSet::Element);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
 
     // For StoreUnboxedObjectOrNullPolicy.
     void setValue(MDefinition *def) {
         replaceOperand(2, def);
     }
 
     ALLOW_CLONE(MStoreUnboxedObjectOrNull)
@@ -8603,18 +8595,17 @@ class MStoreUnboxedString
     }
     MDefinition *value() const {
         return getOperand(2);
     }
     int32_t offsetAdjustment() const {
         return offsetAdjustment_;
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        // Use AliasSet::Element for reference typed object fields.
-        return AliasSet::Store(AliasSet::Element);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
 
     ALLOW_CLONE(MStoreUnboxedString)
 };
 
 // Passes through an object, after ensuring it is converted from an unboxed
 // object to a native representation.
 class MConvertUnboxedObjectToNative
@@ -8829,73 +8820,75 @@ class MArrayJoin
 enum MemoryBarrierRequirement
 {
     DoesNotRequireMemoryBarrier,
     DoesRequireMemoryBarrier
 };
 
 // Also see comments above MMemoryBarrier, below.
 
-class MLoadTypedArrayElement
+// Load an unboxed scalar value from a typed array or other object.
+class MLoadUnboxedScalar
   : public MBinaryInstruction,
     public SingleObjectPolicy::Data
 {
-    Scalar::Type arrayType_;
+    Scalar::Type indexType_;
     Scalar::Type readType_;
     bool requiresBarrier_;
     int32_t offsetAdjustment_;
     bool canonicalizeDoubles_;
 
-    MLoadTypedArrayElement(MDefinition *elements, MDefinition *index,
-                           Scalar::Type arrayType, MemoryBarrierRequirement requiresBarrier,
-                           int32_t offsetAdjustment, bool canonicalizeDoubles)
+    MLoadUnboxedScalar(MDefinition *elements, MDefinition *index,
+                       Scalar::Type indexType, MemoryBarrierRequirement requiresBarrier,
+                       int32_t offsetAdjustment, bool canonicalizeDoubles)
       : MBinaryInstruction(elements, index),
-        arrayType_(arrayType),
-        readType_(arrayType),
+        indexType_(indexType),
+        readType_(indexType),
         requiresBarrier_(requiresBarrier == DoesRequireMemoryBarrier),
         offsetAdjustment_(offsetAdjustment),
         canonicalizeDoubles_(canonicalizeDoubles)
     {
         setResultType(MIRType_Value);
         if (requiresBarrier_)
             setGuard();         // Not removable or movable
         else
             setMovable();
         MOZ_ASSERT(IsValidElementsType(elements, offsetAdjustment));
         MOZ_ASSERT(index->type() == MIRType_Int32);
-        MOZ_ASSERT(arrayType >= 0 && arrayType < Scalar::MaxTypedArrayViewType);
-    }
-
-  public:
-    INSTRUCTION_HEADER(LoadTypedArrayElement)
-
-    static MLoadTypedArrayElement *New(TempAllocator &alloc, MDefinition *elements, MDefinition *index,
-                                       Scalar::Type arrayType,
-                                       MemoryBarrierRequirement requiresBarrier=DoesNotRequireMemoryBarrier,
-                                       int32_t offsetAdjustment = 0,
-                                       bool canonicalizeDoubles = true)
-    {
-        return new(alloc) MLoadTypedArrayElement(elements, index, arrayType,
-                                                 requiresBarrier, offsetAdjustment,
-                                                 canonicalizeDoubles);
+        MOZ_ASSERT(indexType >= 0 && indexType < Scalar::MaxTypedArrayViewType);
+    }
+
+  public:
+    INSTRUCTION_HEADER(LoadUnboxedScalar)
+
+    static MLoadUnboxedScalar *New(TempAllocator &alloc, MDefinition *elements, MDefinition *index,
+                                   Scalar::Type indexType,
+                                   MemoryBarrierRequirement requiresBarrier
+                                       = DoesNotRequireMemoryBarrier,
+                                   int32_t offsetAdjustment = 0,
+                                   bool canonicalizeDoubles = true)
+    {
+        return new(alloc) MLoadUnboxedScalar(elements, index, indexType,
+                                             requiresBarrier, offsetAdjustment,
+                                             canonicalizeDoubles);
     }
 
     void setReadType(Scalar::Type type) {
         readType_ = type;
     }
     Scalar::Type readType() const {
         return readType_;
     }
 
-    Scalar::Type arrayType() const {
-        return arrayType_;
+    Scalar::Type indexType() const {
+        return indexType_;
     }
     bool fallible() const {
         // Bailout if the result does not fit in an int32.
-        return arrayType_ == Scalar::Uint32 && type() == MIRType_Int32;
+        return readType_ == Scalar::Uint32 && type() == MIRType_Int32;
     }
     bool requiresMemoryBarrier() const {
         return requiresBarrier_;
     }
     bool canonicalizeDoubles() const {
         return canonicalizeDoubles_;
     }
     MDefinition *elements() const {
@@ -8906,44 +8899,44 @@ class MLoadTypedArrayElement
     }
     int32_t offsetAdjustment() const {
         return offsetAdjustment_;
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
         // When a barrier is needed make the instruction effectful by
         // giving it a "store" effect.
         if (requiresBarrier_)
-            return AliasSet::Store(AliasSet::TypedArrayElement);
-        return AliasSet::Load(AliasSet::TypedArrayElement);
+            return AliasSet::Store(AliasSet::UnboxedElement);
+        return AliasSet::Load(AliasSet::UnboxedElement);
     }
 
     bool congruentTo(const MDefinition *ins) const MOZ_OVERRIDE {
         if (requiresBarrier_)
             return false;
-        if (!ins->isLoadTypedArrayElement())
-            return false;
-        const MLoadTypedArrayElement *other = ins->toLoadTypedArrayElement();
-        if (arrayType_ != other->arrayType_)
+        if (!ins->isLoadUnboxedScalar())
+            return false;
+        const MLoadUnboxedScalar *other = ins->toLoadUnboxedScalar();
+        if (indexType_ != other->indexType_)
             return false;
         if (readType_ != other->readType_)
             return false;
         if (offsetAdjustment() != other->offsetAdjustment())
             return false;
         if (canonicalizeDoubles() != other->canonicalizeDoubles())
             return false;
         return congruentIfOperandsEqual(other);
     }
 
     void printOpcode(FILE *fp) const MOZ_OVERRIDE;
 
     void computeRange(TempAllocator &alloc) MOZ_OVERRIDE;
 
-    bool canProduceFloat32() const MOZ_OVERRIDE { return arrayType_ == Scalar::Float32; }
-
-    ALLOW_CLONE(MLoadTypedArrayElement)
+    bool canProduceFloat32() const MOZ_OVERRIDE { return indexType_ == Scalar::Float32; }
+
+    ALLOW_CLONE(MLoadUnboxedScalar)
 };
 
 // Load a value from a typed array. Out-of-bounds accesses are handled in-line.
 class MLoadTypedArrayElementHole
   : public MBinaryInstruction,
     public SingleObjectPolicy::Data
 {
     Scalar::Type arrayType_;
@@ -8988,17 +8981,17 @@ class MLoadTypedArrayElementHole
         const MLoadTypedArrayElementHole *other = ins->toLoadTypedArrayElementHole();
         if (arrayType() != other->arrayType())
             return false;
         if (allowDouble() != other->allowDouble())
             return false;
         return congruentIfOperandsEqual(other);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Load(AliasSet::TypedArrayElement);
+        return AliasSet::Load(AliasSet::UnboxedElement);
     }
     bool canProduceFloat32() const MOZ_OVERRIDE { return arrayType_ == Scalar::Float32; }
 
     ALLOW_CLONE(MLoadTypedArrayElementHole)
 };
 
 // Load a value fallibly or infallibly from a statically known typed array.
 class MLoadTypedArrayElementStatic
@@ -9044,17 +9037,17 @@ class MLoadTypedArrayElementStatic
     void *base() const;
     size_t length() const;
 
     MDefinition *ptr() const { return getOperand(0); }
     int32_t offset() const { return offset_; }
     void setOffset(int32_t offset) { offset_ = offset; }
     bool congruentTo(const MDefinition *ins) const MOZ_OVERRIDE;
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Load(AliasSet::TypedArrayElement);
+        return AliasSet::Load(AliasSet::UnboxedElement);
     }
 
     bool needsBoundsCheck() const { return needsBoundsCheck_; }
     void setNeedsBoundsCheck(bool v) { needsBoundsCheck_ = v; }
 
     bool fallible() const {
         return fallible_;
     }
@@ -9064,23 +9057,23 @@ class MLoadTypedArrayElementStatic
     }
 
     void computeRange(TempAllocator &alloc) MOZ_OVERRIDE;
     bool needTruncation(TruncateKind kind) MOZ_OVERRIDE;
     bool canProduceFloat32() const MOZ_OVERRIDE { return accessType() == Scalar::Float32; }
     void collectRangeInfoPreTrunc() MOZ_OVERRIDE;
 };
 
-// Base class for MIR ops that write to typed arrays.
-class StoreTypedArrayBase
+// Base class for MIR ops that write unboxed scalar values.
+class StoreUnboxedScalarBase
 {
     Scalar::Type writeType_;
 
   protected:
-    explicit StoreTypedArrayBase(Scalar::Type writeType)
+    explicit StoreUnboxedScalarBase(Scalar::Type writeType)
       : writeType_(writeType)
     {
         MOZ_ASSERT(isIntegerWrite() || isFloatWrite() || isSimdWrite());
     }
 
   public:
     void setWriteType(Scalar::Type type) {
         writeType_ = type;
@@ -9104,104 +9097,97 @@ class StoreTypedArrayBase
         return writeType_ == Scalar::Float32 ||
                writeType_ == Scalar::Float64;
     }
     bool isSimdWrite() const {
         return Scalar::isSimdType(writeType());
     }
 };
 
-class MStoreTypedArrayElement
+// Store an unboxed scalar value to a typed array or other object.
+class MStoreUnboxedScalar
   : public MTernaryInstruction,
-    public StoreTypedArrayBase,
-    public StoreTypedArrayPolicy::Data
-{
-    Scalar::Type arrayType_;
+    public StoreUnboxedScalarBase,
+    public StoreUnboxedScalarPolicy::Data
+{
+    Scalar::Type indexType_;
     bool requiresBarrier_;
     int32_t offsetAdjustment_;
 
-    // See note in MStoreElementCommon.
-    bool racy_;
-
-    MStoreTypedArrayElement(MDefinition *elements, MDefinition *index, MDefinition *value,
-                            Scalar::Type arrayType, MemoryBarrierRequirement requiresBarrier,
-                            int32_t offsetAdjustment)
+    MStoreUnboxedScalar(MDefinition *elements, MDefinition *index, MDefinition *value,
+                        Scalar::Type indexType, MemoryBarrierRequirement requiresBarrier,
+                        int32_t offsetAdjustment)
       : MTernaryInstruction(elements, index, value),
-        StoreTypedArrayBase(arrayType),
-        arrayType_(arrayType),
+        StoreUnboxedScalarBase(indexType),
+        indexType_(indexType),
         requiresBarrier_(requiresBarrier == DoesRequireMemoryBarrier),
-        offsetAdjustment_(offsetAdjustment),
-        racy_(false)
+        offsetAdjustment_(offsetAdjustment)
     {
         if (requiresBarrier_)
             setGuard();         // Not removable or movable
         else
             setMovable();
         MOZ_ASSERT(IsValidElementsType(elements, offsetAdjustment));
         MOZ_ASSERT(index->type() == MIRType_Int32);
-        MOZ_ASSERT(arrayType >= 0 && arrayType < Scalar::MaxTypedArrayViewType);
-    }
-
-  public:
-    INSTRUCTION_HEADER(StoreTypedArrayElement)
-
-    static MStoreTypedArrayElement *New(TempAllocator &alloc, MDefinition *elements, MDefinition *index,
-                                        MDefinition *value, Scalar::Type arrayType,
-                                        MemoryBarrierRequirement requiresBarrier = DoesNotRequireMemoryBarrier,
-                                        int32_t offsetAdjustment = 0)
-    {
-        return new(alloc) MStoreTypedArrayElement(elements, index, value, arrayType,
-                                                  requiresBarrier, offsetAdjustment);
-    }
-
-    Scalar::Type arrayType() const {
-        return arrayType_;
+        MOZ_ASSERT(indexType >= 0 && indexType < Scalar::MaxTypedArrayViewType);
+    }
+
+  public:
+    INSTRUCTION_HEADER(StoreUnboxedScalar)
+
+    static MStoreUnboxedScalar *New(TempAllocator &alloc,
+                                    MDefinition *elements, MDefinition *index,
+                                    MDefinition *value, Scalar::Type indexType,
+                                    MemoryBarrierRequirement requiresBarrier =
+                                        DoesNotRequireMemoryBarrier,
+                                    int32_t offsetAdjustment = 0)
+    {
+        return new(alloc) MStoreUnboxedScalar(elements, index, value, indexType,
+                                              requiresBarrier, offsetAdjustment);
+    }
+
+    Scalar::Type indexType() const {
+        return indexType_;
     }
     MDefinition *elements() const {
         return getOperand(0);
     }
     MDefinition *index() const {
         return getOperand(1);
     }
     MDefinition *value() const {
         return getOperand(2);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
     bool requiresMemoryBarrier() const {
         return requiresBarrier_;
     }
     int32_t offsetAdjustment() const {
         return offsetAdjustment_;
     }
-    bool racy() const {
-        return racy_;
-    }
-    void setRacy() {
-        racy_ = true;
-    }
     TruncateKind operandTruncateKind(size_t index) const MOZ_OVERRIDE;
 
     bool canConsumeFloat32(MUse *use) const MOZ_OVERRIDE {
-        return use == getUseFor(2) && arrayType_ == Scalar::Float32;
-    }
-
-    ALLOW_CLONE(MStoreTypedArrayElement)
+        return use == getUseFor(2) && writeType() == Scalar::Float32;
+    }
+
+    ALLOW_CLONE(MStoreUnboxedScalar)
 };
 
 class MStoreTypedArrayElementHole
   : public MAryInstruction<4>,
-    public StoreTypedArrayBase,
+    public StoreUnboxedScalarBase,
     public StoreTypedArrayHolePolicy::Data
 {
     MStoreTypedArrayElementHole(MDefinition *elements, MDefinition *length, MDefinition *index,
                                 MDefinition *value, Scalar::Type arrayType)
       : MAryInstruction<4>(),
-        StoreTypedArrayBase(arrayType)
+        StoreUnboxedScalarBase(arrayType)
     {
         initOperand(0, elements);
         initOperand(1, length);
         initOperand(2, index);
         initOperand(3, value);
         setMovable();
         MOZ_ASSERT(elements->type() == MIRType_Elements);
         MOZ_ASSERT(length->type() == MIRType_Int32);
@@ -9232,37 +9218,37 @@ class MStoreTypedArrayElementHole
     }
     MDefinition *index() const {
         return getOperand(2);
     }
     MDefinition *value() const {
         return getOperand(3);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
     TruncateKind operandTruncateKind(size_t index) const MOZ_OVERRIDE;
 
     bool canConsumeFloat32(MUse *use) const MOZ_OVERRIDE {
         return use == getUseFor(3) && arrayType() == Scalar::Float32;
     }
 
     ALLOW_CLONE(MStoreTypedArrayElementHole)
 };
 
 // Store a value infallibly to a statically known typed array.
 class MStoreTypedArrayElementStatic :
     public MBinaryInstruction,
-    public StoreTypedArrayBase,
+    public StoreUnboxedScalarBase,
     public StoreTypedArrayElementStaticPolicy::Data
 {
     MStoreTypedArrayElementStatic(JSObject *someTypedArray, MDefinition *ptr, MDefinition *v,
                                   int32_t offset, bool needsBoundsCheck)
         : MBinaryInstruction(ptr, v),
-          StoreTypedArrayBase(AnyTypedArrayType(someTypedArray)),
+          StoreUnboxedScalarBase(AnyTypedArrayType(someTypedArray)),
           someTypedArray_(someTypedArray),
           offset_(offset), needsBoundsCheck_(needsBoundsCheck)
     {}
 
     AlwaysTenured<JSObject*> someTypedArray_;
 
     // An offset to be encoded in the store instruction - taking advantage of the
     // addressing modes. This is only non-zero when the access is proven to be
@@ -9291,17 +9277,17 @@ class MStoreTypedArrayElementStatic :
 
     MDefinition *ptr() const { return getOperand(0); }
     MDefinition *value() const { return getOperand(1); }
     bool needsBoundsCheck() const { return needsBoundsCheck_; }
     void setNeedsBoundsCheck(bool v) { needsBoundsCheck_ = v; }
     int32_t offset() const { return offset_; }
     void setOffset(int32_t offset) { offset_ = offset; }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
     TruncateKind operandTruncateKind(size_t index) const MOZ_OVERRIDE;
 
     bool canConsumeFloat32(MUse *use) const MOZ_OVERRIDE {
         return use == getUseFor(1) && accessType() == Scalar::Float32;
     }
     void collectRangeInfoPreTrunc() MOZ_OVERRIDE;
 };
@@ -9718,18 +9704,20 @@ class MGetPropertyPolymorphic
     }
     PropertyName *name() const {
         return name_;
     }
     MDefinition *obj() const {
         return getOperand(0);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Load(AliasSet::ObjectFields | AliasSet::FixedSlot | AliasSet::DynamicSlot |
-                              (unboxedGroups_.empty() ? 0 : (AliasSet::TypedArrayElement | AliasSet::Element)));
+        return AliasSet::Load(AliasSet::ObjectFields |
+                              AliasSet::FixedSlot |
+                              AliasSet::DynamicSlot |
+                              (!unboxedGroups_.empty() ? AliasSet::UnboxedElement : 0));
     }
 
     bool mightAlias(const MDefinition *store) const MOZ_OVERRIDE;
 };
 
 // Emit code to store a value to an object's slots if its shape/group matches
 // one of the shapes/groups observed by the baseline IC, else bails out.
 class MSetPropertyPolymorphic
@@ -9802,18 +9790,20 @@ class MSetPropertyPolymorphic
     }
     bool needsBarrier() const {
         return needsBarrier_;
     }
     void setNeedsBarrier() {
         needsBarrier_ = true;
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::ObjectFields | AliasSet::FixedSlot | AliasSet::DynamicSlot |
-                               (unboxedGroups_.empty() ? 0 : (AliasSet::TypedArrayElement | AliasSet::Element)));
+        return AliasSet::Store(AliasSet::ObjectFields |
+                               AliasSet::FixedSlot |
+                               AliasSet::DynamicSlot |
+                               (!unboxedGroups_.empty() ? AliasSet::UnboxedElement : 0));
     }
 };
 
 class MDispatchInstruction
   : public MControlInstruction,
     public SingleObjectPolicy::Data
 {
     // Map from JSFunction* -> MBasicBlock.
@@ -12223,18 +12213,18 @@ class MRecompileCheck : public MNullaryI
     }
 
     AliasSet getAliasSet() const MOZ_OVERRIDE {
         return AliasSet::None();
     }
 };
 
 // All barriered operations - MMemoryBarrier, MCompareExchangeTypedArrayElement,
-// and MAtomicTypedArrayElementBinop, as well as MLoadTypedArrayElement and
-// MStoreTypedArrayElement when they are marked as requiring a memory barrer - have
+// and MAtomicTypedArrayElementBinop, as well as MLoadUnboxedScalar and
+// MStoreUnboxedSclaar when they are marked as requiring a memory barrer - have
 // the following attributes:
 //
 // - Not movable
 // - Not removable
 // - Not congruent with any other instruction
 // - Effectful (they alias every TypedArray store)
 //
 // The intended effect of those constraints is to prevent all loads
@@ -12261,17 +12251,17 @@ class MMemoryBarrier
     static MMemoryBarrier *New(TempAllocator &alloc, MemoryBarrierBits type = MembarFull) {
         return new(alloc) MMemoryBarrier(type);
     }
     MemoryBarrierBits type() const {
         return type_;
     }
 
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
 };
 
 class MCompareExchangeTypedArrayElement
   : public MAryInstruction<4>,
     public Mix4Policy<ObjectPolicy<0>, IntPolicy<1>, IntPolicy<2>, IntPolicy<3>>::Data
 {
     Scalar::Type arrayType_;
@@ -12316,17 +12306,17 @@ class MCompareExchangeTypedArrayElement
     }
     MDefinition *newval() {
         return getOperand(3);
     }
     Scalar::Type arrayType() const {
         return arrayType_;
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
 };
 
 class MAtomicTypedArrayElementBinop
     : public MAryInstruction<3>,
       public Mix3Policy< ObjectPolicy<0>, IntPolicy<1>, IntPolicy<2> >::Data
 {
   private:
@@ -12371,17 +12361,17 @@ class MAtomicTypedArrayElementBinop
     }
     MDefinition *index() {
         return getOperand(1);
     }
     MDefinition *value() {
         return getOperand(2);
     }
     AliasSet getAliasSet() const MOZ_OVERRIDE {
-        return AliasSet::Store(AliasSet::TypedArrayElement);
+        return AliasSet::Store(AliasSet::UnboxedElement);
     }
 };
 
 class MDebugger : public MNullaryInstruction
 {
   public:
     INSTRUCTION_HEADER(Debugger)
 
--- a/js/src/jit/MOpcodes.h
+++ b/js/src/jit/MOpcodes.h
@@ -174,31 +174,31 @@ namespace jit {
     _(InitializedLength)                                                    \
     _(SetInitializedLength)                                                 \
     _(Not)                                                                  \
     _(BoundsCheck)                                                          \
     _(BoundsCheckLower)                                                     \
     _(InArray)                                                              \
     _(LoadElement)                                                          \
     _(LoadElementHole)                                                      \
+    _(LoadUnboxedScalar)                                                    \
     _(LoadUnboxedObjectOrNull)                                              \
     _(LoadUnboxedString)                                                    \
     _(StoreElement)                                                         \
     _(StoreElementHole)                                                     \
+    _(StoreUnboxedScalar)                                                   \
     _(StoreUnboxedObjectOrNull)                                             \
     _(StoreUnboxedString)                                                   \
     _(ConvertUnboxedObjectToNative)                                         \
     _(ArrayPopShift)                                                        \
     _(ArrayPush)                                                            \
     _(ArrayConcat)                                                          \
     _(ArrayJoin)                                                            \
-    _(LoadTypedArrayElement)                                                \
     _(LoadTypedArrayElementHole)                                            \
     _(LoadTypedArrayElementStatic)                                          \
-    _(StoreTypedArrayElement)                                               \
     _(StoreTypedArrayElementHole)                                           \
     _(StoreTypedArrayElementStatic)                                         \
     _(CompareExchangeTypedArrayElement)                                     \
     _(AtomicTypedArrayElementBinop)                                         \
     _(EffectiveAddress)                                                     \
     _(ClampToUint8)                                                         \
     _(LoadFixedSlot)                                                        \
     _(StoreFixedSlot)                                                       \
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -342,17 +342,17 @@ MacroAssembler::loadFromTypedArray(Scala
       case Scalar::Uint32:
         if (dest.isFloat()) {
             load32(src, temp);
             convertUInt32ToDouble(temp, dest.fpu());
         } else {
             load32(src, dest.gpr());
 
             // Bail out if the value doesn't fit into a signed int32 value. This
-            // is what allows MLoadTypedArrayElement to have a type() of
+            // is what allows MLoadUnboxedScalar to have a type() of
             // MIRType_Int32 for UInt32 array loads.
             branchTest32(Assembler::Signed, dest.gpr(), dest.gpr(), fail);
         }
         break;
       case Scalar::Float32:
         loadFloat32(src, dest.fpu());
         canonicalizeFloat(dest.fpu());
         break;
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -1673,17 +1673,17 @@ GetTypedArrayRange(TempAllocator &alloc,
       case Scalar::Int32x4:
       case Scalar::MaxTypedArrayViewType:
         break;
     }
     return nullptr;
 }
 
 void
-MLoadTypedArrayElement::computeRange(TempAllocator &alloc)
+MLoadUnboxedScalar::computeRange(TempAllocator &alloc)
 {
     // We have an Int32 type and if this is a UInt32 load it may produce a value
     // outside of our range, but we have a bailout to handle those cases.
     setRange(GetTypedArrayRange(alloc, readType()));
 }
 
 void
 MLoadTypedArrayElementStatic::computeRange(TempAllocator &alloc)
@@ -2637,17 +2637,17 @@ MMul::operandTruncateKind(size_t index) 
 MDefinition::TruncateKind
 MToDouble::operandTruncateKind(size_t index) const
 {
     // MToDouble propagates its truncate kind to its operand.
     return truncateKind();
 }
 
 MDefinition::TruncateKind
-MStoreTypedArrayElement::operandTruncateKind(size_t index) const
+MStoreUnboxedScalar::operandTruncateKind(size_t index) const
 {
     // An integer store truncates the stored value.
     return index == 2 && isIntegerWrite() ? Truncate : NoTruncate;
 }
 
 MDefinition::TruncateKind
 MStoreTypedArrayElementHole::operandTruncateKind(size_t index) const
 {
--- a/js/src/jit/TypePolicy.cpp
+++ b/js/src/jit/TypePolicy.cpp
@@ -871,18 +871,19 @@ InstanceOfPolicy::adjustInputs(TempAlloc
     // Box first operand if it isn't object
     if (def->getOperand(0)->type() != MIRType_Object)
         BoxPolicy<0>::staticAdjustInputs(alloc, def);
 
     return true;
 }
 
 bool
-StoreTypedArrayPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
-                                        Scalar::Type writeType, MDefinition *value, int valueOperand)
+StoreUnboxedScalarPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
+                                           Scalar::Type writeType, MDefinition *value,
+                                           int valueOperand)
 {
     // Storing a SIMD value just implies that we might need a SimdUnbox.
     if (Scalar::isSimdType(writeType))
         return MaybeSimdUnbox(alloc, ins, ScalarTypeToMIRType(writeType), valueOperand);
 
     MDefinition *curValue = value;
     // First, ensure the value is int32, boolean, double or Value.
     // The conversion is based on TypedArrayObjectTemplate::setElementTail.
@@ -957,45 +958,45 @@ StoreTypedArrayPolicy::adjustValueInput(
 
     if (value != curValue)
         ins->replaceOperand(valueOperand, value);
 
     return true;
 }
 
 bool
-StoreTypedArrayPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
+StoreUnboxedScalarPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
 {
     SingleObjectPolicy::staticAdjustInputs(alloc, ins);
 
-    MStoreTypedArrayElement *store = ins->toStoreTypedArrayElement();
+    MStoreUnboxedScalar *store = ins->toStoreUnboxedScalar();
     MOZ_ASSERT(IsValidElementsType(store->elements(), store->offsetAdjustment()));
     MOZ_ASSERT(store->index()->type() == MIRType_Int32);
 
     return adjustValueInput(alloc, store, store->writeType(), store->value(), 2);
 }
 
 bool
 StoreTypedArrayHolePolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
 {
     MStoreTypedArrayElementHole *store = ins->toStoreTypedArrayElementHole();
     MOZ_ASSERT(store->elements()->type() == MIRType_Elements);
     MOZ_ASSERT(store->index()->type() == MIRType_Int32);
     MOZ_ASSERT(store->length()->type() == MIRType_Int32);
 
-    return StoreTypedArrayPolicy::adjustValueInput(alloc, ins, store->arrayType(), store->value(), 3);
+    return StoreUnboxedScalarPolicy::adjustValueInput(alloc, ins, store->arrayType(), store->value(), 3);
 }
 
 bool
 StoreTypedArrayElementStaticPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
 {
     MStoreTypedArrayElementStatic *store = ins->toStoreTypedArrayElementStatic();
 
     return ConvertToInt32Policy<0>::staticAdjustInputs(alloc, ins) &&
-        StoreTypedArrayPolicy::adjustValueInput(alloc, ins, store->accessType(), store->value(), 1);
+        StoreUnboxedScalarPolicy::adjustValueInput(alloc, ins, store->accessType(), store->value(), 1);
 }
 
 bool
 StoreUnboxedObjectOrNullPolicy::adjustInputs(TempAllocator &alloc, MInstruction *ins)
 {
     SingleObjectPolicy::staticAdjustInputs(alloc, ins);
 
     // Change the value input to a ToObjectOrNull instruction if it might be
@@ -1112,17 +1113,17 @@ FilterTypeSetPolicy::adjustInputs(TempAl
     _(FilterTypeSetPolicy)                      \
     _(InstanceOfPolicy)                         \
     _(PowPolicy)                                \
     _(SimdAllPolicy)                            \
     _(SimdSelectPolicy)                         \
     _(SimdSwizzlePolicy)                        \
     _(StoreTypedArrayElementStaticPolicy)       \
     _(StoreTypedArrayHolePolicy)                \
-    _(StoreTypedArrayPolicy)                    \
+    _(StoreUnboxedScalarPolicy)                 \
     _(StoreUnboxedObjectOrNullPolicy)           \
     _(TestPolicy)                               \
     _(AllDoublePolicy)                          \
     _(ToDoublePolicy)                           \
     _(ToInt32Policy)                            \
     _(ToStringPolicy)                           \
     _(TypeBarrierPolicy)
 
--- a/js/src/jit/TypePolicy.h
+++ b/js/src/jit/TypePolicy.h
@@ -434,38 +434,38 @@ class InstanceOfPolicy MOZ_FINAL : publi
   public:
     EMPTY_DATA_;
     virtual bool adjustInputs(TempAllocator &alloc, MInstruction *def) MOZ_OVERRIDE;
 };
 
 class StoreTypedArrayHolePolicy;
 class StoreTypedArrayElementStaticPolicy;
 
-class StoreTypedArrayPolicy : public TypePolicy
+class StoreUnboxedScalarPolicy : public TypePolicy
 {
   private:
     static bool adjustValueInput(TempAllocator &alloc, MInstruction *ins, Scalar::Type arrayType,
                                  MDefinition *value, int valueOperand);
 
     friend class StoreTypedArrayHolePolicy;
     friend class StoreTypedArrayElementStaticPolicy;
 
   public:
     EMPTY_DATA_;
     virtual bool adjustInputs(TempAllocator &alloc, MInstruction *ins) MOZ_OVERRIDE;
 };
 
-class StoreTypedArrayHolePolicy MOZ_FINAL : public StoreTypedArrayPolicy
+class StoreTypedArrayHolePolicy MOZ_FINAL : public StoreUnboxedScalarPolicy
 {
   public:
     EMPTY_DATA_;
     virtual bool adjustInputs(TempAllocator &alloc, MInstruction *ins) MOZ_OVERRIDE;
 };
 
-class StoreTypedArrayElementStaticPolicy MOZ_FINAL : public StoreTypedArrayPolicy
+class StoreTypedArrayElementStaticPolicy MOZ_FINAL : public StoreUnboxedScalarPolicy
 {
   public:
     EMPTY_DATA_;
     virtual bool adjustInputs(TempAllocator &alloc, MInstruction *ins) MOZ_OVERRIDE;
 };
 
 class StoreUnboxedObjectOrNullPolicy MOZ_FINAL : public TypePolicy
 {