Bug 1146295: Rename SimdTypeDescr::TYPE_SCALAR into SimdTypeDescr::TypeXn; r=h4writer
authorBenjamin Bouvier <benj@benj.me>
Mon, 23 Mar 2015 11:55:15 +0100
changeset 266576 57bd743ef57b9351edda09b932d548aa8390f062
parent 266575 701309c14003983b8e4bd12a3c336aaa099c9476
child 266577 98cf094bbc05aabe17ce31160da27bc119a630d7
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1146295
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 1146295: Rename SimdTypeDescr::TYPE_SCALAR into SimdTypeDescr::TypeXn; r=h4writer
js/src/builtin/SIMD.cpp
js/src/builtin/SIMD.h
js/src/builtin/TypedObject.h
js/src/jit/CodeGenerator.cpp
js/src/jit/EagerSimdUnbox.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/MCallOptimize.cpp
js/src/jit/Recover.cpp
--- a/js/src/builtin/SIMD.cpp
+++ b/js/src/builtin/SIMD.cpp
@@ -185,33 +185,33 @@ const Class SimdTypeDescr::class_ = {
     call
 };
 
 namespace {
 
 // These classes just exist to group together various properties and so on.
 class Int32x4Defn {
   public:
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_INT32;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Int32x4;
     static const JSFunctionSpec TypeDescriptorMethods[];
     static const JSPropertySpec TypedObjectProperties[];
     static const JSFunctionSpec TypedObjectMethods[];
     static const JSFunctionSpec Methods[];
 };
 class Float32x4Defn {
   public:
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_FLOAT32;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Float32x4;
     static const JSFunctionSpec TypeDescriptorMethods[];
     static const JSPropertySpec TypedObjectProperties[];
     static const JSFunctionSpec TypedObjectMethods[];
     static const JSFunctionSpec Methods[];
 };
 class Float64x2Defn {
   public:
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_FLOAT64;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Float64x2;
     static const JSFunctionSpec TypeDescriptorMethods[];
     static const JSPropertySpec TypedObjectProperties[];
     static const JSFunctionSpec TypedObjectMethods[];
     static const JSFunctionSpec Methods[];
 };
 
 }
 
@@ -386,19 +386,19 @@ SimdTypeDescr::call(JSContext *cx, unsig
     MOZ_ASSERT(size_t(static_cast<TypeDescr*>(descr)->size()) <= InlineTypedObject::MaximumSize,
                "inline storage is needed for using InternalHandle belows");
 
     Rooted<TypedObject*> result(cx, TypedObject::createZeroed(cx, descr, 0));
     if (!result)
         return false;
 
     switch (descr->type()) {
-      case SimdTypeDescr::TYPE_INT32:   return FillLanes<Int32x4>(cx, result, args);
-      case SimdTypeDescr::TYPE_FLOAT32: return FillLanes<Float32x4>(cx, result, args);
-      case SimdTypeDescr::TYPE_FLOAT64: return FillLanes<Float64x2>(cx, result, args);
+      case SimdTypeDescr::Int32x4:   return FillLanes< ::Int32x4>(cx, result, args);
+      case SimdTypeDescr::Float32x4: return FillLanes< ::Float32x4>(cx, result, args);
+      case SimdTypeDescr::Float64x2: return FillLanes< ::Float64x2>(cx, result, args);
     }
 
     MOZ_CRASH("unexpected SIMD descriptor");
     return false;
 }
 
 ///////////////////////////////////////////////////////////////////////////
 // SIMD class
--- a/js/src/builtin/SIMD.h
+++ b/js/src/builtin/SIMD.h
@@ -270,17 +270,17 @@ class SIMDObject : public JSObject
     static bool toString(JSContext *cx, unsigned int argc, jsval *vp);
 };
 
 // These classes exist for use with templates below.
 
 struct Float32x4 {
     typedef float Elem;
     static const unsigned lanes = 4;
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_FLOAT32;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Float32x4;
 
     static TypeDescr &GetTypeDescr(GlobalObject &global) {
         return global.float32x4TypeDescr().as<TypeDescr>();
     }
     static Elem toType(Elem a) {
         return a;
     }
     static bool toType(JSContext *cx, JS::HandleValue v, Elem *out) {
@@ -293,17 +293,17 @@ struct Float32x4 {
     static void setReturn(CallArgs &args, Elem value) {
         args.rval().setDouble(JS::CanonicalizeNaN(value));
     }
 };
 
 struct Float64x2 {
     typedef double Elem;
     static const unsigned lanes = 2;
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_FLOAT64;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Float64x2;
 
     static TypeDescr &GetTypeDescr(GlobalObject &global) {
         return global.float64x2TypeDescr().as<TypeDescr>();
     }
     static Elem toType(Elem a) {
         return a;
     }
     static bool toType(JSContext *cx, JS::HandleValue v, Elem *out) {
@@ -312,17 +312,17 @@ struct Float64x2 {
     static void setReturn(CallArgs &args, Elem value) {
         args.rval().setDouble(JS::CanonicalizeNaN(value));
     }
 };
 
 struct Int32x4 {
     typedef int32_t Elem;
     static const unsigned lanes = 4;
-    static const SimdTypeDescr::Type type = SimdTypeDescr::TYPE_INT32;
+    static const SimdTypeDescr::Type type = SimdTypeDescr::Int32x4;
 
     static TypeDescr &GetTypeDescr(GlobalObject &global) {
         return global.int32x4TypeDescr().as<TypeDescr>();
     }
     static Elem toType(Elem a) {
         return JS::ToInt32(a);
     }
     static bool toType(JSContext *cx, JS::HandleValue v, Elem *out) {
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -326,20 +326,20 @@ class ComplexTypeDescr : public TypeDesc
 
 /*
  * Type descriptors `float32x4`, `int32x4` and `float64x2`
  */
 class SimdTypeDescr : public ComplexTypeDescr
 {
   public:
     enum Type {
-        TYPE_INT32 = JS_SIMDTYPEREPR_INT32,
-        TYPE_FLOAT32 = JS_SIMDTYPEREPR_FLOAT32,
-        TYPE_FLOAT64 = JS_SIMDTYPEREPR_FLOAT64,
-        LAST_TYPE = TYPE_FLOAT64
+        Int32x4 = JS_SIMDTYPEREPR_INT32,
+        Float32x4 = JS_SIMDTYPEREPR_FLOAT32,
+        Float64x2 = JS_SIMDTYPEREPR_FLOAT64,
+        LAST_TYPE = Float64x2
     };
 
     static const type::Kind Kind = type::Simd;
     static const bool Opaque = false;
     static const Class class_;
     static int32_t size(Type t);
     static int32_t alignment(Type t);
     static int32_t lanes(Type t);
@@ -347,20 +347,20 @@ class SimdTypeDescr : public ComplexType
     SimdTypeDescr::Type type() const {
         return (SimdTypeDescr::Type) getReservedSlot(JS_DESCR_SLOT_TYPE).toInt32();
     }
 
     static bool call(JSContext *cx, unsigned argc, Value *vp);
     static bool is(const Value &v);
 };
 
-#define JS_FOR_EACH_SIMD_TYPE_REPR(macro_)                             \
-    macro_(SimdTypeDescr::TYPE_INT32, int32_t, int32, 4)               \
-    macro_(SimdTypeDescr::TYPE_FLOAT32, float, float32, 4)             \
-    macro_(SimdTypeDescr::TYPE_FLOAT64, double, float64, 2)
+#define JS_FOR_EACH_SIMD_TYPE_REPR(macro_)               \
+    macro_(SimdTypeDescr::Int32x4, int32_t, int32, 4)    \
+    macro_(SimdTypeDescr::Float32x4, float, float32, 4)  \
+    macro_(SimdTypeDescr::Float64x2, double, float64, 2)
 
 bool IsTypedObjectClass(const Class *clasp); // Defined below
 bool IsTypedObjectArray(JSObject& obj);
 
 bool CreateUserSizeAndAlignmentProperties(JSContext *cx, HandleTypeDescr obj);
 
 class ArrayTypeDescr;
 
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -4530,20 +4530,20 @@ CodeGenerator::visitSimdUnbox(LSimdUnbox
     masm.assertTestInt32(Assembler::Equal, typeDescrKind,
       "MOZ_ASSERT(obj->type()->typeDescr()->getReservedSlot(JS_DESCR_SLOT_KIND).isInt32())");
     masm.branch32(Assembler::NotEqual, masm.ToPayload(typeDescrKind), Imm32(js::type::Simd), &bail);
 
     // Convert the SIMD MIRType to a SimdTypeDescr::Type.
     js::SimdTypeDescr::Type type;
     switch (lir->mir()->type()) {
       case MIRType_Int32x4:
-        type = js::SimdTypeDescr::TYPE_INT32;
+        type = js::SimdTypeDescr::Int32x4;
         break;
       case MIRType_Float32x4:
-        type = js::SimdTypeDescr::TYPE_FLOAT32;
+        type = js::SimdTypeDescr::Float32x4;
         break;
       default:
         MOZ_CRASH("Unexpected SIMD Type.");
     }
 
     // Check if the SimdTypeDescr /Type/ match the specialization of this
     // MSimdUnbox instruction.
     static_assert(JS_DESCR_SLOT_TYPE < NativeObject::MAX_FIXED_SLOTS, "Load from fixed slots");
--- a/js/src/jit/EagerSimdUnbox.cpp
+++ b/js/src/jit/EagerSimdUnbox.cpp
@@ -13,18 +13,18 @@
 namespace js {
 namespace jit {
 
 static SimdTypeDescr::Type
 MIRTypeToSimdTypeDescr(MIRType type)
 {
     MOZ_ASSERT(IsSimdType(type));
     switch (type) {
-      case MIRType_Float32x4:   return SimdTypeDescr::TYPE_FLOAT32;
-      case MIRType_Int32x4:     return SimdTypeDescr::TYPE_INT32;
+      case MIRType_Float32x4:   return SimdTypeDescr::Float32x4;
+      case MIRType_Int32x4:     return SimdTypeDescr::Int32x4;
       default:                  break;
     }
     MOZ_CRASH("unexpected MIRType");
 }
 
 // Do not optimize any Phi instruction which has conflicting Unbox operations,
 // as this might imply some intended polymorphism.
 static bool
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -10249,19 +10249,19 @@ IonBuilder::getPropTryConstant(bool *emi
     *emitted = true;
     return true;
 }
 
 MIRType
 IonBuilder::SimdTypeDescrToMIRType(SimdTypeDescr::Type type)
 {
     switch (type) {
-      case SimdTypeDescr::TYPE_INT32:   return MIRType_Int32x4;
-      case SimdTypeDescr::TYPE_FLOAT32: return MIRType_Float32x4;
-      case SimdTypeDescr::TYPE_FLOAT64: return MIRType_Undefined;
+      case SimdTypeDescr::Int32x4:   return MIRType_Int32x4;
+      case SimdTypeDescr::Float32x4: return MIRType_Float32x4;
+      case SimdTypeDescr::Float64x2: return MIRType_Undefined;
     }
     MOZ_CRASH("unimplemented MIR type for a SimdTypeDescr::Type");
 }
 
 bool
 IonBuilder::getPropTrySimdGetter(bool *emitted, MDefinition *obj, PropertyName *name)
 {
     MOZ_ASSERT(!*emitted);
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -258,150 +258,150 @@ IonBuilder::inlineNativeCall(CallInfo &c
     // Bound function
     if (native == js::CallOrConstructBoundFunction)
         return inlineBoundFunction(callInfo, target);
 
     // Simd functions
 #define INLINE_FLOAT32X4_SIMD_ARITH_(OP)                                                         \
     if (native == js::simd_float32x4_##OP)                                                       \
         return inlineBinarySimd<MSimdBinaryArith>(callInfo, native, MSimdBinaryArith::Op_##OP,   \
-                                                  SimdTypeDescr::TYPE_FLOAT32);
+                                                  SimdTypeDescr::Float32x4);
 
 #define INLINE_INT32X4_SIMD_ARITH_(OP)                                                           \
     if (native == js::simd_int32x4_##OP)                                                         \
         return inlineBinarySimd<MSimdBinaryArith>(callInfo, native, MSimdBinaryArith::Op_##OP,   \
-                                                  SimdTypeDescr::TYPE_INT32);
+                                                  SimdTypeDescr::Int32x4);
 
     ARITH_COMMONX4_SIMD_OP(INLINE_INT32X4_SIMD_ARITH_)
     ARITH_COMMONX4_SIMD_OP(INLINE_FLOAT32X4_SIMD_ARITH_)
     BINARY_ARITH_FLOAT32X4_SIMD_OP(INLINE_FLOAT32X4_SIMD_ARITH_)
 #undef INLINE_SIMD_ARITH_
 #undef INLINE_FLOAT32X4_SIMD_ARITH_
 
 #define INLINE_SIMD_BITWISE_(OP)                                                                 \
     if (native == js::simd_int32x4_##OP)                                                         \
         return inlineBinarySimd<MSimdBinaryBitwise>(callInfo, native, MSimdBinaryBitwise::OP##_, \
-                                                    SimdTypeDescr::TYPE_INT32);                  \
+                                                    SimdTypeDescr::Int32x4);                     \
     if (native == js::simd_float32x4_##OP)                                                       \
         return inlineBinarySimd<MSimdBinaryBitwise>(callInfo, native, MSimdBinaryBitwise::OP##_, \
-                                                    SimdTypeDescr::TYPE_FLOAT32);
+                                                    SimdTypeDescr::Float32x4);
 
     BITWISE_COMMONX4_SIMD_OP(INLINE_SIMD_BITWISE_)
 #undef INLINE_SIMD_BITWISE_
 
 #define INLINE_SIMD_COMPARISON_(OP)                                                                \
     if (native == js::simd_int32x4_##OP)                                                           \
-        return inlineCompSimd(callInfo, native, MSimdBinaryComp::OP, SimdTypeDescr::TYPE_INT32);   \
+        return inlineCompSimd(callInfo, native, MSimdBinaryComp::OP, SimdTypeDescr::Int32x4);      \
     if (native == js::simd_float32x4_##OP)                                                         \
-        return inlineCompSimd(callInfo, native, MSimdBinaryComp::OP, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineCompSimd(callInfo, native, MSimdBinaryComp::OP, SimdTypeDescr::Float32x4);
 
     COMP_COMMONX4_TO_INT32X4_SIMD_OP(INLINE_SIMD_COMPARISON_)
 #undef INLINE_SIMD_COMPARISON_
 
 #define INLINE_SIMD_SETTER_(LANE)                                                                   \
     if (native == js::simd_int32x4_with##LANE)                                                      \
-        return inlineSimdWith(callInfo, native, SimdLane::Lane##LANE, SimdTypeDescr::TYPE_INT32);   \
+        return inlineSimdWith(callInfo, native, SimdLane::Lane##LANE, SimdTypeDescr::Int32x4);      \
     if (native == js::simd_float32x4_with##LANE)                                                    \
-        return inlineSimdWith(callInfo, native, SimdLane::Lane##LANE, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdWith(callInfo, native, SimdLane::Lane##LANE, SimdTypeDescr::Float32x4);
 
     INLINE_SIMD_SETTER_(X)
     INLINE_SIMD_SETTER_(Y)
     INLINE_SIMD_SETTER_(Z)
     INLINE_SIMD_SETTER_(W)
 #undef INLINE_SIMD_SETTER_
 
     if (native == js::simd_int32x4_not)
-        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::not_, SimdTypeDescr::TYPE_INT32);
+        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::not_, SimdTypeDescr::Int32x4);
     if (native == js::simd_int32x4_neg)
-        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::neg, SimdTypeDescr::TYPE_INT32);
+        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::neg, SimdTypeDescr::Int32x4);
 
 #define INLINE_SIMD_FLOAT32X4_UNARY_(OP)                                                           \
     if (native == js::simd_float32x4_##OP)                                                         \
-        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::OP, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::OP, SimdTypeDescr::Float32x4);
 
     UNARY_ARITH_FLOAT32X4_SIMD_OP(INLINE_SIMD_FLOAT32X4_UNARY_)
     INLINE_SIMD_FLOAT32X4_UNARY_(neg)
 #undef INLINE_SIMD_FLOAT32X4_UNARY_
 
     if (native == js::simd_float32x4_not)
-        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::not_, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineUnarySimd(callInfo, native, MSimdUnaryArith::not_, SimdTypeDescr::Float32x4);
 
     typedef bool IsCast;
     if (native == js::simd_float32x4_fromInt32x4)
-        return inlineSimdConvert(callInfo, native, IsCast(false), SimdTypeDescr::TYPE_INT32, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdConvert(callInfo, native, IsCast(false), SimdTypeDescr::Int32x4, SimdTypeDescr::Float32x4);
     if (native == js::simd_int32x4_fromFloat32x4)
-        return inlineSimdConvert(callInfo, native, IsCast(false), SimdTypeDescr::TYPE_FLOAT32, SimdTypeDescr::TYPE_INT32);
+        return inlineSimdConvert(callInfo, native, IsCast(false), SimdTypeDescr::Float32x4, SimdTypeDescr::Int32x4);
     if (native == js::simd_float32x4_fromInt32x4Bits)
-        return inlineSimdConvert(callInfo, native, IsCast(true), SimdTypeDescr::TYPE_INT32, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdConvert(callInfo, native, IsCast(true), SimdTypeDescr::Int32x4, SimdTypeDescr::Float32x4);
     if (native == js::simd_int32x4_fromFloat32x4Bits)
-        return inlineSimdConvert(callInfo, native, IsCast(true), SimdTypeDescr::TYPE_FLOAT32, SimdTypeDescr::TYPE_INT32);
+        return inlineSimdConvert(callInfo, native, IsCast(true), SimdTypeDescr::Float32x4, SimdTypeDescr::Int32x4);
 
     if (native == js::simd_int32x4_splat)
-        return inlineSimdSplat(callInfo, native, SimdTypeDescr::TYPE_INT32);
+        return inlineSimdSplat(callInfo, native, SimdTypeDescr::Int32x4);
     if (native == js::simd_float32x4_splat)
-        return inlineSimdSplat(callInfo, native, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdSplat(callInfo, native, SimdTypeDescr::Float32x4);
 
     if (native == js::simd_int32x4_check)
-        return inlineSimdCheck(callInfo, native, SimdTypeDescr::TYPE_INT32);
+        return inlineSimdCheck(callInfo, native, SimdTypeDescr::Int32x4);
     if (native == js::simd_float32x4_check)
-        return inlineSimdCheck(callInfo, native, SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdCheck(callInfo, native, SimdTypeDescr::Float32x4);
 
     typedef bool IsElementWise;
     if (native == js::simd_int32x4_select)
-        return inlineSimdSelect(callInfo, native, IsElementWise(true), SimdTypeDescr::TYPE_INT32);
+        return inlineSimdSelect(callInfo, native, IsElementWise(true), SimdTypeDescr::Int32x4);
     if (native == js::simd_int32x4_bitselect)
-        return inlineSimdSelect(callInfo, native, IsElementWise(false), SimdTypeDescr::TYPE_INT32);
+        return inlineSimdSelect(callInfo, native, IsElementWise(false), SimdTypeDescr::Int32x4);
     if (native == js::simd_float32x4_select)
-        return inlineSimdSelect(callInfo, native, IsElementWise(true), SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdSelect(callInfo, native, IsElementWise(true), SimdTypeDescr::Float32x4);
     if (native == js::simd_float32x4_bitselect)
-        return inlineSimdSelect(callInfo, native, IsElementWise(false), SimdTypeDescr::TYPE_FLOAT32);
+        return inlineSimdSelect(callInfo, native, IsElementWise(false), SimdTypeDescr::Float32x4);
 
     if (native == js::simd_int32x4_swizzle)
-        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::TYPE_INT32, 1, 4);
+        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::Int32x4, 1, 4);
     if (native == js::simd_float32x4_swizzle)
-        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 1, 4);
+        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::Float32x4, 1, 4);
     if (native == js::simd_int32x4_shuffle)
-        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::TYPE_INT32, 2, 4);
+        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::Int32x4, 2, 4);
     if (native == js::simd_float32x4_shuffle)
-        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 2, 4);
+        return inlineSimdShuffle(callInfo, native, SimdTypeDescr::Float32x4, 2, 4);
 
     if (native == js::simd_int32x4_load)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_INT32, 4);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Int32x4, 4);
     if (native == js::simd_int32x4_loadX)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_INT32, 1);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Int32x4, 1);
     if (native == js::simd_int32x4_loadXY)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_INT32, 2);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Int32x4, 2);
     if (native == js::simd_int32x4_loadXYZ)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_INT32, 3);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Int32x4, 3);
 
     if (native == js::simd_float32x4_load)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 4);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Float32x4, 4);
     if (native == js::simd_float32x4_loadX)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 1);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Float32x4, 1);
     if (native == js::simd_float32x4_loadXY)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 2);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Float32x4, 2);
     if (native == js::simd_float32x4_loadXYZ)
-        return inlineSimdLoad(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 3);
+        return inlineSimdLoad(callInfo, native, SimdTypeDescr::Float32x4, 3);
 
     if (native == js::simd_int32x4_store)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_INT32, 4);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Int32x4, 4);
     if (native == js::simd_int32x4_storeX)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_INT32, 1);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Int32x4, 1);
     if (native == js::simd_int32x4_storeXY)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_INT32, 2);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Int32x4, 2);
     if (native == js::simd_int32x4_storeXYZ)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_INT32, 3);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Int32x4, 3);
     if (native == js::simd_float32x4_store)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 4);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Float32x4, 4);
     if (native == js::simd_float32x4_storeX)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 1);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Float32x4, 1);
     if (native == js::simd_float32x4_storeXY)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 2);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Float32x4, 2);
     if (native == js::simd_float32x4_storeXYZ)
-        return inlineSimdStore(callInfo, native, SimdTypeDescr::TYPE_FLOAT32, 3);
+        return inlineSimdStore(callInfo, native, SimdTypeDescr::Float32x4, 3);
 
     return InliningStatus_NotInlined;
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineNativeGetter(CallInfo &callInfo, JSFunction *target)
 {
     MOZ_ASSERT(target->isNative());
@@ -3111,17 +3111,17 @@ IonBuilder::inlineBinarySimd(CallInfo &c
     return boxSimd(callInfo, ins, templateObj);
 }
 
 IonBuilder::InliningStatus
 IonBuilder::inlineCompSimd(CallInfo &callInfo, JSNative native, MSimdBinaryComp::Operation op,
                            SimdTypeDescr::Type compType)
 {
     InlineTypedObject *templateObj = nullptr;
-    if (!checkInlineSimd(callInfo, native, SimdTypeDescr::TYPE_INT32, 2, &templateObj))
+    if (!checkInlineSimd(callInfo, native, SimdTypeDescr::Int32x4, 2, &templateObj))
         return InliningStatus_NotInlined;
 
     // If the type of any of the arguments is neither a SIMD type, an Object
     // type, or a Value, then the applyTypes phase will add a fallible box &
     // unbox sequence.  This does not matter much as all binary SIMD
     // instructions are supposed to produce a TypeError when they're called
     // with non SIMD-arguments.
     MIRType mirType = SimdTypeDescrToMIRType(compType);
@@ -3246,19 +3246,19 @@ IonBuilder::inlineSimdShuffle(CallInfo &
 
     return boxSimd(callInfo, ins, templateObj);
 }
 
 static Scalar::Type
 SimdTypeToScalarType(SimdTypeDescr::Type type)
 {
     switch (type) {
-      case SimdTypeDescr::TYPE_FLOAT32: return Scalar::Float32x4;
-      case SimdTypeDescr::TYPE_INT32:   return Scalar::Int32x4;
-      case SimdTypeDescr::TYPE_FLOAT64: break;
+      case SimdTypeDescr::Float32x4: return Scalar::Float32x4;
+      case SimdTypeDescr::Int32x4:   return Scalar::Int32x4;
+      case SimdTypeDescr::Float64x2: break;
     }
     MOZ_CRASH("unexpected simd type");
 }
 
 bool
 IonBuilder::prepareForSimdLoadStore(CallInfo &callInfo, Scalar::Type simdType, MInstruction **elements,
                                     MDefinition **index, Scalar::Type *arrayType)
 {
--- a/js/src/jit/Recover.cpp
+++ b/js/src/jit/Recover.cpp
@@ -1333,27 +1333,27 @@ RSimdBox::RSimdBox(CompactBufferReader &
 bool
 RSimdBox::recover(JSContext *cx, SnapshotIterator &iter) const
 {
     JSObject *resultObject = nullptr;
     RValueAllocation a = iter.readAllocation();
     MOZ_ASSERT(iter.allocationReadable(a));
     const FloatRegisters::RegisterContent *raw = iter.floatAllocationPointer(a);
     switch (SimdTypeDescr::Type(type_)) {
-      case SimdTypeDescr::TYPE_INT32:
+      case SimdTypeDescr::Int32x4:
         MOZ_ASSERT_IF(a.mode() == RValueAllocation::ANY_FLOAT_REG,
                       a.fpuReg().isInt32x4());
         resultObject = js::CreateSimd<Int32x4>(cx, (const Int32x4::Elem *) raw);
         break;
-      case SimdTypeDescr::TYPE_FLOAT32:
+      case SimdTypeDescr::Float32x4:
         MOZ_ASSERT_IF(a.mode() == RValueAllocation::ANY_FLOAT_REG,
                       a.fpuReg().isFloat32x4());
         resultObject = js::CreateSimd<Float32x4>(cx, (const Float32x4::Elem *) raw);
         break;
-      case SimdTypeDescr::TYPE_FLOAT64:
+      case SimdTypeDescr::Float64x2:
         MOZ_CRASH("NYI, RSimdBox of Float64x2");
         break;
     }
 
     if (!resultObject)
         return false;
 
     RootedValue result(cx);