Bug 1416723: Remove SIMD.js support; r=luke, r=nbp
authorBenjamin Bouvier <benj@benj.me>
Tue, 24 Jul 2018 15:15:01 +0200
changeset 483709 4534ae540e86d686f29098cbcc2f932a6b83117b
parent 483708 3d7a2ff6821ff741268ba2f4fb27d682002bc788
child 483710 764e0cce4cd1fbb79213252aec99a51f75c7f0be
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, nbp
bugs1416723
milestone63.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 1416723: Remove SIMD.js support; r=luke, r=nbp
dom/serviceworkers/test/test_serviceworker_interfaces.js
dom/tests/mochitest/general/test_interfaces.js
dom/workers/test/test_worker_interfaces.js
js/public/ProtoKey.h
js/src/builtin/SIMD.cpp
js/src/builtin/SIMD.h
js/src/builtin/SIMDConstants.h
js/src/builtin/TestingFunctions.cpp
js/src/builtin/TypedObject.cpp
js/src/builtin/TypedObject.h
js/src/builtin/TypedObject.js
js/src/builtin/TypedObjectConstants.h
js/src/devtools/automation/cgc-jittest-timeouts.txt
js/src/doc/JITOptimizations/Outcomes.md
js/src/jit-test/jit_test.py
js/src/jit-test/lib/simd.js
js/src/jit-test/tests/SIMD/anyall.js
js/src/jit-test/tests/SIMD/binary-arith.js
js/src/jit-test/tests/SIMD/bool32x4-arith.js
js/src/jit-test/tests/SIMD/bool32x4-const.js
js/src/jit-test/tests/SIMD/bug1109911.js
js/src/jit-test/tests/SIMD/bug1121299.js
js/src/jit-test/tests/SIMD/bug1123631.js
js/src/jit-test/tests/SIMD/bug1130845.js
js/src/jit-test/tests/SIMD/bug1241872.js
js/src/jit-test/tests/SIMD/bug1248503.js
js/src/jit-test/tests/SIMD/bug1273483.js
js/src/jit-test/tests/SIMD/bug1296640-gc-args.js
js/src/jit-test/tests/SIMD/bug1303780-gc-args.js
js/src/jit-test/tests/SIMD/bug1435317.js
js/src/jit-test/tests/SIMD/bug953108.js
js/src/jit-test/tests/SIMD/check.js
js/src/jit-test/tests/SIMD/compare.js
js/src/jit-test/tests/SIMD/complex-4.js
js/src/jit-test/tests/SIMD/convert.js
js/src/jit-test/tests/SIMD/float32x4-binary-arith.js
js/src/jit-test/tests/SIMD/getters.js
js/src/jit-test/tests/SIMD/inline-missing-arguments.js
js/src/jit-test/tests/SIMD/load.js
js/src/jit-test/tests/SIMD/nursery-overflow.js
js/src/jit-test/tests/SIMD/recover.js
js/src/jit-test/tests/SIMD/replacelane.js
js/src/jit-test/tests/SIMD/saturate.js
js/src/jit-test/tests/SIMD/select.js
js/src/jit-test/tests/SIMD/shift.js
js/src/jit-test/tests/SIMD/shuffle.js
js/src/jit-test/tests/SIMD/splat.js
js/src/jit-test/tests/SIMD/store.js
js/src/jit-test/tests/SIMD/swizzle.js
js/src/jit-test/tests/SIMD/uconvert.js
js/src/jit-test/tests/SIMD/unary.js
js/src/jit-test/tests/SIMD/unbox.js
js/src/jit-test/tests/asm.js/bug1126251.js
js/src/jit-test/tests/asm.js/bug1201124-simd-proxy.js
js/src/jit-test/tests/asm.js/simd-fbirds.js
js/src/jit-test/tests/asm.js/simd-mandelbrot.js
js/src/jit-test/tests/asm.js/testAsmJSWasmMixing.js
js/src/jit-test/tests/asm.js/testBug1099216.js
js/src/jit-test/tests/asm.js/testJumpRange.js
js/src/jit-test/tests/asm.js/testProfiling.js
js/src/jit-test/tests/asm.js/testSIMD-16x8.js
js/src/jit-test/tests/asm.js/testSIMD-8x16.js
js/src/jit-test/tests/asm.js/testSIMD-bitcasts.js
js/src/jit-test/tests/asm.js/testSIMD-load-store.js
js/src/jit-test/tests/asm.js/testSIMD.js
js/src/jit-test/tests/asm.js/testZOOB.js
js/src/jit/BaselineBailouts.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/BaselineInspector.cpp
js/src/jit/BaselineInspector.h
js/src/jit/CodeGenerator.cpp
js/src/jit/CodeGenerator.h
js/src/jit/EagerSimdUnbox.cpp
js/src/jit/EagerSimdUnbox.h
js/src/jit/InlinableNatives.h
js/src/jit/Ion.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/IonBuilder.h
js/src/jit/IonOptimizationLevels.cpp
js/src/jit/IonOptimizationLevels.h
js/src/jit/IonTypes.h
js/src/jit/JSJitFrameIter.h
js/src/jit/JitOptions.cpp
js/src/jit/JitOptions.h
js/src/jit/JitRealm.h
js/src/jit/Lowering.cpp
js/src/jit/MCallOptimize.cpp
js/src/jit/MIR.cpp
js/src/jit/MIR.h
js/src/jit/MIRGenerator.h
js/src/jit/MIRGraph.cpp
js/src/jit/MacroAssembler.cpp
js/src/jit/MacroAssembler.h
js/src/jit/RangeAnalysis.cpp
js/src/jit/Recover.cpp
js/src/jit/Recover.h
js/src/jit/TypePolicy.cpp
js/src/jit/TypePolicy.h
js/src/jit/TypedObjectPrediction.cpp
js/src/jit/TypedObjectPrediction.h
js/src/jit/arm/CodeGenerator-arm.cpp
js/src/jit/arm/Lowering-arm.cpp
js/src/jit/arm/Lowering-arm.h
js/src/jit/arm/MacroAssembler-arm.h
js/src/jit/arm64/CodeGenerator-arm64.cpp
js/src/jit/arm64/Lowering-arm64.cpp
js/src/jit/arm64/Lowering-arm64.h
js/src/jit/arm64/MacroAssembler-arm64.cpp
js/src/jit/arm64/MacroAssembler-arm64.h
js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp
js/src/jit/mips-shared/Lowering-mips-shared.cpp
js/src/jit/mips-shared/Lowering-mips-shared.h
js/src/jit/mips32/MacroAssembler-mips32.h
js/src/jit/mips64/MacroAssembler-mips64.h
js/src/jit/none/Lowering-none.h
js/src/jit/none/MacroAssembler-none.h
js/src/jit/shared/Assembler-shared.h
js/src/jit/shared/CodeGenerator-shared-inl.h
js/src/jit/shared/CodeGenerator-shared.cpp
js/src/jit/shared/LIR-shared.h
js/src/jit/shared/Lowering-shared-inl.h
js/src/jit/x64/Assembler-x64.h
js/src/jit/x64/CodeGenerator-x64.cpp
js/src/jit/x64/Lowering-x64.cpp
js/src/jit/x64/MacroAssembler-x64.cpp
js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
js/src/jit/x86-shared/CodeGenerator-x86-shared.h
js/src/jit/x86-shared/LIR-x86-shared.h
js/src/jit/x86-shared/Lowering-x86-shared.cpp
js/src/jit/x86-shared/Lowering-x86-shared.h
js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
js/src/jit/x86-shared/MacroAssembler-x86-shared.h
js/src/jit/x86/Assembler-x86.h
js/src/jit/x86/CodeGenerator-x86.cpp
js/src/jit/x86/Lowering-x86.cpp
js/src/jit/x86/MacroAssembler-x86.cpp
js/src/js.msg
js/src/jsapi.cpp
js/src/jsfriendapi.h
js/src/moz.build
js/src/tests/jstests.list
js/src/tests/non262/SIMD/ToSource.js
js/src/tests/non262/SIMD/binary-operations.js
js/src/tests/non262/SIMD/browser.js
js/src/tests/non262/SIMD/bug1023145.js
js/src/tests/non262/SIMD/bug953270.js
js/src/tests/non262/SIMD/check.js
js/src/tests/non262/SIMD/comparisons.js
js/src/tests/non262/SIMD/constructors.js
js/src/tests/non262/SIMD/conversions.js
js/src/tests/non262/SIMD/float64x2-arithmetic.js
js/src/tests/non262/SIMD/load-floats.js
js/src/tests/non262/SIMD/load-int16x8.js
js/src/tests/non262/SIMD/load-int32x4.js
js/src/tests/non262/SIMD/load-int8x16.js
js/src/tests/non262/SIMD/load-sab-buffer-compat.js
js/src/tests/non262/SIMD/load-unsigned-integers.js
js/src/tests/non262/SIMD/minmax.js
js/src/tests/non262/SIMD/replaceLane.js
js/src/tests/non262/SIMD/select-bitselect.js
js/src/tests/non262/SIMD/shell.js
js/src/tests/non262/SIMD/shifts.js
js/src/tests/non262/SIMD/splat.js
js/src/tests/non262/SIMD/store.js
js/src/tests/non262/SIMD/swizzle-shuffle.js
js/src/tests/non262/SIMD/toString.js
js/src/tests/non262/SIMD/typedobjects.js
js/src/tests/non262/SIMD/unary-operations.js
js/src/tests/non262/TypedObject/method_from.js
js/src/vm/ArrayBufferObject.cpp
js/src/vm/GlobalObject.h
js/src/vm/JSContext.cpp
js/src/vm/SelfHosting.cpp
js/src/vm/TypedArrayObject.cpp
js/src/vm/TypedArrayObject.h
js/src/wasm/AsmJS.cpp
js/src/wasm/WasmBaselineCompile.cpp
js/src/wasm/WasmBaselineCompile.h
js/src/wasm/WasmBinaryConstants.h
js/src/wasm/WasmBuiltins.cpp
js/src/wasm/WasmInstance.cpp
js/src/wasm/WasmIonCompile.cpp
js/src/wasm/WasmJS.cpp
js/src/wasm/WasmOpIter.cpp
js/src/wasm/WasmOpIter.h
js/src/wasm/WasmSignalHandlers.cpp
js/src/wasm/WasmStubs.cpp
js/src/wasm/WasmTypes.cpp
js/src/wasm/WasmTypes.h
js/src/wasm/WasmValidate.cpp
js/src/wasm/WasmValidate.h
--- a/dom/serviceworkers/test/test_serviceworker_interfaces.js
+++ b/dom/serviceworkers/test/test_serviceworker_interfaces.js
@@ -52,17 +52,16 @@ var ecmaGlobals =
     "Proxy",
     "RangeError",
     {name: "ReadableStream", optional: true},
     "ReferenceError",
     "Reflect",
     "RegExp",
     "Set",
     {name: "SharedArrayBuffer", disabled: true},
-    {name: "SIMD", nightly: true},
     "String",
     "Symbol",
     "SyntaxError",
     {name: "TypedObject", nightly: true},
     "TypeError",
     "Uint16Array",
     "Uint32Array",
     "Uint8Array",
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -73,17 +73,16 @@ var ecmaGlobals =
     {name: "Proxy", insecureContext: true},
     {name: "RangeError", insecureContext: true},
     {name: "ReadableStream", insecureContext: true, disabled: true},
     {name: "ReferenceError", insecureContext: true},
     {name: "Reflect", insecureContext: true},
     {name: "RegExp", insecureContext: true},
     {name: "Set", insecureContext: true},
     {name: "SharedArrayBuffer", insecureContext: true, disabled: true},
-    {name: "SIMD", insecureContext: true, nightly: true},
     {name: "String", insecureContext: true},
     {name: "Symbol", insecureContext: true},
     {name: "SyntaxError", insecureContext: true},
     {name: "TypedObject", insecureContext: true, nightly: true},
     {name: "TypeError", insecureContext: true},
     {name: "Uint16Array", insecureContext: true},
     {name: "Uint32Array", insecureContext: true},
     {name: "Uint8Array", insecureContext: true},
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -58,17 +58,16 @@ var ecmaGlobals =
     {name: "Proxy", insecureContext: true},
     {name: "RangeError", insecureContext: true},
     {name: "ReadableStream", insecureContext: true, disabled: true},
     {name: "ReferenceError", insecureContext: true},
     {name: "Reflect", insecureContext: true},
     {name: "RegExp", insecureContext: true},
     {name: "Set", insecureContext: true},
     {name: "SharedArrayBuffer", insecureContext: true, disabled: true},
-    {name: "SIMD", insecureContext: true, nightly: true},
     {name: "String", insecureContext: true},
     {name: "Symbol", insecureContext: true},
     {name: "SyntaxError", insecureContext: true},
     {name: "TypedObject", insecureContext: true, nightly: true},
     {name: "TypeError", insecureContext: true},
     {name: "Uint16Array", insecureContext: true},
     {name: "Uint32Array", insecureContext: true},
     {name: "Uint8Array", insecureContext: true},
--- a/js/public/ProtoKey.h
+++ b/js/public/ProtoKey.h
@@ -43,22 +43,16 @@
 #endif
 
 #ifdef ENABLE_BINARYDATA
 #define IF_BDATA(real,imaginary) real
 #else
 #define IF_BDATA(real,imaginary) imaginary
 #endif
 
-#ifdef ENABLE_SIMD
-# define IF_SIMD(real,imaginary) real
-#else
-# define IF_SIMD(real,imaginary) imaginary
-#endif
-
 #ifdef ENABLE_SHARED_ARRAY_BUFFER
 #define IF_SAB(real,imaginary) real
 #else
 #define IF_SAB(real,imaginary) imaginary
 #endif
 
 #define JS_FOR_PROTOTYPES(real,imaginary) \
     imaginary(Null,             InitNullClass,          dummy) \
@@ -101,17 +95,16 @@ IF_BIGINT(real,imaginary)(BigInt, InitVi
     real(Map,                   InitViaClassSpec,       OCLASP(Map)) \
     real(Set,                   InitViaClassSpec,       OCLASP(Set)) \
     real(DataView,              InitViaClassSpec,       OCLASP(DataView)) \
     real(Symbol,                InitSymbolClass,        OCLASP(Symbol)) \
 IF_SAB(real,imaginary)(SharedArrayBuffer,       InitViaClassSpec, OCLASP(SharedArrayBuffer)) \
 IF_INTL(real,imaginary) (Intl,                  InitIntlClass,          CLASP(Intl)) \
 IF_BDATA(real,imaginary)(TypedObject,           InitTypedObjectModuleObject,   OCLASP(TypedObjectModule)) \
     real(Reflect,               InitReflect,            nullptr) \
-IF_SIMD(real,imaginary)(SIMD,                   InitSimdClass, OCLASP(Simd)) \
     real(WeakSet,               InitWeakSetClass,       OCLASP(WeakSet)) \
     real(TypedArray,            InitViaClassSpec,       &js::TypedArrayObject::sharedTypedArrayPrototypeClass) \
 IF_SAB(real,imaginary)(Atomics, InitAtomicsClass, OCLASP(Atomics)) \
     real(SavedFrame,            InitViaClassSpec,       &js::SavedFrame::class_) \
     real(Promise,               InitViaClassSpec,       OCLASP(Promise)) \
     real(ReadableStream,        InitViaClassSpec,       &js::ReadableStream::class_) \
     real(ReadableStreamDefaultReader,           InitViaClassSpec, &js::ReadableStreamDefaultReader::class_) \
     real(ReadableStreamBYOBReader,              InitViaClassSpec, &js::ReadableStreamBYOBReader::class_) \
deleted file mode 100644
--- a/js/src/builtin/SIMD.cpp
+++ /dev/null
@@ -1,1644 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * JS SIMD pseudo-module.
- * Specification matches polyfill:
- * https://github.com/johnmccutchan/ecmascript_simd/blob/master/src/ecmascript_simd.js
- * The objects float32x4 and int32x4 are installed on the SIMD pseudo-module.
- */
-
-#include "builtin/SIMD.h"
-
-#include "mozilla/FloatingPoint.h"
-#include "mozilla/IntegerTypeTraits.h"
-#include "mozilla/Sprintf.h"
-#include "mozilla/TypeTraits.h"
-
-#include "jsapi.h"
-#include "jsfriendapi.h"
-#include "jsnum.h"
-
-#include "builtin/TypedObject.h"
-#include "jit/AtomicOperations.h"
-#include "jit/InlinableNatives.h"
-#include "js/Value.h"
-
-#include "vm/JSObject-inl.h"
-
-using namespace js;
-
-using mozilla::IsNaN;
-using mozilla::EnableIf;
-using mozilla::IsIntegral;
-using mozilla::IsFloatingPoint;
-using mozilla::IsSigned;
-using mozilla::MakeUnsigned;
-
-///////////////////////////////////////////////////////////////////////////
-// SIMD
-
-static_assert(unsigned(SimdType::Count) == 12, "sync with TypedObjectConstants.h");
-
-static bool ArgumentToLaneIndex(JSContext* cx, JS::HandleValue v, unsigned limit, unsigned* lane);
-
-static bool
-CheckVectorObject(HandleValue v, SimdType expectedType)
-{
-    if (!v.isObject())
-        return false;
-
-    JSObject& obj = v.toObject();
-    if (!obj.is<TypedObject>())
-        return false;
-
-    TypeDescr& typeRepr = obj.as<TypedObject>().typeDescr();
-    if (typeRepr.kind() != type::Simd)
-        return false;
-
-    return typeRepr.as<SimdTypeDescr>().type() == expectedType;
-}
-
-template<class V>
-bool
-js::IsVectorObject(HandleValue v)
-{
-    return CheckVectorObject(v, V::type);
-}
-
-#define FOR_EACH_SIMD(macro) \
-  macro(Int8x16)             \
-  macro(Int16x8)             \
-  macro(Int32x4)             \
-  macro(Uint8x16)            \
-  macro(Uint16x8)            \
-  macro(Uint32x4)            \
-  macro(Float32x4)           \
-  macro(Float64x2)           \
-  macro(Bool8x16)            \
-  macro(Bool16x8)            \
-  macro(Bool32x4)            \
-  macro(Bool64x2)
-
-#define InstantiateIsVectorObject_(T) \
-    template bool js::IsVectorObject<T>(HandleValue v);
-FOR_EACH_SIMD(InstantiateIsVectorObject_)
-#undef InstantiateIsVectorObject_
-
-const char*
-js::SimdTypeToString(SimdType type)
-{
-    switch (type) {
-#define RETSTR_(TYPE) case SimdType::TYPE: return #TYPE;
-      FOR_EACH_SIMD(RETSTR_)
-#undef RETSTR_
-      case SimdType::Count: break;
-    }
-    return "<bad SimdType>";
-}
-
-PropertyName*
-js::SimdTypeToName(const JSAtomState& atoms, SimdType type)
-{
-    switch (type) {
-#define CASE_(TypeName) case SimdType::TypeName: return atoms.TypeName;
-      FOR_EACH_SIMD(CASE_)
-#undef CASE_
-      case SimdType::Count: break;
-    }
-    MOZ_CRASH("bad SIMD type");
-}
-
-bool
-js::IsSimdTypeName(const JSAtomState& atoms, const PropertyName* name, SimdType* type)
-{
-#define CHECK_(TypeName) if (name == atoms.TypeName) {   \
-                             *type = SimdType::TypeName; \
-                             return true;                \
-                         }
-    FOR_EACH_SIMD(CHECK_)
-#undef CHECK_
-    return false;
-}
-
-static inline bool
-ErrorBadArgs(JSContext* cx)
-{
-    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_BAD_ARGS);
-    return false;
-}
-
-static inline bool
-ErrorWrongTypeArg(JSContext* cx, unsigned argIndex, Handle<TypeDescr*> typeDescr)
-{
-    MOZ_ASSERT(argIndex < 10);
-    char charArgIndex[2];
-    SprintfLiteral(charArgIndex, "%u", argIndex);
-
-    HeapSlot& typeNameSlot = typeDescr->getReservedSlotRef(JS_DESCR_SLOT_STRING_REPR);
-    char* typeNameStr = JS_EncodeString(cx, typeNameSlot.toString());
-    if (!typeNameStr)
-        return false;
-
-    JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_SIMD_NOT_A_VECTOR,
-                               typeNameStr, charArgIndex);
-    JS_free(cx, typeNameStr);
-    return false;
-}
-
-static inline bool
-ErrorBadIndex(JSContext* cx)
-{
-    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_INDEX);
-    return false;
-}
-
-/* Non-standard: convert and range check an index value for SIMD operations.
- *
- *   1. numericIndex = ToNumber(argument)            (may throw TypeError)
- *   2. intIndex = ToInteger(numericIndex)
- *   3. if intIndex != numericIndex throw RangeError
- *
- * This function additionally bounds the range to the non-negative contiguous
- * integers:
- *
- *   4. if intIndex < 0 or intIndex > 2^53 throw RangeError
- *
- * Return true and set |*index| to the integer value if |argument| is a valid
- * array index argument. Otherwise report an TypeError or RangeError and return
- * false.
- *
- * The returned index will always be in the range 0 <= *index <= 2^53.
- */
-static bool
-NonStandardToIndex(JSContext* cx, HandleValue v, uint64_t* index)
-{
-    // Fast common case.
-    if (v.isInt32()) {
-        int32_t i = v.toInt32();
-        if (i >= 0) {
-            *index = i;
-            return true;
-        }
-    }
-
-    // Slow case. Use ToNumber() to coerce. This may throw a TypeError.
-    double d;
-    if (!ToNumber(cx, v, &d))
-        return false;
-
-    // Check that |d| is an integer in the valid range.
-    //
-    // Not all floating point integers fit in the range of a uint64_t, so we
-    // need a rough range check before the real range check in our caller. We
-    // could limit indexes to UINT64_MAX, but this would mean that our callers
-    // have to be very careful about integer overflow. The contiguous integer
-    // floating point numbers end at 2^53, so make that our upper limit. If we
-    // ever support arrays with more than 2^53 elements, this will need to
-    // change.
-    //
-    // Reject infinities, NaNs, and numbers outside the contiguous integer range
-    // with a RangeError.
-
-    // Write relation so NaNs throw a RangeError.
-    if (!(0 <= d && d <= (uint64_t(1) << 53))) {
-        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_INDEX);
-        return false;
-    }
-
-    // Check that d is an integer, throw a RangeError if not.
-    // Note that this conversion could invoke undefined behaviour without the
-    // range check above.
-    uint64_t i(d);
-    if (d != double(i)) {
-        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_INDEX);
-        return false;
-    }
-
-    *index = i;
-    return true;
-}
-
-template<typename T>
-static SimdTypeDescr*
-GetTypeDescr(JSContext* cx)
-{
-    RootedGlobalObject global(cx, cx->global());
-    return GlobalObject::getOrCreateSimdTypeDescr(cx, global, T::type);
-}
-
-template<typename V>
-bool
-js::ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out)
-{
-    typedef typename V::Elem Elem;
-    Rooted<TypeDescr*> typeDescr(cx, GetTypeDescr<V>(cx));
-    if (!typeDescr)
-        return false;
-    if (!IsVectorObject<V>(v))
-        return ErrorWrongTypeArg(cx, 1, typeDescr);
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* mem = reinterpret_cast<Elem*>(v.toObject().as<TypedObject>().typedMem(nogc));
-    *out = jit::SimdConstant::CreateSimd128(mem);
-    return true;
-}
-
-template bool js::ToSimdConstant<Int8x16>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Int16x8>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Int32x4>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Float32x4>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Bool8x16>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Bool16x8>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-template bool js::ToSimdConstant<Bool32x4>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-
-template<typename Elem>
-static Elem
-TypedObjectMemory(HandleValue v, const JS::AutoRequireNoGC& nogc)
-{
-    TypedObject& obj = v.toObject().as<TypedObject>();
-    return reinterpret_cast<Elem>(obj.typedMem(nogc));
-}
-
-static const ClassOps SimdTypeDescrClassOps = {
-    nullptr, /* addProperty */
-    nullptr, /* delProperty */
-    nullptr, /* enumerate */
-    nullptr, /* newEnumerate */
-    nullptr, /* resolve */
-    nullptr, /* mayResolve */
-    TypeDescr::finalize,
-    SimdTypeDescr::call
-};
-
-const Class SimdTypeDescr::class_ = {
-    "SIMD",
-    JSCLASS_HAS_RESERVED_SLOTS(JS_DESCR_SLOTS) | JSCLASS_BACKGROUND_FINALIZE,
-    &SimdTypeDescrClassOps
-};
-
-namespace {
-
-// Define classes (Int8x16Defn, Int16x8Defn, etc.) to group together various
-// properties and so on.
-#define DEFINE_DEFN_(TypeName)                                       \
-class TypeName##Defn {                                               \
-  public:                                                            \
-    static const JSFunctionSpec Methods[];                           \
-};
-
-FOR_EACH_SIMD(DEFINE_DEFN_)
-#undef DEFINE_DEFN_
-
-} // namespace
-
-// Shared type descriptor methods for all SIMD types.
-static const JSFunctionSpec TypeDescriptorMethods[] = {
-    JS_SELF_HOSTED_FN("toSource", "DescrToSource", 0, 0),
-    JS_SELF_HOSTED_FN("array", "ArrayShorthand", 1, 0),
-    JS_SELF_HOSTED_FN("equivalent", "TypeDescrEquivalent", 1, 0),
-    JS_FS_END
-};
-
-// Shared TypedObject methods for all SIMD types.
-static const JSFunctionSpec SimdTypedObjectMethods[] = {
-    JS_SELF_HOSTED_FN("toString", "SimdToString", 0, 0),
-    JS_SELF_HOSTED_FN("valueOf", "SimdValueOf", 0, 0),
-    JS_SELF_HOSTED_FN("toSource", "SimdToSource", 0, 0),
-    JS_FS_END
-};
-
-// Provide JSJitInfo structs for those types that are supported by Ion.
-// The controlling SIMD type is encoded as the InlinableNative primary opcode.
-// The SimdOperation within the type is encoded in the .depth field.
-//
-// The JS_INLINABLE_FN macro refers to js::JitInfo_##native which we provide as
-// Simd##Type##_##Operation
-//
-// /!\ Don't forget to keep this list in sync with the SIMD instrinics used in
-// SelfHosting.cpp.
-
-namespace js {
-namespace jit {
-
-static_assert(uint64_t(SimdOperation::Last) <= UINT16_MAX, "SimdOperation must fit in uint16_t");
-
-// See also JitInfo_* in MCallOptimize.cpp. We provide a JSJitInfo for all the
-// named functions here. The default JitInfo_SimdInt32x4 etc structs represent the
-// SimdOperation::Constructor.
-#define DEFN(TYPE, OP) const JSJitInfo JitInfo_Simd##TYPE##_##OP = {                             \
-     /* .getter, unused for inlinable natives. */                                                \
-    { nullptr },                                                                                 \
-    /* .inlinableNative, but we have to init first union member: .protoID. */                    \
-    { uint16_t(InlinableNative::Simd##TYPE) },                                                   \
-    /* .nativeOp. Actually initializing first union member .depth. */                            \
-    { uint16_t(SimdOperation::Fn_##OP) },                                                        \
-    /* .type_ bitfield says this in an inlinable native function. */                             \
-    JSJitInfo::InlinableNative                                                                   \
-    /* Remaining fields are not used for inlinable natives. They are zero-initialized. */        \
-};
-
-// This list of inlinable types should match the one in jit/InlinableNatives.h.
-#define TDEFN(Name, Func, Operands) DEFN(Float32x4, Name)
-FLOAT32X4_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Int8x16, Name)
-INT8X16_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Uint8x16, Name)
-UINT8X16_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Int16x8, Name)
-INT16X8_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Uint16x8, Name)
-UINT16X8_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Int32x4, Name)
-INT32X4_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Uint32x4, Name)
-UINT32X4_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Bool8x16, Name)
-BOOL8X16_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Bool16x8, Name)
-BOOL16X8_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-#define TDEFN(Name, Func, Operands) DEFN(Bool32x4, Name)
-BOOL32X4_FUNCTION_LIST(TDEFN)
-#undef TDEFN
-
-} // namespace jit
-} // namespace js
-
-const JSFunctionSpec Float32x4Defn::Methods[] = {
-#define SIMD_FLOAT32X4_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_float32x4_##Name, Operands, 0, SimdFloat32x4_##Name),
-    FLOAT32X4_FUNCTION_LIST(SIMD_FLOAT32X4_FUNCTION_ITEM)
-#undef SIMD_FLOAT32x4_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Float64x2Defn::Methods[]  = {
-#define SIMD_FLOAT64X2_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_FN(#Name, js::simd_float64x2_##Name, Operands, 0),
-    FLOAT64X2_FUNCTION_LIST(SIMD_FLOAT64X2_FUNCTION_ITEM)
-#undef SIMD_FLOAT64X2_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Int8x16Defn::Methods[] = {
-#define SIMD_INT8X16_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_int8x16_##Name, Operands, 0, SimdInt8x16_##Name),
-    INT8X16_FUNCTION_LIST(SIMD_INT8X16_FUNCTION_ITEM)
-#undef SIMD_INT8X16_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Int16x8Defn::Methods[] = {
-#define SIMD_INT16X8_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_int16x8_##Name, Operands, 0, SimdInt16x8_##Name),
-    INT16X8_FUNCTION_LIST(SIMD_INT16X8_FUNCTION_ITEM)
-#undef SIMD_INT16X8_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Int32x4Defn::Methods[] = {
-#define SIMD_INT32X4_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_int32x4_##Name, Operands, 0, SimdInt32x4_##Name),
-    INT32X4_FUNCTION_LIST(SIMD_INT32X4_FUNCTION_ITEM)
-#undef SIMD_INT32X4_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Uint8x16Defn::Methods[] = {
-#define SIMD_UINT8X16_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_uint8x16_##Name, Operands, 0, SimdUint8x16_##Name),
-    UINT8X16_FUNCTION_LIST(SIMD_UINT8X16_FUNCTION_ITEM)
-#undef SIMD_UINT8X16_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Uint16x8Defn::Methods[] = {
-#define SIMD_UINT16X8_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_uint16x8_##Name, Operands, 0, SimdUint16x8_##Name),
-    UINT16X8_FUNCTION_LIST(SIMD_UINT16X8_FUNCTION_ITEM)
-#undef SIMD_UINT16X8_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Uint32x4Defn::Methods[] = {
-#define SIMD_UINT32X4_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_uint32x4_##Name, Operands, 0, SimdUint32x4_##Name),
-    UINT32X4_FUNCTION_LIST(SIMD_UINT32X4_FUNCTION_ITEM)
-#undef SIMD_UINT32X4_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Bool8x16Defn::Methods[] = {
-#define SIMD_BOOL8X16_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_bool8x16_##Name, Operands, 0, SimdBool8x16_##Name),
-    BOOL8X16_FUNCTION_LIST(SIMD_BOOL8X16_FUNCTION_ITEM)
-#undef SIMD_BOOL8X16_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Bool16x8Defn::Methods[] = {
-#define SIMD_BOOL16X8_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_bool16x8_##Name, Operands, 0, SimdBool16x8_##Name),
-    BOOL16X8_FUNCTION_LIST(SIMD_BOOL16X8_FUNCTION_ITEM)
-#undef SIMD_BOOL16X8_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Bool32x4Defn::Methods[] = {
-#define SIMD_BOOL32X4_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_INLINABLE_FN(#Name, js::simd_bool32x4_##Name, Operands, 0, SimdBool32x4_##Name),
-    BOOL32X4_FUNCTION_LIST(SIMD_BOOL32X4_FUNCTION_ITEM)
-#undef SIMD_BOOL32X4_FUNCTION_ITEM
-    JS_FS_END
-};
-
-const JSFunctionSpec Bool64x2Defn::Methods[] = {
-#define SIMD_BOOL64X2_FUNCTION_ITEM(Name, Func, Operands) \
-    JS_FN(#Name, js::simd_bool64x2_##Name, Operands, 0),
-    BOOL64X2_FUNCTION_LIST(SIMD_BOOL64X2_FUNCTION_ITEM)
-#undef SIMD_BOOL64x2_FUNCTION_ITEM
-    JS_FS_END
-};
-
-template <typename T>
-static bool
-FillLanes(JSContext* cx, Handle<TypedObject*> result, const CallArgs& args)
-{
-    typedef typename T::Elem Elem;
-    Elem tmp;
-    for (unsigned i = 0; i < T::lanes; i++) {
-        if (!T::Cast(cx, args.get(i), &tmp))
-            return false;
-        // Reassure typedMem() that we won't GC while holding onto the returned
-        // pointer, even though we could GC on every iteration of this loop
-        // (but it is safe because we re-fetch each time.)
-        JS::AutoCheckCannotGC nogc(cx);
-        reinterpret_cast<Elem*>(result->typedMem(nogc))[i] = tmp;
-    }
-    args.rval().setObject(*result);
-    return true;
-}
-
-bool
-SimdTypeDescr::call(JSContext* cx, unsigned argc, Value* vp)
-{
-    CallArgs args = CallArgsFromVp(argc, vp);
-
-    Rooted<SimdTypeDescr*> descr(cx, &args.callee().as<SimdTypeDescr>());
-    Rooted<TypedObject*> result(cx, TypedObject::createZeroed(cx, descr));
-    if (!result)
-        return false;
-
-#define CASE_CALL_(Type) \
-      case SimdType::Type:   return FillLanes< ::Type>(cx, result, args);
-
-    switch (descr->type()) {
-      FOR_EACH_SIMD(CASE_CALL_)
-      case SimdType::Count: break;
-    }
-
-#undef CASE_CALL_
-    MOZ_CRASH("unexpected SIMD descriptor");
-    return false;
-}
-
-///////////////////////////////////////////////////////////////////////////
-// SIMD class
-
-static const ClassOps SimdObjectClassOps = {
-    nullptr, /* addProperty */
-    nullptr, /* delProperty */
-    nullptr, /* enumerate */
-    nullptr, /* newEnumerate */
-    SimdObject::resolve
-};
-
-const Class SimdObject::class_ = {
-    "SIMD",
-    JSCLASS_HAS_RESERVED_SLOTS(uint32_t(SimdType::Count)),
-    &SimdObjectClassOps
-};
-
-/* static */ bool
-GlobalObject::initSimdObject(JSContext* cx, Handle<GlobalObject*> global)
-{
-    // SIMD relies on the TypedObject module being initialized.
-    // In particular, the self-hosted code for array() wants
-    // to be able to call GetTypedObjectModule(). It is NOT necessary
-    // to install the TypedObjectModule global, but at the moment
-    // those two things are not separable.
-    if (!GlobalObject::getOrCreateTypedObjectModule(cx, global))
-        return false;
-
-    RootedObject globalSimdObject(cx);
-    RootedObject objProto(cx, GlobalObject::getOrCreateObjectPrototype(cx, global));
-    if (!objProto)
-        return false;
-
-    globalSimdObject = NewObjectWithGivenProto(cx, &SimdObject::class_, objProto, SingletonObject);
-    if (!globalSimdObject)
-        return false;
-
-    RootedValue globalSimdValue(cx, ObjectValue(*globalSimdObject));
-    if (!DefineDataProperty(cx, global, cx->names().SIMD, globalSimdValue, JSPROP_RESOLVING))
-        return false;
-
-    global->setConstructor(JSProto_SIMD, globalSimdValue);
-    return true;
-}
-
-static bool
-CreateSimdType(JSContext* cx, Handle<GlobalObject*> global, HandlePropertyName stringRepr,
-               SimdType simdType, const JSFunctionSpec* methods)
-{
-    RootedObject funcProto(cx, GlobalObject::getOrCreateFunctionPrototype(cx, global));
-    if (!funcProto)
-        return false;
-
-    // Create type constructor itself and initialize its reserved slots.
-    Rooted<SimdTypeDescr*> typeDescr(cx);
-    typeDescr = NewObjectWithGivenProto<SimdTypeDescr>(cx, funcProto, SingletonObject);
-    if (!typeDescr)
-        return false;
-
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_KIND, Int32Value(type::Simd));
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_STRING_REPR, StringValue(stringRepr));
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_ALIGNMENT, Int32Value(SimdTypeDescr::alignment(simdType)));
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_SIZE, Int32Value(SimdTypeDescr::size(simdType)));
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_OPAQUE, BooleanValue(false));
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_TYPE, Int32Value(uint8_t(simdType)));
-
-    if (!CreateUserSizeAndAlignmentProperties(cx, typeDescr))
-        return false;
-
-    // Create prototype property, which inherits from Object.prototype.
-    RootedObject objProto(cx, GlobalObject::getOrCreateObjectPrototype(cx, global));
-    if (!objProto)
-        return false;
-    Rooted<TypedProto*> proto(cx);
-    proto = NewObjectWithGivenProto<TypedProto>(cx, objProto, SingletonObject);
-    if (!proto)
-        return false;
-    typeDescr->initReservedSlot(JS_DESCR_SLOT_TYPROTO, ObjectValue(*proto));
-
-    // Link constructor to prototype and install properties.
-    if (!JS_DefineFunctions(cx, typeDescr, TypeDescriptorMethods))
-        return false;
-
-    if (!LinkConstructorAndPrototype(cx, typeDescr, proto) ||
-        !JS_DefineFunctions(cx, proto, SimdTypedObjectMethods))
-    {
-        return false;
-    }
-
-    // Bind type descriptor to the global SIMD object
-    RootedObject globalSimdObject(cx, GlobalObject::getOrCreateSimdGlobalObject(cx, global));
-    MOZ_ASSERT(globalSimdObject);
-
-    RootedValue typeValue(cx, ObjectValue(*typeDescr));
-    if (!JS_DefineFunctions(cx, typeDescr, methods) ||
-        !DefineDataProperty(cx, globalSimdObject, stringRepr, typeValue,
-                            JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_RESOLVING))
-    {
-        return false;
-    }
-
-    uint32_t slot = uint32_t(typeDescr->type());
-    MOZ_ASSERT(globalSimdObject->as<NativeObject>().getReservedSlot(slot).isUndefined());
-    globalSimdObject->as<NativeObject>().setReservedSlot(slot, ObjectValue(*typeDescr));
-    return !!typeDescr;
-}
-
-/* static */ bool
-GlobalObject::initSimdType(JSContext* cx, Handle<GlobalObject*> global, SimdType simdType)
-{
-#define CREATE_(Type) \
-    case SimdType::Type: \
-      return CreateSimdType(cx, global, cx->names().Type, simdType, Type##Defn::Methods);
-
-    switch (simdType) {
-      FOR_EACH_SIMD(CREATE_)
-      case SimdType::Count: break;
-    }
-    MOZ_CRASH("unexpected simd type");
-
-#undef CREATE_
-}
-
-/* static */ SimdTypeDescr*
-GlobalObject::getOrCreateSimdTypeDescr(JSContext* cx, Handle<GlobalObject*> global,
-                                       SimdType simdType)
-{
-    MOZ_ASSERT(unsigned(simdType) < unsigned(SimdType::Count), "Invalid SIMD type");
-
-    RootedObject globalSimdObject(cx, GlobalObject::getOrCreateSimdGlobalObject(cx, global));
-    if (!globalSimdObject)
-       return nullptr;
-
-    uint32_t typeSlotIndex = uint32_t(simdType);
-    if (globalSimdObject->as<NativeObject>().getReservedSlot(typeSlotIndex).isUndefined() &&
-        !GlobalObject::initSimdType(cx, global, simdType))
-    {
-        return nullptr;
-    }
-
-    const Value& slot = globalSimdObject->as<NativeObject>().getReservedSlot(typeSlotIndex);
-    MOZ_ASSERT(slot.isObject());
-    return &slot.toObject().as<SimdTypeDescr>();
-}
-
-bool
-SimdObject::resolve(JSContext* cx, JS::HandleObject obj, JS::HandleId id, bool* resolved)
-{
-    *resolved = false;
-    if (!JSID_IS_ATOM(id))
-        return true;
-    JSAtom* str = JSID_TO_ATOM(id);
-    Rooted<GlobalObject*> global(cx, cx->global());
-#define TRY_RESOLVE_(Type)                                                    \
-    if (str == cx->names().Type) {                                            \
-        *resolved = CreateSimdType(cx, global, cx->names().Type,              \
-                                   SimdType::Type, Type##Defn::Methods);      \
-        return *resolved;                                                     \
-    }
-    FOR_EACH_SIMD(TRY_RESOLVE_)
-#undef TRY_RESOLVE_
-    return true;
-}
-
-JSObject*
-js::InitSimdClass(JSContext* cx, Handle<GlobalObject*> global)
-{
-    return GlobalObject::getOrCreateSimdGlobalObject(cx, global);
-}
-
-template<typename V>
-JSObject*
-js::CreateSimd(JSContext* cx, const typename V::Elem* data)
-{
-    typedef typename V::Elem Elem;
-    Rooted<TypeDescr*> typeDescr(cx, GetTypeDescr<V>(cx));
-    if (!typeDescr)
-        return nullptr;
-
-    Rooted<TypedObject*> result(cx, TypedObject::createZeroed(cx, typeDescr));
-    if (!result)
-        return nullptr;
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* resultMem = reinterpret_cast<Elem*>(result->typedMem(nogc));
-    memcpy(resultMem, data, sizeof(Elem) * V::lanes);
-    return result;
-}
-
-#define InstantiateCreateSimd_(Type) \
-    template JSObject* js::CreateSimd<Type>(JSContext* cx, const Type::Elem* data);
-
-FOR_EACH_SIMD(InstantiateCreateSimd_)
-
-#undef InstantiateCreateSimd_
-
-#undef FOR_EACH_SIMD
-
-namespace js {
-
-namespace detail {
-
-template<typename T, typename Enable = void>
-struct MaybeMakeUnsigned {
-    using Type = T;
-};
-
-template<typename T>
-struct MaybeMakeUnsigned<T, typename EnableIf<IsIntegral<T>::value && IsSigned<T>::value>::Type> {
-    using Type = typename MakeUnsigned<T>::Type;
-};
-
-} // namespace detail
-
-// Unary SIMD operators
-template<typename T>
-struct Identity {
-    static T apply(T x) { return x; }
-};
-template<typename T>
-struct Abs {
-    static T apply(T x) { return mozilla::Abs(x); }
-};
-template<typename T>
-struct Neg {
-    using MaybeUnsignedT = typename detail::MaybeMakeUnsigned<T>::Type;
-    static T apply(T x) {
-        // Prepend |1U| to force integral promotion through *unsigned* types.
-        // Otherwise when |T = uint16_t| and |int| is 32-bit, we could have
-        // |uint16_t(-1) * uint16_t(65535)| which would really be
-        // |int(65535) * int(65535)|, but as |4294836225 > 2147483647| would
-        // perform signed integer overflow.
-        // https://stackoverflow.com/questions/24795651/whats-the-best-c-way-to-multiply-unsigned-integers-modularly-safely
-        return static_cast<MaybeUnsignedT>(1U * MaybeUnsignedT(-1) * MaybeUnsignedT(x));
-    }
-};
-template<typename T>
-struct Not {
-    static T apply(T x) { return ~x; }
-};
-template<typename T>
-struct LogicalNot {
-    static T apply(T x) { return !x; }
-};
-template<typename T>
-struct RecApprox {
-    static_assert(IsFloatingPoint<T>::value, "RecApprox only supported for floating points");
-    static T apply(T x) { return 1 / x; }
-};
-template<typename T>
-struct RecSqrtApprox {
-    static_assert(IsFloatingPoint<T>::value, "RecSqrtApprox only supported for floating points");
-    static T apply(T x) { return 1 / sqrt(x); }
-};
-template<typename T>
-struct Sqrt {
-    static_assert(IsFloatingPoint<T>::value, "Sqrt only supported for floating points");
-    static T apply(T x) { return sqrt(x); }
-};
-
-// Binary SIMD operators
-template<typename T>
-struct Add {
-    using MaybeUnsignedT = typename detail::MaybeMakeUnsigned<T>::Type;
-    static T apply(T l, T r) { return MaybeUnsignedT(l) + MaybeUnsignedT(r); }
-};
-template<typename T>
-struct Sub {
-    using MaybeUnsignedT = typename detail::MaybeMakeUnsigned<T>::Type;
-    static T apply(T l, T r) { return MaybeUnsignedT(l) - MaybeUnsignedT(r); }
-};
-template<typename T>
-struct Div {
-    static_assert(IsFloatingPoint<T>::value, "Div only supported for floating points");
-    static T apply(T l, T r) { return l / r; }
-};
-template<typename T>
-struct Mul {
-    using MaybeUnsignedT = typename detail::MaybeMakeUnsigned<T>::Type;
-    static T apply(T l, T r) { return MaybeUnsignedT(l) * MaybeUnsignedT(r); }
-};
-template<typename T>
-struct Minimum {
-    static T apply(T l, T r) { return math_min_impl(l, r); }
-};
-template<typename T>
-struct MinNum {
-    static T apply(T l, T r) { return IsNaN(l) ? r : (IsNaN(r) ? l : math_min_impl(l, r)); }
-};
-template<typename T>
-struct Maximum {
-    static T apply(T l, T r) { return math_max_impl(l, r); }
-};
-template<typename T>
-struct MaxNum {
-    static T apply(T l, T r) { return IsNaN(l) ? r : (IsNaN(r) ? l : math_max_impl(l, r)); }
-};
-template<typename T>
-struct LessThan {
-    static bool apply(T l, T r) { return l < r; }
-};
-template<typename T>
-struct LessThanOrEqual {
-    static bool apply(T l, T r) { return l <= r; }
-};
-template<typename T>
-struct GreaterThan {
-    static bool apply(T l, T r) { return l > r; }
-};
-template<typename T>
-struct GreaterThanOrEqual {
-    static bool apply(T l, T r) { return l >= r; }
-};
-template<typename T>
-struct Equal {
-    static bool apply(T l, T r) { return l == r; }
-};
-template<typename T>
-struct NotEqual {
-    static bool apply(T l, T r) { return l != r; }
-};
-template<typename T>
-struct Xor {
-    static T apply(T l, T r) { return l ^ r; }
-};
-template<typename T>
-struct And {
-    static T apply(T l, T r) { return l & r; }
-};
-template<typename T>
-struct Or {
-    static T apply(T l, T r) { return l | r; }
-};
-
-// For the following three operators, if the value v we're trying to shift is
-// such that v << bits can't fit in the int32 range, then we have undefined
-// behavior, according to C++11 [expr.shift]p2. However, left-shifting an
-// unsigned type is well-defined.
-//
-// In C++, shifting by an amount outside the range [0;N-1] is undefined
-// behavior. SIMD.js reduces the shift amount modulo the number of bits in a
-// lane and has defined behavior for all shift amounts.
-template<typename T>
-struct ShiftLeft {
-    static T apply(T v, int32_t bits) {
-        typedef typename mozilla::MakeUnsigned<T>::Type UnsignedT;
-        uint32_t maskedBits = uint32_t(bits) % (sizeof(T) * 8);
-        return UnsignedT(v) << maskedBits;
-    }
-};
-template<typename T>
-struct ShiftRightArithmetic {
-    static T apply(T v, int32_t bits) {
-        typedef typename mozilla::MakeSigned<T>::Type SignedT;
-        uint32_t maskedBits = uint32_t(bits) % (sizeof(T) * 8);
-        return SignedT(v) >> maskedBits;
-    }
-};
-template<typename T>
-struct ShiftRightLogical {
-    static T apply(T v, int32_t bits) {
-        typedef typename mozilla::MakeUnsigned<T>::Type UnsignedT;
-        uint32_t maskedBits = uint32_t(bits) % (sizeof(T) * 8);
-        return UnsignedT(v) >> maskedBits;
-    }
-};
-
-// Saturating arithmetic is only defined on types smaller than int.
-// Clamp `x` into the range supported by the integral type T.
-template<typename T>
-static T
-Saturate(int x)
-{
-    static_assert(mozilla::IsIntegral<T>::value, "Only integer saturation supported");
-    static_assert(sizeof(T) < sizeof(int), "Saturating int-sized arithmetic is not safe");
-    const T lower = mozilla::MinValue<T>::value;
-    const T upper = mozilla::MaxValue<T>::value;
-    if (x > int(upper))
-        return upper;
-    if (x < int(lower))
-        return lower;
-    return T(x);
-}
-
-// Since signed integer overflow is undefined behavior in C++, it would be
-// wildly irresponsible to attempt something as dangerous as adding two numbers
-// coming from user code. However, in this case we know that T is smaller than
-// int, so there is no way these operations can cause overflow. The
-// static_assert in Saturate() enforces this for us.
-template<typename T>
-struct AddSaturate {
-    static T apply(T l, T r) { return Saturate<T>(l + r); }
-};
-template<typename T>
-struct SubSaturate {
-    static T apply(T l, T r) { return Saturate<T>(l - r); }
-};
-
-} // namespace js
-
-template<typename Out>
-static bool
-StoreResult(JSContext* cx, CallArgs& args, typename Out::Elem* result)
-{
-    RootedObject obj(cx, CreateSimd<Out>(cx, result));
-    if (!obj)
-        return false;
-    args.rval().setObject(*obj);
-    return true;
-}
-
-// StoreResult can GC, and it is commonly used after pulling something out of a
-// TypedObject:
-//
-//   Elem result = op(TypedObjectMemory<Elem>(args[0]));
-//   StoreResult<Out>(..., result);
-//
-// The pointer extracted from the typed object in args[0] in the above example
-// could be an interior pointer, and therefore be invalidated by GC.
-// TypedObjectMemory() requires an assertion token to be passed in to prove
-// that we won't GC, but the scope of eg an AutoCheckCannotGC RAII object
-// extends to the end of its containing scope -- which would include the call
-// to StoreResult, resulting in a rooting hazard.
-//
-// TypedObjectElemArray fixes this by wrapping the problematic pointer in a
-// type, and the analysis is able to see that it is dead before calling
-// StoreResult. (But if another GC called is made before the pointer is dead,
-// it will correctly report a hazard.)
-//
-template <typename Elem>
-class TypedObjectElemArray {
-    Elem* elements;
-  public:
-    explicit TypedObjectElemArray(HandleValue objVal) {
-        JS::AutoCheckCannotGC nogc;
-        elements = TypedObjectMemory<Elem*>(objVal, nogc);
-    }
-    Elem& operator[](int i) { return elements[i]; }
-} JS_HAZ_GC_POINTER;
-
-// Coerces the inputs of type In to the type Coercion, apply the operator Op
-// and converts the result to the type Out.
-template<typename In, typename Coercion, template<typename C> class Op, typename Out>
-static bool
-CoercedUnaryFunc(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename Coercion::Elem CoercionElem;
-    typedef typename Out::Elem RetElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 1 || !IsVectorObject<In>(args[0]))
-        return ErrorBadArgs(cx);
-
-    CoercionElem result[Coercion::lanes];
-    TypedObjectElemArray<CoercionElem> val(args[0]);
-    for (unsigned i = 0; i < Coercion::lanes; i++)
-        result[i] = Op<CoercionElem>::apply(val[i]);
-    return StoreResult<Out>(cx, args, (RetElem*) result);
-}
-
-// Coerces the inputs of type In to the type Coercion, apply the operator Op
-// and converts the result to the type Out.
-template<typename In, typename Coercion, template<typename C> class Op, typename Out>
-static bool
-CoercedBinaryFunc(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename Coercion::Elem CoercionElem;
-    typedef typename Out::Elem RetElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 2 || !IsVectorObject<In>(args[0]) || !IsVectorObject<In>(args[1]))
-        return ErrorBadArgs(cx);
-
-    CoercionElem result[Coercion::lanes];
-    TypedObjectElemArray<CoercionElem> left(args[0]);
-    TypedObjectElemArray<CoercionElem> right(args[1]);
-    for (unsigned i = 0; i < Coercion::lanes; i++)
-        result[i] = Op<CoercionElem>::apply(left[i], right[i]);
-    return StoreResult<Out>(cx, args, (RetElem*) result);
-}
-
-// Same as above, with no coercion, i.e. Coercion == In.
-template<typename In, template<typename C> class Op, typename Out>
-static bool
-UnaryFunc(JSContext* cx, unsigned argc, Value* vp)
-{
-    return CoercedUnaryFunc<In, Out, Op, Out>(cx, argc, vp);
-}
-
-template<typename In, template<typename C> class Op, typename Out>
-static bool
-BinaryFunc(JSContext* cx, unsigned argc, Value* vp)
-{
-    return CoercedBinaryFunc<In, Out, Op, Out>(cx, argc, vp);
-}
-
-template<typename V>
-static bool
-ExtractLane(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() < 2 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    unsigned lane;
-    if (!ArgumentToLaneIndex(cx, args[1], V::lanes, &lane))
-        return false;
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* vec = TypedObjectMemory<Elem*>(args[0], nogc);
-    Elem val = vec[lane];
-    args.rval().set(V::ToValue(val));
-    return true;
-}
-
-template<typename V>
-static bool
-AllTrue(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() < 1 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* vec = TypedObjectMemory<Elem*>(args[0], nogc);
-    bool allTrue = true;
-    for (unsigned i = 0; allTrue && i < V::lanes; i++)
-        allTrue = vec[i];
-
-    args.rval().setBoolean(allTrue);
-    return true;
-}
-
-template<typename V>
-static bool
-AnyTrue(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() < 1 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* vec = TypedObjectMemory<Elem*>(args[0], nogc);
-    bool anyTrue = false;
-    for (unsigned i = 0; !anyTrue && i < V::lanes; i++)
-        anyTrue = vec[i];
-
-    args.rval().setBoolean(anyTrue);
-    return true;
-}
-
-template<typename V>
-static bool
-ReplaceLane(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    // Only the first and second arguments are mandatory
-    if (args.length() < 2 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    unsigned lane;
-    if (!ArgumentToLaneIndex(cx, args[1], V::lanes, &lane))
-        return false;
-
-    Elem value;
-    if (!V::Cast(cx, args.get(2), &value))
-        return false;
-
-    TypedObjectElemArray<Elem> vec(args[0]);
-    Elem result[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++)
-        result[i] = i == lane ? value : vec[i];
-
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename V>
-static bool
-Swizzle(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != (V::lanes + 1) || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    unsigned lanes[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++) {
-        if (!ArgumentToLaneIndex(cx, args[i + 1], V::lanes, &lanes[i]))
-            return false;
-    }
-
-    TypedObjectElemArray<Elem> val(args[0]);
-    Elem result[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++)
-        result[i] = val[lanes[i]];
-
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename V>
-static bool
-Shuffle(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != (V::lanes + 2) || !IsVectorObject<V>(args[0]) || !IsVectorObject<V>(args[1]))
-        return ErrorBadArgs(cx);
-
-    unsigned lanes[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++) {
-        if (!ArgumentToLaneIndex(cx, args[i + 2], 2 * V::lanes, &lanes[i]))
-            return false;
-    }
-
-    Elem result[V::lanes];
-    {
-        JS::AutoCheckCannotGC nogc(cx);
-        Elem* lhs = TypedObjectMemory<Elem*>(args[0], nogc);
-        Elem* rhs = TypedObjectMemory<Elem*>(args[1], nogc);
-
-        for (unsigned i = 0; i < V::lanes; i++) {
-            Elem* selectedInput = lanes[i] < V::lanes ? lhs : rhs;
-            result[i] = selectedInput[lanes[i] % V::lanes];
-        }
-    }
-
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename V, template<typename T> class Op>
-static bool
-BinaryScalar(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 2)
-        return ErrorBadArgs(cx);
-
-    if (!IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    int32_t bits;
-    if (!ToInt32(cx, args[1], &bits))
-        return false;
-
-    TypedObjectElemArray<Elem> val(args[0]);
-    Elem result[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++)
-        result[i] = Op<Elem>::apply(val[i], bits);
-
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename In, template<typename C> class Op, typename Out>
-static bool
-CompareFunc(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename In::Elem InElem;
-    typedef typename Out::Elem OutElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 2 || !IsVectorObject<In>(args[0]) || !IsVectorObject<In>(args[1]))
-        return ErrorBadArgs(cx);
-
-    OutElem result[Out::lanes];
-    TypedObjectElemArray<InElem> left(args[0]);
-    TypedObjectElemArray<InElem> right(args[1]);
-    for (unsigned i = 0; i < Out::lanes; i++) {
-        unsigned j = (i * In::lanes) / Out::lanes;
-        result[i] = Op<InElem>::apply(left[j], right[j]) ? -1 : 0;
-    }
-
-    return StoreResult<Out>(cx, args, result);
-}
-
-// This struct defines whether we should throw during a conversion attempt,
-// when trying to convert a value of type from From to the type To.  This
-// happens whenever a C++ conversion would have undefined behavior (and perhaps
-// be platform-dependent).
-template<typename From, typename To>
-struct ThrowOnConvert;
-
-struct NeverThrow
-{
-    static bool value(int32_t v) {
-        return false;
-    }
-};
-
-// While int32 to float conversions can be lossy, these conversions have
-// defined behavior in C++, so we don't need to care about them here. In practice,
-// this means round to nearest, tie with even (zero bit in significand).
-template<>
-struct ThrowOnConvert<int32_t, float> : public NeverThrow {};
-
-template<>
-struct ThrowOnConvert<uint32_t, float> : public NeverThrow {};
-
-// All int32 can be safely converted to doubles.
-template<>
-struct ThrowOnConvert<int32_t, double> : public NeverThrow {};
-
-template<>
-struct ThrowOnConvert<uint32_t, double> : public NeverThrow {};
-
-// All floats can be safely converted to doubles.
-template<>
-struct ThrowOnConvert<float, double> : public NeverThrow {};
-
-// Double to float conversion for inputs which aren't in the float range are
-// undefined behavior in C++, but they're defined in IEEE754.
-template<>
-struct ThrowOnConvert<double, float> : public NeverThrow {};
-
-// Float to integer conversions have undefined behavior if the float value
-// is out of the representable integer range (on x86, will yield the undefined
-// value pattern, namely 0x80000000; on arm, will clamp the input value), so
-// check this here.
-template<typename From, typename IntegerType>
-struct ThrowIfNotInRange
-{
-    static_assert(mozilla::IsIntegral<IntegerType>::value, "bad destination type");
-
-    static bool value(From v) {
-        // Truncate to integer value before the range check.
-        double d = trunc(double(v));
-        // Arrange relations so NaN returns true (i.e., it throws a RangeError).
-        return !(d >= double(mozilla::MinValue<IntegerType>::value) &&
-                 d <= double(mozilla::MaxValue<IntegerType>::value));
-    }
-};
-
-template<>
-struct ThrowOnConvert<double, int32_t> : public ThrowIfNotInRange<double, int32_t> {};
-
-template<>
-struct ThrowOnConvert<double, uint32_t> : public ThrowIfNotInRange<double, uint32_t> {};
-
-template<>
-struct ThrowOnConvert<float, int32_t> : public ThrowIfNotInRange<float, int32_t> {};
-
-template<>
-struct ThrowOnConvert<float, uint32_t> : public ThrowIfNotInRange<float, uint32_t> {};
-
-template<typename V, typename Vret>
-static bool
-FuncConvert(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-    typedef typename Vret::Elem RetElem;
-
-    static_assert(!mozilla::IsSame<V,Vret>::value, "Can't convert SIMD type to itself");
-    static_assert(V::lanes == Vret::lanes, "Can only convert from same number of lanes");
-    static_assert(!mozilla::IsIntegral<Elem>::value || !mozilla::IsIntegral<RetElem>::value,
-                  "Cannot convert between integer SIMD types");
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 1 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    TypedObjectElemArray<Elem> val(args[0]);
-    RetElem result[Vret::lanes];
-    for (unsigned i = 0; i < V::lanes; i++) {
-        if (ThrowOnConvert<Elem, RetElem>::value(val[i])) {
-            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SIMD_FAILED_CONVERSION);
-            return false;
-        }
-        result[i] = ConvertScalar<RetElem>(val[i]);
-    }
-
-    return StoreResult<Vret>(cx, args, result);
-}
-
-template<typename V, typename Vret>
-static bool
-FuncConvertBits(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-    typedef typename Vret::Elem RetElem;
-
-    static_assert(!mozilla::IsSame<V, Vret>::value, "Can't convert SIMD type to itself");
-    static_assert(V::lanes * sizeof(Elem) == Vret::lanes * sizeof(RetElem),
-                  "Can only bitcast from the same number of bits");
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 1 || !IsVectorObject<V>(args[0]))
-        return ErrorBadArgs(cx);
-
-    // While we could just pass the typedMem of args[0] as StoreResults' last
-    // argument, a GC could move the pointer to its memory in the meanwhile.
-    // For consistency with other SIMD functions, simply copy the input in a
-    // temporary array.
-    RetElem copy[Vret::lanes];
-    {
-        JS::AutoCheckCannotGC nogc(cx);
-        memcpy(copy, TypedObjectMemory<RetElem*>(args[0], nogc), Vret::lanes * sizeof(RetElem));
-    }
-    return StoreResult<Vret>(cx, args, copy);
-}
-
-template<typename Vret>
-static bool
-FuncSplat(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename Vret::Elem RetElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    RetElem arg;
-    if (!Vret::Cast(cx, args.get(0), &arg))
-        return false;
-
-    RetElem result[Vret::lanes];
-    for (unsigned i = 0; i < Vret::lanes; i++)
-        result[i] = arg;
-    return StoreResult<Vret>(cx, args, result);
-}
-
-template<typename V>
-static bool
-Bool(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-
-    Elem result[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++)
-        result[i] = ToBoolean(args.get(i)) ? -1 : 0;
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename V, typename MaskType>
-static bool
-SelectBits(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-    typedef typename MaskType::Elem MaskTypeElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 3 || !IsVectorObject<MaskType>(args[0]) ||
-        !IsVectorObject<V>(args[1]) || !IsVectorObject<V>(args[2]))
-    {
-        return ErrorBadArgs(cx);
-    }
-
-    TypedObjectElemArray<MaskTypeElem> val(args[0]);
-    TypedObjectElemArray<MaskTypeElem> tv(args[1]);
-    TypedObjectElemArray<MaskTypeElem> fv(args[2]);
-
-    MaskTypeElem tr[MaskType::lanes];
-    for (unsigned i = 0; i < MaskType::lanes; i++)
-        tr[i] = And<MaskTypeElem>::apply(val[i], tv[i]);
-
-    MaskTypeElem fr[MaskType::lanes];
-    for (unsigned i = 0; i < MaskType::lanes; i++)
-        fr[i] = And<MaskTypeElem>::apply(Not<MaskTypeElem>::apply(val[i]), fv[i]);
-
-    MaskTypeElem orInt[MaskType::lanes];
-    for (unsigned i = 0; i < MaskType::lanes; i++)
-        orInt[i] = Or<MaskTypeElem>::apply(tr[i], fr[i]);
-
-    Elem* result = reinterpret_cast<Elem*>(orInt);
-    return StoreResult<V>(cx, args, result);
-}
-
-template<typename V, typename MaskType>
-static bool
-Select(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-    typedef typename MaskType::Elem MaskTypeElem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 3 || !IsVectorObject<MaskType>(args[0]) ||
-        !IsVectorObject<V>(args[1]) || !IsVectorObject<V>(args[2]))
-    {
-        return ErrorBadArgs(cx);
-    }
-
-    TypedObjectElemArray<MaskTypeElem> mask(args[0]);
-    TypedObjectElemArray<Elem> tv(args[1]);
-    TypedObjectElemArray<Elem> fv(args[2]);
-
-    Elem result[V::lanes];
-    for (unsigned i = 0; i < V::lanes; i++)
-        result[i] = mask[i] ? tv[i] : fv[i];
-
-    return StoreResult<V>(cx, args, result);
-}
-
-// Extract an integer lane index from a function argument.
-//
-// Register an exception and return false if the argument is not suitable.
-static bool
-ArgumentToLaneIndex(JSContext* cx, JS::HandleValue v, unsigned limit, unsigned* lane)
-{
-    uint64_t arg;
-    if (!NonStandardToIndex(cx, v, &arg))
-        return false;
-    if (arg >= limit)
-        return ErrorBadIndex(cx);
-
-    *lane = unsigned(arg);
-    return true;
-}
-
-// Look for arguments (ta, idx) where ta is a TypedArray and idx is a
-// non-negative integer.
-// Check that accessBytes can be accessed starting from index idx in the array.
-// Return the array handle in typedArray and idx converted to a byte offset in byteStart.
-static bool
-TypedArrayFromArgs(JSContext* cx, const CallArgs& args, uint32_t accessBytes,
-                   MutableHandleObject typedArray, size_t* byteStart)
-{
-    if (!args[0].isObject())
-        return ErrorBadArgs(cx);
-
-    JSObject& argobj = args[0].toObject();
-    if (!argobj.is<TypedArrayObject>())
-        return ErrorBadArgs(cx);
-
-    typedArray.set(&argobj);
-
-    uint64_t index;
-    if (!NonStandardToIndex(cx, args[1], &index))
-        return false;
-
-    // Do the range check in 64 bits even when size_t is 32 bits.
-    // This can't overflow because index <= 2^53.
-    uint64_t bytes = index * typedArray->as<TypedArrayObject>().bytesPerElement();
-    // Keep in sync with AsmJS OnOutOfBounds function.
-    if ((bytes + accessBytes) > typedArray->as<TypedArrayObject>().byteLength())
-        return ErrorBadIndex(cx);
-
-    *byteStart = bytes;
-
-    return true;
-}
-
-template<class V, unsigned NumElem>
-static bool
-Load(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 2)
-        return ErrorBadArgs(cx);
-
-    size_t byteStart;
-    RootedObject typedArray(cx);
-    if (!TypedArrayFromArgs(cx, args, sizeof(Elem) * NumElem, &typedArray, &byteStart))
-        return false;
-
-    Rooted<TypeDescr*> typeDescr(cx, GetTypeDescr<V>(cx));
-    if (!typeDescr)
-        return false;
-
-    Rooted<TypedObject*> result(cx, TypedObject::createZeroed(cx, typeDescr));
-    if (!result)
-        return false;
-
-    JS::AutoCheckCannotGC nogc(cx);
-    SharedMem<Elem*> src =
-        typedArray->as<TypedArrayObject>().viewDataEither().addBytes(byteStart).cast<Elem*>();
-    Elem* dst = reinterpret_cast<Elem*>(result->typedMem(nogc));
-    jit::AtomicOperations::podCopySafeWhenRacy(SharedMem<Elem*>::unshared(dst), src, NumElem);
-
-    args.rval().setObject(*result);
-    return true;
-}
-
-template<class V, unsigned NumElem>
-static bool
-Store(JSContext* cx, unsigned argc, Value* vp)
-{
-    typedef typename V::Elem Elem;
-
-    CallArgs args = CallArgsFromVp(argc, vp);
-    if (args.length() != 3)
-        return ErrorBadArgs(cx);
-
-    size_t byteStart;
-    RootedObject typedArray(cx);
-    if (!TypedArrayFromArgs(cx, args, sizeof(Elem) * NumElem, &typedArray, &byteStart))
-        return false;
-
-    if (!IsVectorObject<V>(args[2]))
-        return ErrorBadArgs(cx);
-
-    JS::AutoCheckCannotGC nogc(cx);
-    Elem* src = TypedObjectMemory<Elem*>(args[2], nogc);
-    SharedMem<Elem*> dst =
-        typedArray->as<TypedArrayObject>().viewDataEither().addBytes(byteStart).cast<Elem*>();
-    js::jit::AtomicOperations::podCopySafeWhenRacy(dst, SharedMem<Elem*>::unshared(src), NumElem);
-
-    args.rval().setObject(args[2].toObject());
-    return true;
-}
-
-#define DEFINE_SIMD_FLOAT32X4_FUNCTION(Name, Func, Operands)       \
-bool                                                               \
-js::simd_float32x4_##Name(JSContext* cx, unsigned argc, Value* vp) \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-FLOAT32X4_FUNCTION_LIST(DEFINE_SIMD_FLOAT32X4_FUNCTION)
-#undef DEFINE_SIMD_FLOAT32X4_FUNCTION
-
-#define DEFINE_SIMD_FLOAT64X2_FUNCTION(Name, Func, Operands)       \
-bool                                                               \
-js::simd_float64x2_##Name(JSContext* cx, unsigned argc, Value* vp) \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-FLOAT64X2_FUNCTION_LIST(DEFINE_SIMD_FLOAT64X2_FUNCTION)
-#undef DEFINE_SIMD_FLOAT64X2_FUNCTION
-
-#define DEFINE_SIMD_INT8X16_FUNCTION(Name, Func, Operands)         \
-bool                                                               \
-js::simd_int8x16_##Name(JSContext* cx, unsigned argc, Value* vp)   \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-INT8X16_FUNCTION_LIST(DEFINE_SIMD_INT8X16_FUNCTION)
-#undef DEFINE_SIMD_INT8X16_FUNCTION
-
-#define DEFINE_SIMD_INT16X8_FUNCTION(Name, Func, Operands)         \
-bool                                                               \
-js::simd_int16x8_##Name(JSContext* cx, unsigned argc, Value* vp)   \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-INT16X8_FUNCTION_LIST(DEFINE_SIMD_INT16X8_FUNCTION)
-#undef DEFINE_SIMD_INT16X8_FUNCTION
-
-#define DEFINE_SIMD_INT32X4_FUNCTION(Name, Func, Operands)         \
-bool                                                               \
-js::simd_int32x4_##Name(JSContext* cx, unsigned argc, Value* vp)   \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-INT32X4_FUNCTION_LIST(DEFINE_SIMD_INT32X4_FUNCTION)
-#undef DEFINE_SIMD_INT32X4_FUNCTION
-
-#define DEFINE_SIMD_UINT8X16_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_uint8x16_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-UINT8X16_FUNCTION_LIST(DEFINE_SIMD_UINT8X16_FUNCTION)
-#undef DEFINE_SIMD_UINT8X16_FUNCTION
-
-#define DEFINE_SIMD_UINT16X8_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_uint16x8_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-UINT16X8_FUNCTION_LIST(DEFINE_SIMD_UINT16X8_FUNCTION)
-#undef DEFINE_SIMD_UINT16X8_FUNCTION
-
-#define DEFINE_SIMD_UINT32X4_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_uint32x4_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-UINT32X4_FUNCTION_LIST(DEFINE_SIMD_UINT32X4_FUNCTION)
-#undef DEFINE_SIMD_UINT32X4_FUNCTION
-
-#define DEFINE_SIMD_BOOL8X16_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_bool8x16_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-
-BOOL8X16_FUNCTION_LIST(DEFINE_SIMD_BOOL8X16_FUNCTION)
-#undef DEFINE_SIMD_BOOL8X16_FUNCTION
-
-#define DEFINE_SIMD_BOOL16X8_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_bool16x8_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-BOOL16X8_FUNCTION_LIST(DEFINE_SIMD_BOOL16X8_FUNCTION)
-#undef DEFINE_SIMD_BOOL16X8_FUNCTION
-
-#define DEFINE_SIMD_BOOL32X4_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_bool32x4_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-BOOL32X4_FUNCTION_LIST(DEFINE_SIMD_BOOL32X4_FUNCTION)
-#undef DEFINE_SIMD_BOOL32X4_FUNCTION
-
-#define DEFINE_SIMD_BOOL64X2_FUNCTION(Name, Func, Operands)        \
-bool                                                               \
-js::simd_bool64x2_##Name(JSContext* cx, unsigned argc, Value* vp)  \
-{                                                                  \
-    return Func(cx, argc, vp);                                     \
-}
-BOOL64X2_FUNCTION_LIST(DEFINE_SIMD_BOOL64X2_FUNCTION)
-#undef DEFINE_SIMD_BOOL64X2_FUNCTION
deleted file mode 100644
--- a/js/src/builtin/SIMD.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef builtin_SIMD_h
-#define builtin_SIMD_h
-
-#include "jsapi.h"
-#include "NamespaceImports.h"
-
-#include "builtin/SIMDConstants.h"
-#include "jit/IonTypes.h"
-#include "js/Conversions.h"
-
-/*
- * JS SIMD functions.
- * Spec matching polyfill:
- * https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js
- */
-
-namespace js {
-
-class GlobalObject;
-
-// These classes implement the concept containing the following constraints:
-// - requires typename Elem: this is the scalar lane type, stored in each lane
-// of the SIMD vector.
-// - requires static const unsigned lanes: this is the number of lanes (length)
-// of the SIMD vector.
-// - requires static const SimdType type: this is the SimdType enum value
-// corresponding to the SIMD type.
-// - requires static bool Cast(JSContext*, JS::HandleValue, Elem*): casts a
-// given Value to the current scalar lane type and saves it in the Elem
-// out-param.
-// - requires static Value ToValue(Elem): returns a Value of the right type
-// containing the given value.
-//
-// This concept is used in the templates above to define the functions
-// associated to a given type and in their implementations, to avoid code
-// redundancy.
-
-struct Float32x4 {
-    typedef float Elem;
-    static const unsigned lanes = 4;
-    static const SimdType type = SimdType::Float32x4;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        double d;
-        if (!ToNumber(cx, v, &d))
-            return false;
-        *out = float(d);
-        return true;
-    }
-    static Value ToValue(Elem value) {
-        return DoubleValue(JS::CanonicalizeNaN(value));
-    }
-};
-
-struct Float64x2 {
-    typedef double Elem;
-    static const unsigned lanes = 2;
-    static const SimdType type = SimdType::Float64x2;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToNumber(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return DoubleValue(JS::CanonicalizeNaN(value));
-    }
-};
-
-struct Int8x16 {
-    typedef int8_t Elem;
-    static const unsigned lanes = 16;
-    static const SimdType type = SimdType::Int8x16;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToInt8(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Int16x8 {
-    typedef int16_t Elem;
-    static const unsigned lanes = 8;
-    static const SimdType type = SimdType::Int16x8;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToInt16(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Int32x4 {
-    typedef int32_t Elem;
-    static const unsigned lanes = 4;
-    static const SimdType type = SimdType::Int32x4;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToInt32(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Uint8x16 {
-    typedef uint8_t Elem;
-    static const unsigned lanes = 16;
-    static const SimdType type = SimdType::Uint8x16;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToUint8(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Uint16x8 {
-    typedef uint16_t Elem;
-    static const unsigned lanes = 8;
-    static const SimdType type = SimdType::Uint16x8;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToUint16(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Uint32x4 {
-    typedef uint32_t Elem;
-    static const unsigned lanes = 4;
-    static const SimdType type = SimdType::Uint32x4;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        return ToUint32(cx, v, out);
-    }
-    static Value ToValue(Elem value) {
-        return NumberValue(value);
-    }
-};
-
-struct Bool8x16 {
-    typedef int8_t Elem;
-    static const unsigned lanes = 16;
-    static const SimdType type = SimdType::Bool8x16;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        *out = ToBoolean(v) ? -1 : 0;
-        return true;
-    }
-    static Value ToValue(Elem value) {
-        return BooleanValue(value);
-    }
-};
-
-struct Bool16x8 {
-    typedef int16_t Elem;
-    static const unsigned lanes = 8;
-    static const SimdType type = SimdType::Bool16x8;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        *out = ToBoolean(v) ? -1 : 0;
-        return true;
-    }
-    static Value ToValue(Elem value) {
-        return BooleanValue(value);
-    }
-};
-
-struct Bool32x4 {
-    typedef int32_t Elem;
-    static const unsigned lanes = 4;
-    static const SimdType type = SimdType::Bool32x4;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        *out = ToBoolean(v) ? -1 : 0;
-        return true;
-    }
-    static Value ToValue(Elem value) {
-        return BooleanValue(value);
-    }
-};
-
-struct Bool64x2 {
-    typedef int64_t Elem;
-    static const unsigned lanes = 2;
-    static const SimdType type = SimdType::Bool64x2;
-    static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
-        *out = ToBoolean(v) ? -1 : 0;
-        return true;
-    }
-    static Value ToValue(Elem value) {
-        return BooleanValue(value);
-    }
-};
-
-// Get the well known name of the SIMD.* object corresponding to type.
-PropertyName* SimdTypeToName(const JSAtomState& atoms, SimdType type);
-
-// Check if name is the well known name of a SIMD type.
-// Returns true and sets *type iff name is known.
-bool IsSimdTypeName(const JSAtomState& atoms, const PropertyName* name, SimdType* type);
-
-const char* SimdTypeToString(SimdType type);
-
-template<typename V>
-JSObject* CreateSimd(JSContext* cx, const typename V::Elem* data);
-
-template<typename V>
-bool IsVectorObject(HandleValue v);
-
-template<typename V>
-MOZ_MUST_USE bool ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out);
-
-JSObject*
-InitSimdClass(JSContext* cx, Handle<GlobalObject*> global);
-
-namespace jit {
-
-extern const JSJitInfo JitInfo_SimdInt32x4_extractLane;
-extern const JSJitInfo JitInfo_SimdFloat32x4_extractLane;
-
-} // namespace jit
-
-#define DECLARE_SIMD_FLOAT32X4_FUNCTION(Name, Func, Operands)   \
-extern MOZ_MUST_USE bool                                        \
-simd_float32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
-FLOAT32X4_FUNCTION_LIST(DECLARE_SIMD_FLOAT32X4_FUNCTION)
-#undef DECLARE_SIMD_FLOAT32X4_FUNCTION
-
-#define DECLARE_SIMD_FLOAT64X2_FUNCTION(Name, Func, Operands)   \
-extern MOZ_MUST_USE bool                                        \
-simd_float64x2_##Name(JSContext* cx, unsigned argc, Value* vp);
-FLOAT64X2_FUNCTION_LIST(DECLARE_SIMD_FLOAT64X2_FUNCTION)
-#undef DECLARE_SIMD_FLOAT64X2_FUNCTION
-
-#define DECLARE_SIMD_INT8X16_FUNCTION(Name, Func, Operands)     \
-extern MOZ_MUST_USE bool                                        \
-simd_int8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
-INT8X16_FUNCTION_LIST(DECLARE_SIMD_INT8X16_FUNCTION)
-#undef DECLARE_SIMD_INT8X16_FUNCTION
-
-#define DECLARE_SIMD_INT16X8_FUNCTION(Name, Func, Operands)     \
-extern MOZ_MUST_USE bool                                        \
-simd_int16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
-INT16X8_FUNCTION_LIST(DECLARE_SIMD_INT16X8_FUNCTION)
-#undef DECLARE_SIMD_INT16X8_FUNCTION
-
-#define DECLARE_SIMD_INT32X4_FUNCTION(Name, Func, Operands)     \
-extern MOZ_MUST_USE bool                                        \
-simd_int32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
-INT32X4_FUNCTION_LIST(DECLARE_SIMD_INT32X4_FUNCTION)
-#undef DECLARE_SIMD_INT32X4_FUNCTION
-
-#define DECLARE_SIMD_UINT8X16_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_uint8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
-UINT8X16_FUNCTION_LIST(DECLARE_SIMD_UINT8X16_FUNCTION)
-#undef DECLARE_SIMD_UINT8X16_FUNCTION
-
-#define DECLARE_SIMD_UINT16X8_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_uint16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
-UINT16X8_FUNCTION_LIST(DECLARE_SIMD_UINT16X8_FUNCTION)
-#undef DECLARE_SIMD_UINT16X8_FUNCTION
-
-#define DECLARE_SIMD_UINT32X4_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_uint32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
-UINT32X4_FUNCTION_LIST(DECLARE_SIMD_UINT32X4_FUNCTION)
-#undef DECLARE_SIMD_UINT32X4_FUNCTION
-
-#define DECLARE_SIMD_BOOL8X16_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_bool8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
-BOOL8X16_FUNCTION_LIST(DECLARE_SIMD_BOOL8X16_FUNCTION)
-#undef DECLARE_SIMD_BOOL8X16_FUNCTION
-
-#define DECLARE_SIMD_BOOL16X8_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_bool16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
-BOOL16X8_FUNCTION_LIST(DECLARE_SIMD_BOOL16X8_FUNCTION)
-#undef DECLARE_SIMD_BOOL16X8_FUNCTION
-
-#define DECLARE_SIMD_BOOL32X4_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_bool32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
-BOOL32X4_FUNCTION_LIST(DECLARE_SIMD_BOOL32X4_FUNCTION)
-#undef DECLARE_SIMD_BOOL32X4_FUNCTION
-
-#define DECLARE_SIMD_BOOL64X2_FUNCTION(Name, Func, Operands)    \
-extern MOZ_MUST_USE bool                                        \
-simd_bool64x2_##Name(JSContext* cx, unsigned argc, Value* vp);
-BOOL64X2_FUNCTION_LIST(DECLARE_SIMD_BOOL64X2_FUNCTION)
-#undef DECLARE_SIMD_BOOL64X2_FUNCTION
-
-}  /* namespace js */
-
-#endif /* builtin_SIMD_h */
deleted file mode 100644
--- a/js/src/builtin/SIMDConstants.h
+++ /dev/null
@@ -1,941 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: set ts=8 sts=4 et sw=4 tw=99:
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef builtin_SIMDConstants_h
-#define builtin_SIMDConstants_h
-
-#include "mozilla/Assertions.h"
-
-#include "builtin/TypedObjectConstants.h"
-
-// Bool8x16.
-#define BOOL8X16_UNARY_FUNCTION_LIST(V)                                               \
-  V(not, (UnaryFunc<Bool8x16, LogicalNot, Bool8x16>), 1)                              \
-  V(check, (UnaryFunc<Bool8x16, Identity, Bool8x16>), 1)                              \
-  V(splat, (FuncSplat<Bool8x16>), 1)                                                  \
-  V(allTrue, (AllTrue<Bool8x16>), 1)                                                  \
-  V(anyTrue, (AnyTrue<Bool8x16>), 1)
-
-#define BOOL8X16_BINARY_FUNCTION_LIST(V)                                              \
-  V(extractLane, (ExtractLane<Bool8x16>), 2)                                          \
-  V(and, (BinaryFunc<Bool8x16, And, Bool8x16>), 2)                                    \
-  V(or, (BinaryFunc<Bool8x16, Or, Bool8x16>), 2)                                      \
-  V(xor, (BinaryFunc<Bool8x16, Xor, Bool8x16>), 2)                                    \
-
-#define BOOL8X16_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Bool8x16>), 3)
-
-#define BOOL8X16_FUNCTION_LIST(V)                                                     \
-  BOOL8X16_UNARY_FUNCTION_LIST(V)                                                     \
-  BOOL8X16_BINARY_FUNCTION_LIST(V)                                                    \
-  BOOL8X16_TERNARY_FUNCTION_LIST(V)
-
-// Bool 16x8.
-#define BOOL16X8_UNARY_FUNCTION_LIST(V)                                               \
-  V(not, (UnaryFunc<Bool16x8, LogicalNot, Bool16x8>), 1)                              \
-  V(check, (UnaryFunc<Bool16x8, Identity, Bool16x8>), 1)                              \
-  V(splat, (FuncSplat<Bool16x8>), 1)                                                  \
-  V(allTrue, (AllTrue<Bool16x8>), 1)                                                  \
-  V(anyTrue, (AnyTrue<Bool16x8>), 1)
-
-#define BOOL16X8_BINARY_FUNCTION_LIST(V)                                              \
-  V(extractLane, (ExtractLane<Bool16x8>), 2)                                          \
-  V(and, (BinaryFunc<Bool16x8, And, Bool16x8>), 2)                                    \
-  V(or, (BinaryFunc<Bool16x8, Or, Bool16x8>), 2)                                      \
-  V(xor, (BinaryFunc<Bool16x8, Xor, Bool16x8>), 2)                                    \
-
-#define BOOL16X8_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Bool16x8>), 3)
-
-#define BOOL16X8_FUNCTION_LIST(V)                                                     \
-  BOOL16X8_UNARY_FUNCTION_LIST(V)                                                     \
-  BOOL16X8_BINARY_FUNCTION_LIST(V)                                                    \
-  BOOL16X8_TERNARY_FUNCTION_LIST(V)
-
-// Bool32x4.
-#define BOOL32X4_UNARY_FUNCTION_LIST(V)                                               \
-  V(not, (UnaryFunc<Bool32x4, LogicalNot, Bool32x4>), 1)                              \
-  V(check, (UnaryFunc<Bool32x4, Identity, Bool32x4>), 1)                              \
-  V(splat, (FuncSplat<Bool32x4>), 1)                                                  \
-  V(allTrue, (AllTrue<Bool32x4>), 1)                                                  \
-  V(anyTrue, (AnyTrue<Bool32x4>), 1)
-
-#define BOOL32X4_BINARY_FUNCTION_LIST(V)                                              \
-  V(extractLane, (ExtractLane<Bool32x4>), 2)                                          \
-  V(and, (BinaryFunc<Bool32x4, And, Bool32x4>), 2)                                    \
-  V(or, (BinaryFunc<Bool32x4, Or, Bool32x4>), 2)                                      \
-  V(xor, (BinaryFunc<Bool32x4, Xor, Bool32x4>), 2)                                    \
-
-#define BOOL32X4_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Bool32x4>), 3)
-
-#define BOOL32X4_FUNCTION_LIST(V)                                                     \
-  BOOL32X4_UNARY_FUNCTION_LIST(V)                                                     \
-  BOOL32X4_BINARY_FUNCTION_LIST(V)                                                    \
-  BOOL32X4_TERNARY_FUNCTION_LIST(V)
-
-// Bool64x2.
-#define BOOL64X2_UNARY_FUNCTION_LIST(V)                                               \
-  V(not, (UnaryFunc<Bool64x2, LogicalNot, Bool64x2>), 1)                              \
-  V(check, (UnaryFunc<Bool64x2, Identity, Bool64x2>), 1)                              \
-  V(splat, (FuncSplat<Bool64x2>), 1)                                                  \
-  V(allTrue, (AllTrue<Bool64x2>), 1)                                                  \
-  V(anyTrue, (AnyTrue<Bool64x2>), 1)
-
-#define BOOL64X2_BINARY_FUNCTION_LIST(V)                                              \
-  V(extractLane, (ExtractLane<Bool64x2>), 2)                                          \
-  V(and, (BinaryFunc<Bool64x2, And, Bool64x2>), 2)                                    \
-  V(or, (BinaryFunc<Bool64x2, Or, Bool64x2>), 2)                                      \
-  V(xor, (BinaryFunc<Bool64x2, Xor, Bool64x2>), 2)                                    \
-
-#define BOOL64X2_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Bool64x2>), 3)
-
-#define BOOL64X2_FUNCTION_LIST(V)                                                     \
-  BOOL64X2_UNARY_FUNCTION_LIST(V)                                                     \
-  BOOL64X2_BINARY_FUNCTION_LIST(V)                                                    \
-  BOOL64X2_TERNARY_FUNCTION_LIST(V)
-
-// Float32x4.
-#define FLOAT32X4_UNARY_FUNCTION_LIST(V)                                              \
-  V(abs, (UnaryFunc<Float32x4, Abs, Float32x4>), 1)                                   \
-  V(check, (UnaryFunc<Float32x4, Identity, Float32x4>), 1)                            \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Float32x4>), 1)                    \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Float32x4>), 1)                    \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Float32x4>), 1)                    \
-  V(fromInt32x4,       (FuncConvert<Int32x4,       Float32x4>), 1)                    \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Float32x4>), 1)                    \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Float32x4>), 1)                    \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Float32x4>), 1)                    \
-  V(fromUint32x4,      (FuncConvert<Uint32x4,      Float32x4>), 1)                    \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Float32x4>), 1)                    \
-  V(neg, (UnaryFunc<Float32x4, Neg, Float32x4>), 1)                                   \
-  V(reciprocalApproximation, (UnaryFunc<Float32x4, RecApprox, Float32x4>), 1)         \
-  V(reciprocalSqrtApproximation, (UnaryFunc<Float32x4, RecSqrtApprox, Float32x4>), 1) \
-  V(splat, (FuncSplat<Float32x4>), 1)                                                 \
-  V(sqrt, (UnaryFunc<Float32x4, Sqrt, Float32x4>), 1)
-
-#define FLOAT32X4_BINARY_FUNCTION_LIST(V)                                             \
-  V(add, (BinaryFunc<Float32x4, Add, Float32x4>), 2)                                  \
-  V(div, (BinaryFunc<Float32x4, Div, Float32x4>), 2)                                  \
-  V(equal, (CompareFunc<Float32x4, Equal, Bool32x4>), 2)                              \
-  V(extractLane, (ExtractLane<Float32x4>), 2)                                         \
-  V(greaterThan, (CompareFunc<Float32x4, GreaterThan, Bool32x4>), 2)                  \
-  V(greaterThanOrEqual, (CompareFunc<Float32x4, GreaterThanOrEqual, Bool32x4>), 2)    \
-  V(lessThan, (CompareFunc<Float32x4, LessThan, Bool32x4>), 2)                        \
-  V(lessThanOrEqual, (CompareFunc<Float32x4, LessThanOrEqual, Bool32x4>), 2)          \
-  V(load,  (Load<Float32x4, 4>), 2)                                                   \
-  V(load3, (Load<Float32x4, 3>), 2)                                                   \
-  V(load2, (Load<Float32x4, 2>), 2)                                                   \
-  V(load1, (Load<Float32x4, 1>), 2)                                                   \
-  V(max, (BinaryFunc<Float32x4, Maximum, Float32x4>), 2)                              \
-  V(maxNum, (BinaryFunc<Float32x4, MaxNum, Float32x4>), 2)                            \
-  V(min, (BinaryFunc<Float32x4, Minimum, Float32x4>), 2)                              \
-  V(minNum, (BinaryFunc<Float32x4, MinNum, Float32x4>), 2)                            \
-  V(mul, (BinaryFunc<Float32x4, Mul, Float32x4>), 2)                                  \
-  V(notEqual, (CompareFunc<Float32x4, NotEqual, Bool32x4>), 2)                        \
-  V(sub, (BinaryFunc<Float32x4, Sub, Float32x4>), 2)
-
-#define FLOAT32X4_TERNARY_FUNCTION_LIST(V)                                            \
-  V(replaceLane, (ReplaceLane<Float32x4>), 3)                                         \
-  V(select, (Select<Float32x4, Bool32x4>), 3)                                         \
-  V(store,  (Store<Float32x4, 4>), 3)                                                 \
-  V(store3, (Store<Float32x4, 3>), 3)                                                 \
-  V(store2, (Store<Float32x4, 2>), 3)                                                 \
-  V(store1, (Store<Float32x4, 1>), 3)
-
-#define FLOAT32X4_SHUFFLE_FUNCTION_LIST(V)                                            \
-  V(swizzle, Swizzle<Float32x4>, 5)                                                   \
-  V(shuffle, Shuffle<Float32x4>, 6)
-
-#define FLOAT32X4_FUNCTION_LIST(V)                                                    \
-  FLOAT32X4_UNARY_FUNCTION_LIST(V)                                                    \
-  FLOAT32X4_BINARY_FUNCTION_LIST(V)                                                   \
-  FLOAT32X4_TERNARY_FUNCTION_LIST(V)                                                  \
-  FLOAT32X4_SHUFFLE_FUNCTION_LIST(V)
-
-// Float64x2.
-#define FLOAT64X2_UNARY_FUNCTION_LIST(V)                                              \
-  V(abs, (UnaryFunc<Float64x2, Abs, Float64x2>), 1)                                   \
-  V(check, (UnaryFunc<Float64x2, Identity, Float64x2>), 1)                            \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Float64x2>), 1)                    \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Float64x2>), 1)                    \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Float64x2>), 1)                    \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Float64x2>), 1)                    \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Float64x2>), 1)                    \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Float64x2>), 1)                    \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Float64x2>), 1)                    \
-  V(neg, (UnaryFunc<Float64x2, Neg, Float64x2>), 1)                                   \
-  V(reciprocalApproximation, (UnaryFunc<Float64x2, RecApprox, Float64x2>), 1)         \
-  V(reciprocalSqrtApproximation, (UnaryFunc<Float64x2, RecSqrtApprox, Float64x2>), 1) \
-  V(splat, (FuncSplat<Float64x2>), 1)                                                 \
-  V(sqrt, (UnaryFunc<Float64x2, Sqrt, Float64x2>), 1)
-
-#define FLOAT64X2_BINARY_FUNCTION_LIST(V)                                             \
-  V(add, (BinaryFunc<Float64x2, Add, Float64x2>), 2)                                  \
-  V(div, (BinaryFunc<Float64x2, Div, Float64x2>), 2)                                  \
-  V(equal, (CompareFunc<Float64x2, Equal, Bool64x2>), 2)                              \
-  V(extractLane, (ExtractLane<Float64x2>), 2)                                         \
-  V(greaterThan, (CompareFunc<Float64x2, GreaterThan, Bool64x2>), 2)                  \
-  V(greaterThanOrEqual, (CompareFunc<Float64x2, GreaterThanOrEqual, Bool64x2>), 2)    \
-  V(lessThan, (CompareFunc<Float64x2, LessThan, Bool64x2>), 2)                        \
-  V(lessThanOrEqual, (CompareFunc<Float64x2, LessThanOrEqual, Bool64x2>), 2)          \
-  V(load,  (Load<Float64x2, 2>), 2)                                                   \
-  V(load1, (Load<Float64x2, 1>), 2)                                                   \
-  V(max, (BinaryFunc<Float64x2, Maximum, Float64x2>), 2)                              \
-  V(maxNum, (BinaryFunc<Float64x2, MaxNum, Float64x2>), 2)                            \
-  V(min, (BinaryFunc<Float64x2, Minimum, Float64x2>), 2)                              \
-  V(minNum, (BinaryFunc<Float64x2, MinNum, Float64x2>), 2)                            \
-  V(mul, (BinaryFunc<Float64x2, Mul, Float64x2>), 2)                                  \
-  V(notEqual, (CompareFunc<Float64x2, NotEqual, Bool64x2>), 2)                        \
-  V(sub, (BinaryFunc<Float64x2, Sub, Float64x2>), 2)
-
-#define FLOAT64X2_TERNARY_FUNCTION_LIST(V)                                            \
-  V(replaceLane, (ReplaceLane<Float64x2>), 3)                                         \
-  V(select, (Select<Float64x2, Bool64x2>), 3)                                         \
-  V(store,  (Store<Float64x2, 2>), 3)                                                 \
-  V(store1, (Store<Float64x2, 1>), 3)
-
-#define FLOAT64X2_SHUFFLE_FUNCTION_LIST(V)                                            \
-  V(swizzle, Swizzle<Float64x2>, 3)                                                   \
-  V(shuffle, Shuffle<Float64x2>, 4)
-
-#define FLOAT64X2_FUNCTION_LIST(V)                                                    \
-  FLOAT64X2_UNARY_FUNCTION_LIST(V)                                                    \
-  FLOAT64X2_BINARY_FUNCTION_LIST(V)                                                   \
-  FLOAT64X2_TERNARY_FUNCTION_LIST(V)                                                  \
-  FLOAT64X2_SHUFFLE_FUNCTION_LIST(V)
-
-// Int8x16.
-#define INT8X16_UNARY_FUNCTION_LIST(V)                                                \
-  V(check, (UnaryFunc<Int8x16, Identity, Int8x16>), 1)                                \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Int8x16>), 1)                      \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Int8x16>), 1)                      \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Int8x16>), 1)                      \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Int8x16>), 1)                      \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Int8x16>), 1)                      \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Int8x16>), 1)                      \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Int8x16>), 1)                      \
-  V(neg, (UnaryFunc<Int8x16, Neg, Int8x16>), 1)                                       \
-  V(not, (UnaryFunc<Int8x16, Not, Int8x16>), 1)                                       \
-  V(splat, (FuncSplat<Int8x16>), 1)
-
-#define INT8X16_BINARY_FUNCTION_LIST(V)                                               \
-  V(add, (BinaryFunc<Int8x16, Add, Int8x16>), 2)                                      \
-  V(addSaturate, (BinaryFunc<Int8x16, AddSaturate, Int8x16>), 2)                      \
-  V(and, (BinaryFunc<Int8x16, And, Int8x16>), 2)                                      \
-  V(equal, (CompareFunc<Int8x16, Equal, Bool8x16>), 2)                                \
-  V(extractLane, (ExtractLane<Int8x16>), 2)                                           \
-  V(greaterThan, (CompareFunc<Int8x16, GreaterThan, Bool8x16>), 2)                    \
-  V(greaterThanOrEqual, (CompareFunc<Int8x16, GreaterThanOrEqual, Bool8x16>), 2)      \
-  V(lessThan, (CompareFunc<Int8x16, LessThan, Bool8x16>), 2)                          \
-  V(lessThanOrEqual, (CompareFunc<Int8x16, LessThanOrEqual, Bool8x16>), 2)            \
-  V(load, (Load<Int8x16, 16>), 2)                                                     \
-  V(mul, (BinaryFunc<Int8x16, Mul, Int8x16>), 2)                                      \
-  V(notEqual, (CompareFunc<Int8x16, NotEqual, Bool8x16>), 2)                          \
-  V(or, (BinaryFunc<Int8x16, Or, Int8x16>), 2)                                        \
-  V(sub, (BinaryFunc<Int8x16, Sub, Int8x16>), 2)                                      \
-  V(subSaturate, (BinaryFunc<Int8x16, SubSaturate, Int8x16>), 2)                      \
-  V(shiftLeftByScalar, (BinaryScalar<Int8x16, ShiftLeft>), 2)                         \
-  V(shiftRightByScalar, (BinaryScalar<Int8x16, ShiftRightArithmetic>), 2)             \
-  V(xor, (BinaryFunc<Int8x16, Xor, Int8x16>), 2)
-
-#define INT8X16_TERNARY_FUNCTION_LIST(V)                                              \
-  V(replaceLane, (ReplaceLane<Int8x16>), 3)                                           \
-  V(select, (Select<Int8x16, Bool8x16>), 3)                                           \
-  V(store, (Store<Int8x16, 16>), 3)
-
-#define INT8X16_SHUFFLE_FUNCTION_LIST(V)                                              \
-  V(swizzle, Swizzle<Int8x16>, 17)                                                    \
-  V(shuffle, Shuffle<Int8x16>, 18)
-
-#define INT8X16_FUNCTION_LIST(V)                                                      \
-  INT8X16_UNARY_FUNCTION_LIST(V)                                                      \
-  INT8X16_BINARY_FUNCTION_LIST(V)                                                     \
-  INT8X16_TERNARY_FUNCTION_LIST(V)                                                    \
-  INT8X16_SHUFFLE_FUNCTION_LIST(V)
-
-// Uint8x16.
-#define UINT8X16_UNARY_FUNCTION_LIST(V)                                               \
-  V(check, (UnaryFunc<Uint8x16, Identity, Uint8x16>), 1)                              \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Uint8x16>), 1)                     \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Uint8x16>), 1)                     \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Uint8x16>), 1)                     \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Uint8x16>), 1)                     \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Uint8x16>), 1)                     \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Uint8x16>), 1)                     \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Uint8x16>), 1)                     \
-  V(neg, (UnaryFunc<Uint8x16, Neg, Uint8x16>), 1)                                     \
-  V(not, (UnaryFunc<Uint8x16, Not, Uint8x16>), 1)                                     \
-  V(splat, (FuncSplat<Uint8x16>), 1)
-
-#define UINT8X16_BINARY_FUNCTION_LIST(V)                                              \
-  V(add, (BinaryFunc<Uint8x16, Add, Uint8x16>), 2)                                    \
-  V(addSaturate, (BinaryFunc<Uint8x16, AddSaturate, Uint8x16>), 2)                    \
-  V(and, (BinaryFunc<Uint8x16, And, Uint8x16>), 2)                                    \
-  V(equal, (CompareFunc<Uint8x16, Equal, Bool8x16>), 2)                               \
-  V(extractLane, (ExtractLane<Uint8x16>), 2)                                          \
-  V(greaterThan, (CompareFunc<Uint8x16, GreaterThan, Bool8x16>), 2)                   \
-  V(greaterThanOrEqual, (CompareFunc<Uint8x16, GreaterThanOrEqual, Bool8x16>), 2)     \
-  V(lessThan, (CompareFunc<Uint8x16, LessThan, Bool8x16>), 2)                         \
-  V(lessThanOrEqual, (CompareFunc<Uint8x16, LessThanOrEqual, Bool8x16>), 2)           \
-  V(load, (Load<Uint8x16, 16>), 2)                                                    \
-  V(mul, (BinaryFunc<Uint8x16, Mul, Uint8x16>), 2)                                    \
-  V(notEqual, (CompareFunc<Uint8x16, NotEqual, Bool8x16>), 2)                         \
-  V(or, (BinaryFunc<Uint8x16, Or, Uint8x16>), 2)                                      \
-  V(sub, (BinaryFunc<Uint8x16, Sub, Uint8x16>), 2)                                    \
-  V(subSaturate, (BinaryFunc<Uint8x16, SubSaturate, Uint8x16>), 2)                    \
-  V(shiftLeftByScalar, (BinaryScalar<Uint8x16, ShiftLeft>), 2)                        \
-  V(shiftRightByScalar, (BinaryScalar<Uint8x16, ShiftRightLogical>), 2)               \
-  V(xor, (BinaryFunc<Uint8x16, Xor, Uint8x16>), 2)
-
-#define UINT8X16_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Uint8x16>), 3)                                          \
-  V(select, (Select<Uint8x16, Bool8x16>), 3)                                          \
-  V(store, (Store<Uint8x16, 16>), 3)
-
-#define UINT8X16_SHUFFLE_FUNCTION_LIST(V)                                             \
-  V(swizzle, Swizzle<Uint8x16>, 17)                                                   \
-  V(shuffle, Shuffle<Uint8x16>, 18)
-
-#define UINT8X16_FUNCTION_LIST(V)                                                     \
-  UINT8X16_UNARY_FUNCTION_LIST(V)                                                     \
-  UINT8X16_BINARY_FUNCTION_LIST(V)                                                    \
-  UINT8X16_TERNARY_FUNCTION_LIST(V)                                                   \
-  UINT8X16_SHUFFLE_FUNCTION_LIST(V)
-
-// Int16x8.
-#define INT16X8_UNARY_FUNCTION_LIST(V)                                                \
-  V(check, (UnaryFunc<Int16x8, Identity, Int16x8>), 1)                                \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Int16x8>), 1)                      \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Int16x8>), 1)                      \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Int16x8>), 1)                      \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Int16x8>), 1)                      \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Int16x8>), 1)                      \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Int16x8>), 1)                      \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Int16x8>), 1)                      \
-  V(neg, (UnaryFunc<Int16x8, Neg, Int16x8>), 1)                                       \
-  V(not, (UnaryFunc<Int16x8, Not, Int16x8>), 1)                                       \
-  V(splat, (FuncSplat<Int16x8>), 1)
-
-#define INT16X8_BINARY_FUNCTION_LIST(V)                                               \
-  V(add, (BinaryFunc<Int16x8, Add, Int16x8>), 2)                                      \
-  V(addSaturate, (BinaryFunc<Int16x8, AddSaturate, Int16x8>), 2)                      \
-  V(and, (BinaryFunc<Int16x8, And, Int16x8>), 2)                                      \
-  V(equal, (CompareFunc<Int16x8, Equal, Bool16x8>), 2)                                \
-  V(extractLane, (ExtractLane<Int16x8>), 2)                                           \
-  V(greaterThan, (CompareFunc<Int16x8, GreaterThan, Bool16x8>), 2)                    \
-  V(greaterThanOrEqual, (CompareFunc<Int16x8, GreaterThanOrEqual, Bool16x8>), 2)      \
-  V(lessThan, (CompareFunc<Int16x8, LessThan, Bool16x8>), 2)                          \
-  V(lessThanOrEqual, (CompareFunc<Int16x8, LessThanOrEqual, Bool16x8>), 2)            \
-  V(load, (Load<Int16x8, 8>), 2)                                                      \
-  V(mul, (BinaryFunc<Int16x8, Mul, Int16x8>), 2)                                      \
-  V(notEqual, (CompareFunc<Int16x8, NotEqual, Bool16x8>), 2)                          \
-  V(or, (BinaryFunc<Int16x8, Or, Int16x8>), 2)                                        \
-  V(sub, (BinaryFunc<Int16x8, Sub, Int16x8>), 2)                                      \
-  V(subSaturate, (BinaryFunc<Int16x8, SubSaturate, Int16x8>), 2)                      \
-  V(shiftLeftByScalar, (BinaryScalar<Int16x8, ShiftLeft>), 2)                         \
-  V(shiftRightByScalar, (BinaryScalar<Int16x8, ShiftRightArithmetic>), 2)             \
-  V(xor, (BinaryFunc<Int16x8, Xor, Int16x8>), 2)
-
-#define INT16X8_TERNARY_FUNCTION_LIST(V)                                              \
-  V(replaceLane, (ReplaceLane<Int16x8>), 3)                                           \
-  V(select, (Select<Int16x8, Bool16x8>), 3)                                           \
-  V(store, (Store<Int16x8, 8>), 3)
-
-#define INT16X8_SHUFFLE_FUNCTION_LIST(V)                                              \
-  V(swizzle, Swizzle<Int16x8>, 9)                                                     \
-  V(shuffle, Shuffle<Int16x8>, 10)
-
-#define INT16X8_FUNCTION_LIST(V)                                                      \
-  INT16X8_UNARY_FUNCTION_LIST(V)                                                      \
-  INT16X8_BINARY_FUNCTION_LIST(V)                                                     \
-  INT16X8_TERNARY_FUNCTION_LIST(V)                                                    \
-  INT16X8_SHUFFLE_FUNCTION_LIST(V)
-
-// Uint16x8.
-#define UINT16X8_UNARY_FUNCTION_LIST(V)                                               \
-  V(check, (UnaryFunc<Uint16x8, Identity, Uint16x8>), 1)                              \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Uint16x8>), 1)                     \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Uint16x8>), 1)                     \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Uint16x8>), 1)                     \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Uint16x8>), 1)                     \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Uint16x8>), 1)                     \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Uint16x8>), 1)                     \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Uint16x8>), 1)                     \
-  V(neg, (UnaryFunc<Uint16x8, Neg, Uint16x8>), 1)                                     \
-  V(not, (UnaryFunc<Uint16x8, Not, Uint16x8>), 1)                                     \
-  V(splat, (FuncSplat<Uint16x8>), 1)
-
-#define UINT16X8_BINARY_FUNCTION_LIST(V)                                              \
-  V(add, (BinaryFunc<Uint16x8, Add, Uint16x8>), 2)                                    \
-  V(addSaturate, (BinaryFunc<Uint16x8, AddSaturate, Uint16x8>), 2)                    \
-  V(and, (BinaryFunc<Uint16x8, And, Uint16x8>), 2)                                    \
-  V(equal, (CompareFunc<Uint16x8, Equal, Bool16x8>), 2)                               \
-  V(extractLane, (ExtractLane<Uint16x8>), 2)                                          \
-  V(greaterThan, (CompareFunc<Uint16x8, GreaterThan, Bool16x8>), 2)                   \
-  V(greaterThanOrEqual, (CompareFunc<Uint16x8, GreaterThanOrEqual, Bool16x8>), 2)     \
-  V(lessThan, (CompareFunc<Uint16x8, LessThan, Bool16x8>), 2)                         \
-  V(lessThanOrEqual, (CompareFunc<Uint16x8, LessThanOrEqual, Bool16x8>), 2)           \
-  V(load, (Load<Uint16x8, 8>), 2)                                                     \
-  V(mul, (BinaryFunc<Uint16x8, Mul, Uint16x8>), 2)                                    \
-  V(notEqual, (CompareFunc<Uint16x8, NotEqual, Bool16x8>), 2)                         \
-  V(or, (BinaryFunc<Uint16x8, Or, Uint16x8>), 2)                                      \
-  V(sub, (BinaryFunc<Uint16x8, Sub, Uint16x8>), 2)                                    \
-  V(subSaturate, (BinaryFunc<Uint16x8, SubSaturate, Uint16x8>), 2)                    \
-  V(shiftLeftByScalar, (BinaryScalar<Uint16x8, ShiftLeft>), 2)                        \
-  V(shiftRightByScalar, (BinaryScalar<Uint16x8, ShiftRightLogical>), 2)               \
-  V(xor, (BinaryFunc<Uint16x8, Xor, Uint16x8>), 2)
-
-#define UINT16X8_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Uint16x8>), 3)                                          \
-  V(select, (Select<Uint16x8, Bool16x8>), 3)                                          \
-  V(store, (Store<Uint16x8, 8>), 3)
-
-#define UINT16X8_SHUFFLE_FUNCTION_LIST(V)                                             \
-  V(swizzle, Swizzle<Uint16x8>, 9)                                                    \
-  V(shuffle, Shuffle<Uint16x8>, 10)
-
-#define UINT16X8_FUNCTION_LIST(V)                                                     \
-  UINT16X8_UNARY_FUNCTION_LIST(V)                                                     \
-  UINT16X8_BINARY_FUNCTION_LIST(V)                                                    \
-  UINT16X8_TERNARY_FUNCTION_LIST(V)                                                   \
-  UINT16X8_SHUFFLE_FUNCTION_LIST(V)
-
-// Int32x4.
-#define INT32X4_UNARY_FUNCTION_LIST(V)                                                \
-  V(check, (UnaryFunc<Int32x4, Identity, Int32x4>), 1)                                \
-  V(fromFloat32x4,     (FuncConvert<Float32x4,     Int32x4>), 1)                      \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Int32x4>), 1)                      \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Int32x4>), 1)                      \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Int32x4>), 1)                      \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Int32x4>), 1)                      \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Int32x4>), 1)                      \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Int32x4>), 1)                      \
-  V(fromUint32x4Bits,  (FuncConvertBits<Uint32x4,  Int32x4>), 1)                      \
-  V(neg, (UnaryFunc<Int32x4, Neg, Int32x4>), 1)                                       \
-  V(not, (UnaryFunc<Int32x4, Not, Int32x4>), 1)                                       \
-  V(splat, (FuncSplat<Int32x4>), 0)
-
-#define INT32X4_BINARY_FUNCTION_LIST(V)                                               \
-  V(add, (BinaryFunc<Int32x4, Add, Int32x4>), 2)                                      \
-  V(and, (BinaryFunc<Int32x4, And, Int32x4>), 2)                                      \
-  V(equal, (CompareFunc<Int32x4, Equal, Bool32x4>), 2)                                \
-  V(extractLane, (ExtractLane<Int32x4>), 2)                                           \
-  V(greaterThan, (CompareFunc<Int32x4, GreaterThan, Bool32x4>), 2)                    \
-  V(greaterThanOrEqual, (CompareFunc<Int32x4, GreaterThanOrEqual, Bool32x4>), 2)      \
-  V(lessThan, (CompareFunc<Int32x4, LessThan, Bool32x4>), 2)                          \
-  V(lessThanOrEqual, (CompareFunc<Int32x4, LessThanOrEqual, Bool32x4>), 2)            \
-  V(load,  (Load<Int32x4, 4>), 2)                                                     \
-  V(load3, (Load<Int32x4, 3>), 2)                                                     \
-  V(load2, (Load<Int32x4, 2>), 2)                                                     \
-  V(load1, (Load<Int32x4, 1>), 2)                                                     \
-  V(mul, (BinaryFunc<Int32x4, Mul, Int32x4>), 2)                                      \
-  V(notEqual, (CompareFunc<Int32x4, NotEqual, Bool32x4>), 2)                          \
-  V(or, (BinaryFunc<Int32x4, Or, Int32x4>), 2)                                        \
-  V(sub, (BinaryFunc<Int32x4, Sub, Int32x4>), 2)                                      \
-  V(shiftLeftByScalar, (BinaryScalar<Int32x4, ShiftLeft>), 2)                         \
-  V(shiftRightByScalar, (BinaryScalar<Int32x4, ShiftRightArithmetic>), 2)             \
-  V(xor, (BinaryFunc<Int32x4, Xor, Int32x4>), 2)
-
-#define INT32X4_TERNARY_FUNCTION_LIST(V)                                              \
-  V(replaceLane, (ReplaceLane<Int32x4>), 3)                                           \
-  V(select, (Select<Int32x4, Bool32x4>), 3)                                           \
-  V(store,  (Store<Int32x4, 4>), 3)                                                   \
-  V(store3, (Store<Int32x4, 3>), 3)                                                   \
-  V(store2, (Store<Int32x4, 2>), 3)                                                   \
-  V(store1, (Store<Int32x4, 1>), 3)
-
-#define INT32X4_SHUFFLE_FUNCTION_LIST(V)                                              \
-  V(swizzle, Swizzle<Int32x4>, 5)                                                     \
-  V(shuffle, Shuffle<Int32x4>, 6)
-
-#define INT32X4_FUNCTION_LIST(V)                                                      \
-  INT32X4_UNARY_FUNCTION_LIST(V)                                                      \
-  INT32X4_BINARY_FUNCTION_LIST(V)                                                     \
-  INT32X4_TERNARY_FUNCTION_LIST(V)                                                    \
-  INT32X4_SHUFFLE_FUNCTION_LIST(V)
-
-// Uint32x4.
-#define UINT32X4_UNARY_FUNCTION_LIST(V)                                               \
-  V(check, (UnaryFunc<Uint32x4, Identity, Uint32x4>), 1)                              \
-  V(fromFloat32x4,     (FuncConvert<Float32x4,     Uint32x4>), 1)                     \
-  V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Uint32x4>), 1)                     \
-  V(fromFloat64x2Bits, (FuncConvertBits<Float64x2, Uint32x4>), 1)                     \
-  V(fromInt8x16Bits,   (FuncConvertBits<Int8x16,   Uint32x4>), 1)                     \
-  V(fromInt16x8Bits,   (FuncConvertBits<Int16x8,   Uint32x4>), 1)                     \
-  V(fromInt32x4Bits,   (FuncConvertBits<Int32x4,   Uint32x4>), 1)                     \
-  V(fromUint8x16Bits,  (FuncConvertBits<Uint8x16,  Uint32x4>), 1)                     \
-  V(fromUint16x8Bits,  (FuncConvertBits<Uint16x8,  Uint32x4>), 1)                     \
-  V(neg, (UnaryFunc<Uint32x4, Neg, Uint32x4>), 1)                                     \
-  V(not, (UnaryFunc<Uint32x4, Not, Uint32x4>), 1)                                     \
-  V(splat, (FuncSplat<Uint32x4>), 0)
-
-#define UINT32X4_BINARY_FUNCTION_LIST(V)                                              \
-  V(add, (BinaryFunc<Uint32x4, Add, Uint32x4>), 2)                                    \
-  V(and, (BinaryFunc<Uint32x4, And, Uint32x4>), 2)                                    \
-  V(equal, (CompareFunc<Uint32x4, Equal, Bool32x4>), 2)                               \
-  V(extractLane, (ExtractLane<Uint32x4>), 2)                                          \
-  V(greaterThan, (CompareFunc<Uint32x4, GreaterThan, Bool32x4>), 2)                   \
-  V(greaterThanOrEqual, (CompareFunc<Uint32x4, GreaterThanOrEqual, Bool32x4>), 2)     \
-  V(lessThan, (CompareFunc<Uint32x4, LessThan, Bool32x4>), 2)                         \
-  V(lessThanOrEqual, (CompareFunc<Uint32x4, LessThanOrEqual, Bool32x4>), 2)           \
-  V(load,  (Load<Uint32x4, 4>), 2)                                                    \
-  V(load3, (Load<Uint32x4, 3>), 2)                                                    \
-  V(load2, (Load<Uint32x4, 2>), 2)                                                    \
-  V(load1, (Load<Uint32x4, 1>), 2)                                                    \
-  V(mul, (BinaryFunc<Uint32x4, Mul, Uint32x4>), 2)                                    \
-  V(notEqual, (CompareFunc<Uint32x4, NotEqual, Bool32x4>), 2)                         \
-  V(or, (BinaryFunc<Uint32x4, Or, Uint32x4>), 2)                                      \
-  V(sub, (BinaryFunc<Uint32x4, Sub, Uint32x4>), 2)                                    \
-  V(shiftLeftByScalar, (BinaryScalar<Uint32x4, ShiftLeft>), 2)                        \
-  V(shiftRightByScalar, (BinaryScalar<Uint32x4, ShiftRightLogical>), 2)               \
-  V(xor, (BinaryFunc<Uint32x4, Xor, Uint32x4>), 2)
-
-#define UINT32X4_TERNARY_FUNCTION_LIST(V)                                             \
-  V(replaceLane, (ReplaceLane<Uint32x4>), 3)                                          \
-  V(select, (Select<Uint32x4, Bool32x4>), 3)                                          \
-  V(store,  (Store<Uint32x4, 4>), 3)                                                  \
-  V(store3, (Store<Uint32x4, 3>), 3)                                                  \
-  V(store2, (Store<Uint32x4, 2>), 3)                                                  \
-  V(store1, (Store<Uint32x4, 1>), 3)
-
-#define UINT32X4_SHUFFLE_FUNCTION_LIST(V)                                             \
-  V(swizzle, Swizzle<Uint32x4>, 5)                                                    \
-  V(shuffle, Shuffle<Uint32x4>, 6)
-
-#define UINT32X4_FUNCTION_LIST(V)                                                     \
-  UINT32X4_UNARY_FUNCTION_LIST(V)                                                     \
-  UINT32X4_BINARY_FUNCTION_LIST(V)                                                    \
-  UINT32X4_TERNARY_FUNCTION_LIST(V)                                                   \
-  UINT32X4_SHUFFLE_FUNCTION_LIST(V)
-
-/*
- * The FOREACH macros below partition all of the SIMD operations into disjoint
- * sets.
- */
-
-// Operations available on all SIMD types. Mixed arity.
-#define FOREACH_COMMON_SIMD_OP(_)     \
-    _(extractLane)                    \
-    _(replaceLane)                    \
-    _(check)                          \
-    _(splat)
-
-// Lanewise operations available on numeric SIMD types.
-// Include lane-wise select here since it is not arithmetic and defined on
-// numeric types too.
-#define FOREACH_LANE_SIMD_OP(_)       \
-    _(select)                         \
-    _(swizzle)                        \
-    _(shuffle)
-
-// Memory operations available on numeric SIMD types.
-#define FOREACH_MEMORY_SIMD_OP(_)     \
-    _(load)                           \
-    _(store)
-
-// Memory operations available on numeric X4 SIMD types.
-#define FOREACH_MEMORY_X4_SIMD_OP(_)  \
-    _(load1)                          \
-    _(load2)                          \
-    _(load3)                          \
-    _(store1)                         \
-    _(store2)                         \
-    _(store3)
-
-// Unary operations on Bool vectors.
-#define FOREACH_BOOL_SIMD_UNOP(_)     \
-    _(allTrue)                        \
-    _(anyTrue)
-
-// Unary bitwise SIMD operators defined on all integer and boolean SIMD types.
-#define FOREACH_BITWISE_SIMD_UNOP(_)  \
-    _(not)
-
-// Binary bitwise SIMD operators defined on all integer and boolean SIMD types.
-#define FOREACH_BITWISE_SIMD_BINOP(_) \
-    _(and)                            \
-    _(or)                             \
-    _(xor)
-
-// Bitwise shifts defined on integer SIMD types.
-#define FOREACH_SHIFT_SIMD_OP(_)      \
-    _(shiftLeftByScalar)              \
-    _(shiftRightByScalar)
-
-// Unary arithmetic operators defined on numeric SIMD types.
-#define FOREACH_NUMERIC_SIMD_UNOP(_)  \
-    _(neg)
-
-// Binary arithmetic operators defined on numeric SIMD types.
-#define FOREACH_NUMERIC_SIMD_BINOP(_) \
-    _(add)                            \
-    _(sub)                            \
-    _(mul)
-
-// Unary arithmetic operators defined on floating point SIMD types.
-#define FOREACH_FLOAT_SIMD_UNOP(_)    \
-    _(abs)                            \
-    _(sqrt)                           \
-    _(reciprocalApproximation)        \
-    _(reciprocalSqrtApproximation)
-
-// Binary arithmetic operators defined on floating point SIMD types.
-#define FOREACH_FLOAT_SIMD_BINOP(_)   \
-    _(div)                            \
-    _(max)                            \
-    _(min)                            \
-    _(maxNum)                         \
-    _(minNum)
-
-// Binary operations on small integer (< 32 bits) vectors.
-#define FOREACH_SMINT_SIMD_BINOP(_)   \
-    _(addSaturate)                    \
-    _(subSaturate)
-
-// Comparison operators defined on numeric SIMD types.
-#define FOREACH_COMP_SIMD_OP(_)       \
-    _(lessThan)                       \
-    _(lessThanOrEqual)                \
-    _(equal)                          \
-    _(notEqual)                       \
-    _(greaterThan)                    \
-    _(greaterThanOrEqual)
-
-/*
- * All SIMD operations, excluding casts.
- */
-#define FORALL_SIMD_NONCAST_OP(_)     \
-    FOREACH_COMMON_SIMD_OP(_)         \
-    FOREACH_LANE_SIMD_OP(_)           \
-    FOREACH_MEMORY_SIMD_OP(_)         \
-    FOREACH_MEMORY_X4_SIMD_OP(_)      \
-    FOREACH_BOOL_SIMD_UNOP(_)         \
-    FOREACH_BITWISE_SIMD_UNOP(_)      \
-    FOREACH_BITWISE_SIMD_BINOP(_)     \
-    FOREACH_SHIFT_SIMD_OP(_)          \
-    FOREACH_NUMERIC_SIMD_UNOP(_)      \
-    FOREACH_NUMERIC_SIMD_BINOP(_)     \
-    FOREACH_FLOAT_SIMD_UNOP(_)        \
-    FOREACH_FLOAT_SIMD_BINOP(_)       \
-    FOREACH_SMINT_SIMD_BINOP(_)       \
-    FOREACH_COMP_SIMD_OP(_)
-
-/*
- * All operations on integer SIMD types, excluding casts and
- * FOREACH_MEMORY_X4_OP.
- */
-#define FORALL_INT_SIMD_OP(_)         \
-    FOREACH_COMMON_SIMD_OP(_)         \
-    FOREACH_LANE_SIMD_OP(_)           \
-    FOREACH_MEMORY_SIMD_OP(_)         \
-    FOREACH_BITWISE_SIMD_UNOP(_)      \
-    FOREACH_BITWISE_SIMD_BINOP(_)     \
-    FOREACH_SHIFT_SIMD_OP(_)          \
-    FOREACH_NUMERIC_SIMD_UNOP(_)      \
-    FOREACH_NUMERIC_SIMD_BINOP(_)     \
-    FOREACH_COMP_SIMD_OP(_)
-
-/*
- * All operations on floating point SIMD types, excluding casts and
- * FOREACH_MEMORY_X4_OP.
- */
-#define FORALL_FLOAT_SIMD_OP(_)       \
-    FOREACH_COMMON_SIMD_OP(_)         \
-    FOREACH_LANE_SIMD_OP(_)           \
-    FOREACH_MEMORY_SIMD_OP(_)         \
-    FOREACH_NUMERIC_SIMD_UNOP(_)      \
-    FOREACH_NUMERIC_SIMD_BINOP(_)     \
-    FOREACH_FLOAT_SIMD_UNOP(_)        \
-    FOREACH_FLOAT_SIMD_BINOP(_)       \
-    FOREACH_COMP_SIMD_OP(_)
-
-/*
- * All operations on Bool SIMD types.
- *
- * These types don't have casts, so no need to specialize.
- */
-#define FORALL_BOOL_SIMD_OP(_)        \
-    FOREACH_COMMON_SIMD_OP(_)         \
-    FOREACH_BOOL_SIMD_UNOP(_)         \
-    FOREACH_BITWISE_SIMD_UNOP(_)      \
-    FOREACH_BITWISE_SIMD_BINOP(_)
-
-/*
- * The sets of cast operations are listed per type below.
- *
- * These sets are not disjoint.
- */
-
-#define FOREACH_INT8X16_SIMD_CAST(_)  \
-    _(fromFloat32x4Bits)              \
-    _(fromFloat64x2Bits)              \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4Bits)
-
-#define FOREACH_INT16X8_SIMD_CAST(_)  \
-    _(fromFloat32x4Bits)              \
-    _(fromFloat64x2Bits)              \
-    _(fromInt8x16Bits)                \
-    _(fromInt32x4Bits)
-
-#define FOREACH_INT32X4_SIMD_CAST(_)  \
-    _(fromFloat32x4)                  \
-    _(fromFloat32x4Bits)              \
-    _(fromFloat64x2Bits)              \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)
-
-#define FOREACH_FLOAT32X4_SIMD_CAST(_)\
-    _(fromFloat64x2Bits)              \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4)                    \
-    _(fromInt32x4Bits)
-
-#define FOREACH_FLOAT64X2_SIMD_CAST(_)\
-    _(fromFloat32x4Bits)              \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4Bits)
-
-// All operations on Int32x4.
-#define FORALL_INT32X4_SIMD_OP(_)     \
-    FORALL_INT_SIMD_OP(_)             \
-    FOREACH_MEMORY_X4_SIMD_OP(_)      \
-    FOREACH_INT32X4_SIMD_CAST(_)
-
-// All operations on Float32X4
-#define FORALL_FLOAT32X4_SIMD_OP(_)   \
-    FORALL_FLOAT_SIMD_OP(_)           \
-    FOREACH_MEMORY_X4_SIMD_OP(_)      \
-    FOREACH_FLOAT32X4_SIMD_CAST(_)
-
-/*
- * All SIMD operations assuming only 32x4 types exist.
- * This is used in the current asm.js impl.
- */
-#define FORALL_SIMD_ASMJS_OP(_)       \
-    FORALL_SIMD_NONCAST_OP(_)         \
-    _(fromFloat32x4)                  \
-    _(fromFloat32x4Bits)              \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4)                    \
-    _(fromInt32x4Bits)                \
-    _(fromUint8x16Bits)               \
-    _(fromUint16x8Bits)               \
-    _(fromUint32x4)                   \
-    _(fromUint32x4Bits)
-
-// All operations on Int8x16 or Uint8x16 in the asm.js world.
-// Note: this does not include conversions and casts to/from Uint8x16 because
-// this list is shared between Int8x16 and Uint8x16.
-#define FORALL_INT8X16_ASMJS_OP(_)    \
-    FORALL_INT_SIMD_OP(_)             \
-    FOREACH_SMINT_SIMD_BINOP(_)       \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4Bits)                \
-    _(fromFloat32x4Bits)
-
-// All operations on Int16x8 or Uint16x8 in the asm.js world.
-// Note: this does not include conversions and casts to/from Uint16x8 because
-// this list is shared between Int16x8 and Uint16x8.
-#define FORALL_INT16X8_ASMJS_OP(_)    \
-    FORALL_INT_SIMD_OP(_)             \
-    FOREACH_SMINT_SIMD_BINOP(_)       \
-    _(fromInt8x16Bits)                \
-    _(fromInt32x4Bits)                \
-    _(fromFloat32x4Bits)
-
-// All operations on Int32x4 or Uint32x4 in the asm.js world.
-// Note: this does not include conversions and casts to/from Uint32x4 because
-// this list is shared between Int32x4 and Uint32x4.
-#define FORALL_INT32X4_ASMJS_OP(_)    \
-    FORALL_INT_SIMD_OP(_)             \
-    FOREACH_MEMORY_X4_SIMD_OP(_)      \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)                \
-    _(fromFloat32x4)                  \
-    _(fromFloat32x4Bits)
-
-// All operations on Float32X4 in the asm.js world.
-#define FORALL_FLOAT32X4_ASMJS_OP(_)  \
-    FORALL_FLOAT_SIMD_OP(_)           \
-    FOREACH_MEMORY_X4_SIMD_OP(_)      \
-    _(fromInt8x16Bits)                \
-    _(fromInt16x8Bits)                \
-    _(fromInt32x4Bits)                \
-    _(fromInt32x4)                    \
-    _(fromUint32x4)
-
-namespace js {
-
-// Complete set of SIMD types.
-// It must be kept in sync with the enumeration of values in
-// TypedObjectConstants.h; in particular we need to ensure that Count is
-// appropriately set with respect to the number of actual types.
-enum class SimdType {
-    Int8x16   = JS_SIMDTYPEREPR_INT8X16,
-    Int16x8   = JS_SIMDTYPEREPR_INT16X8,
-    Int32x4   = JS_SIMDTYPEREPR_INT32X4,
-    Uint8x16  = JS_SIMDTYPEREPR_UINT8X16,
-    Uint16x8  = JS_SIMDTYPEREPR_UINT16X8,
-    Uint32x4  = JS_SIMDTYPEREPR_UINT32X4,
-    Float32x4 = JS_SIMDTYPEREPR_FLOAT32X4,
-    Float64x2 = JS_SIMDTYPEREPR_FLOAT64X2,
-    Bool8x16  = JS_SIMDTYPEREPR_BOOL8X16,
-    Bool16x8  = JS_SIMDTYPEREPR_BOOL16X8,
-    Bool32x4  = JS_SIMDTYPEREPR_BOOL32X4,
-    Bool64x2  = JS_SIMDTYPEREPR_BOOL64X2,
-    Count
-};
-
-// The integer SIMD types have a lot of operations that do the exact same thing
-// for signed and unsigned integer types. Sometimes it is simpler to treat
-// signed and unsigned integer SIMD types as the same type, using a SimdSign to
-// distinguish the few cases where there is a difference.
-enum class SimdSign {
-    // Signedness is not applicable to this type. (i.e., Float or Bool).
-    NotApplicable,
-    // Treat as an unsigned integer with a range 0 .. 2^N-1.
-    Unsigned,
-    // Treat as a signed integer in two's complement encoding.
-    Signed,
-};
-
-// Get the signedness of a SIMD type.
-inline SimdSign
-GetSimdSign(SimdType t)
-{
-    switch(t) {
-      case SimdType::Int8x16:
-      case SimdType::Int16x8:
-      case SimdType::Int32x4:
-        return SimdSign::Signed;
-
-      case SimdType::Uint8x16:
-      case SimdType::Uint16x8:
-      case SimdType::Uint32x4:
-        return SimdSign::Unsigned;
-
-      default:
-        return SimdSign::NotApplicable;
-    }
-}
-
-inline bool
-IsSignedIntSimdType(SimdType type)
-{
-    return GetSimdSign(type) == SimdSign::Signed;
-}
-
-// Get the boolean SIMD type with the same shape as t.
-//
-// This is the result type of a comparison operation, and it can also be used to
-// identify the geometry of a SIMD type.
-inline SimdType
-GetBooleanSimdType(SimdType t)
-{
-    switch(t) {
-      case SimdType::Int8x16:
-      case SimdType::Uint8x16:
-      case SimdType::Bool8x16:
-        return SimdType::Bool8x16;
-
-      case SimdType::Int16x8:
-      case SimdType::Uint16x8:
-      case SimdType::Bool16x8:
-        return SimdType::Bool16x8;
-
-      case SimdType::Int32x4:
-      case SimdType::Uint32x4:
-      case SimdType::Float32x4:
-      case SimdType::Bool32x4:
-        return SimdType::Bool32x4;
-
-      case SimdType::Float64x2:
-      case SimdType::Bool64x2:
-        return SimdType::Bool64x2;
-
-      case SimdType::Count:
-        break;
-    }
-    MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Bad SIMD type");
-}
-
-// Get the number of lanes in a SIMD type.
-inline unsigned
-GetSimdLanes(SimdType t)
-{
-    switch(t) {
-      case SimdType::Int8x16:
-      case SimdType::Uint8x16:
-      case SimdType::Bool8x16:
-        return 16;
-
-      case SimdType::Int16x8:
-      case SimdType::Uint16x8:
-      case SimdType::Bool16x8:
-        return 8;
-
-      case SimdType::Int32x4:
-      case SimdType::Uint32x4:
-      case SimdType::Float32x4:
-      case SimdType::Bool32x4:
-        return 4;
-
-      case SimdType::Float64x2:
-      case SimdType::Bool64x2:
-        return 2;
-
-      case SimdType::Count:
-        break;
-    }
-    MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Bad SIMD type");
-}
-
-// Complete set of SIMD operations.
-//
-// No SIMD types implement all of these operations.
-//
-// C++ defines keywords and/or/xor/not, so prepend Fn_ to all named functions to
-// avoid clashes.
-//
-// Note: because of a gcc < v4.8's compiler bug, uint8_t can't be used as the
-// storage class here. See bug 1243810. See also
-// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64037 .
-enum class SimdOperation {
-    // The constructor call. No Fn_ prefix here.
-    Constructor,
-
-    // All the operations, except for casts.
-#define DEFOP(x) Fn_##x,
-    FORALL_SIMD_NONCAST_OP(DEFOP)
-#undef DEFOP
-
-    // Int <-> Float conversions.
-    Fn_fromInt32x4,
-    Fn_fromUint32x4,
-    Fn_fromFloat32x4,
-
-    // Bitcasts. One for each type with a memory representation.
-    Fn_fromInt8x16Bits,
-    Fn_fromInt16x8Bits,
-    Fn_fromInt32x4Bits,
-    Fn_fromUint8x16Bits,
-    Fn_fromUint16x8Bits,
-    Fn_fromUint32x4Bits,
-    Fn_fromFloat32x4Bits,
-    Fn_fromFloat64x2Bits,
-
-    Last = Fn_fromFloat64x2Bits
-};
-
-} // namespace js
-
-#endif /* builtin_SIMDConstants_h */
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -3975,22 +3975,17 @@ ShellCloneAndExecuteScript(JSContext* cx
     args.rval().setUndefined();
     return true;
 }
 
 static bool
 IsSimdAvailable(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
-#if defined(JS_CODEGEN_NONE) || !defined(ENABLE_SIMD)
-    bool available = false;
-#else
-    bool available = cx->jitSupportsSimd();
-#endif
-    args.rval().set(BooleanValue(available));
+    args.rval().set(BooleanValue(cx->jitSupportsSimd()));
     return true;
 }
 
 static bool
 ByteSize(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     mozilla::MallocSizeOf mallocSizeOf = cx->runtime()->debuggerMallocSizeOf;
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -6,17 +6,16 @@
 
 #include "builtin/TypedObject-inl.h"
 
 #include "mozilla/Casting.h"
 #include "mozilla/CheckedInt.h"
 
 #include "jsutil.h"
 
-#include "builtin/SIMDConstants.h"
 #include "gc/Marking.h"
 #include "js/Vector.h"
 #include "util/StringBuffer.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSFunction.h"
 #include "vm/Realm.h"
 #include "vm/SelfHosting.h"
 #include "vm/StringType.h"
@@ -239,20 +238,16 @@ ScalarTypeDescr::alignment(Type t)
 ScalarTypeDescr::typeName(Type type)
 {
     switch (type) {
 #define NUMERIC_TYPE_TO_STRING(constant_, type_, name_) \
         case constant_: return #name_;
         JS_FOR_EACH_SCALAR_TYPE_REPR(NUMERIC_TYPE_TO_STRING)
 #undef NUMERIC_TYPE_TO_STRING
       case Scalar::Int64:
-      case Scalar::Float32x4:
-      case Scalar::Int8x16:
-      case Scalar::Int16x8:
-      case Scalar::Int32x4:
       case Scalar::MaxTypedArrayViewType:
         break;
     }
     MOZ_CRASH("Invalid type");
 }
 
 bool
 ScalarTypeDescr::call(JSContext* cx, unsigned argc, Value* vp)
@@ -280,20 +275,16 @@ ScalarTypeDescr::call(JSContext* cx, uns
           type_ converted = ConvertScalar<type_>(number);                     \
           args.rval().setNumber((double) converted);                          \
           return true;                                                        \
       }
 
         JS_FOR_EACH_SCALAR_TYPE_REPR(SCALARTYPE_CALL)
 #undef SCALARTYPE_CALL
       case Scalar::Int64:
-      case Scalar::Float32x4:
-      case Scalar::Int8x16:
-      case Scalar::Int16x8:
-      case Scalar::Int32x4:
       case Scalar::MaxTypedArrayViewType:
         MOZ_CRASH();
     }
     return true;
 }
 
 /***************************************************************************
  * Reference type objects
@@ -397,60 +388,16 @@ js::ReferenceTypeDescr::call(JSContext* 
         return true;
       }
     }
 
     MOZ_CRASH("Unhandled Reference type");
 }
 
 /***************************************************************************
- * SIMD type objects
- *
- * Note: these are partially defined in SIMD.cpp
- */
-
-SimdType
-SimdTypeDescr::type() const {
-    uint32_t t = uint32_t(getReservedSlot(JS_DESCR_SLOT_TYPE).toInt32());
-    MOZ_ASSERT(t < uint32_t(SimdType::Count));
-    return SimdType(t);
-}
-
-uint32_t
-SimdTypeDescr::size(SimdType t)
-{
-    MOZ_ASSERT(unsigned(t) < unsigned(SimdType::Count));
-    switch (t) {
-      case SimdType::Int8x16:
-      case SimdType::Int16x8:
-      case SimdType::Int32x4:
-      case SimdType::Uint8x16:
-      case SimdType::Uint16x8:
-      case SimdType::Uint32x4:
-      case SimdType::Float32x4:
-      case SimdType::Float64x2:
-      case SimdType::Bool8x16:
-      case SimdType::Bool16x8:
-      case SimdType::Bool32x4:
-      case SimdType::Bool64x2:
-        return 16;
-      case SimdType::Count:
-        break;
-    }
-    MOZ_CRASH("unexpected SIMD type");
-}
-
-uint32_t
-SimdTypeDescr::alignment(SimdType t)
-{
-    MOZ_ASSERT(unsigned(t) < unsigned(SimdType::Count));
-    return size(t);
-}
-
-/***************************************************************************
  * ArrayMetaTypeDescr class
  */
 
 /*
  * For code like:
  *
  *   var A = new TypedObject.ArrayType(uint8, 10);
  *   var S = new TypedObject.StructType({...});
@@ -1661,17 +1608,16 @@ OutlineTypedObject::obj_trace(JSTracer* 
 }
 
 bool
 TypeDescr::hasProperty(const JSAtomState& names, jsid id)
 {
     switch (kind()) {
       case type::Scalar:
       case type::Reference:
-      case type::Simd:
         return false;
 
       case type::Array:
       {
         uint32_t index;
         return IdIsIndex(id, &index) || JSID_IS_ATOM(id, names.length);
       }
 
@@ -1734,17 +1680,16 @@ TypedObject::obj_defineProperty(JSContex
 
 bool
 TypedObject::obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp)
 {
     Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
     switch (typedObj->typeDescr().kind()) {
       case type::Scalar:
       case type::Reference:
-      case type::Simd:
         break;
 
       case type::Array: {
         if (JSID_IS_ATOM(id, cx->names().length)) {
             *foundp = true;
             return true;
         }
         uint32_t index;
@@ -1786,19 +1731,16 @@ TypedObject::obj_getProperty(JSContext* 
 
     // Handle everything else here:
 
     switch (typedObj->typeDescr().kind()) {
       case type::Scalar:
       case type::Reference:
         break;
 
-      case type::Simd:
-        break;
-
       case type::Array:
         if (JSID_IS_ATOM(id, cx->names().length)) {
             if (!typedObj->isAttached()) {
                 JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                           JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
                 return false;
             }
 
@@ -1835,17 +1777,16 @@ TypedObject::obj_getElement(JSContext* c
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
     Rooted<TypeDescr*> descr(cx, &typedObj->typeDescr());
 
     switch (descr->kind()) {
       case type::Scalar:
       case type::Reference:
-      case type::Simd:
       case type::Struct:
         break;
 
       case type::Array:
         return obj_getArrayElement(cx, typedObj, descr, index, vp);
     }
 
     RootedObject proto(cx, obj->staticPrototype());
@@ -1881,19 +1822,16 @@ TypedObject::obj_setProperty(JSContext* 
 {
     Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
 
     switch (typedObj->typeDescr().kind()) {
       case type::Scalar:
       case type::Reference:
         break;
 
-      case type::Simd:
-        break;
-
       case type::Array: {
         if (JSID_IS_ATOM(id, cx->names().length)) {
             if (receiver.isObject() && obj == &receiver.toObject()) {
                 JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                           JSMSG_CANT_REDEFINE_ARRAY_LENGTH);
                 return false;
             }
             return result.failReadOnly();
@@ -1951,17 +1889,16 @@ TypedObject::obj_getOwnPropertyDescripto
         JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPEDOBJECT_HANDLE_UNATTACHED);
         return false;
     }
 
     Rooted<TypeDescr*> descr(cx, &typedObj->typeDescr());
     switch (descr->kind()) {
       case type::Scalar:
       case type::Reference:
-      case type::Simd:
         break;
 
       case type::Array:
       {
         uint32_t index;
         if (IdIsIndex(id, &index)) {
             if (!obj_getArrayElement(cx, typedObj, descr, index, desc.value()))
                 return false;
@@ -2005,17 +1942,16 @@ TypedObject::obj_getOwnPropertyDescripto
 static bool
 IsOwnId(JSContext* cx, HandleObject obj, HandleId id)
 {
     uint32_t index;
     Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
     switch (typedObj->typeDescr().kind()) {
       case type::Scalar:
       case type::Reference:
-      case type::Simd:
         return false;
 
       case type::Array:
         return IdIsIndex(id, &index) || JSID_IS_ATOM(id, cx->names().length);
 
       case type::Struct:
         size_t index;
         if (typedObj->typeDescr().as<StructTypeDescr>().fieldIndex(id, &index))
@@ -2044,18 +1980,17 @@ TypedObject::obj_newEnumerate(JSContext*
 {
     MOZ_ASSERT(obj->is<TypedObject>());
     Rooted<TypedObject*> typedObj(cx, &obj->as<TypedObject>());
     Rooted<TypeDescr*> descr(cx, &typedObj->typeDescr());
 
     RootedId id(cx);
     switch (descr->kind()) {
       case type::Scalar:
-      case type::Reference:
-      case type::Simd: {
+      case type::Reference: {
         // Nothing to enumerate.
         break;
       }
 
       case type::Array: {
         if (!properties.reserve(typedObj->length()))
             return false;
 
@@ -2530,32 +2465,16 @@ js::GetTypedObjectModule(JSContext* cx, 
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     Rooted<GlobalObject*> global(cx, cx->global());
     MOZ_ASSERT(global);
     args.rval().setObject(global->getTypedObjectModule());
     return true;
 }
 
-bool
-js::GetSimdTypeDescr(JSContext* cx, unsigned argc, Value* vp)
-{
-    CallArgs args = CallArgsFromVp(argc, vp);
-    MOZ_ASSERT(args.length() == 1);
-    MOZ_ASSERT(args[0].isInt32());
-    // One of the JS_SIMDTYPEREPR_* constants / a SimdType enum value.
-    // getOrCreateSimdTypeDescr() will do the range check.
-    int32_t simdTypeRepr = args[0].toInt32();
-    Rooted<GlobalObject*> global(cx, cx->global());
-    MOZ_ASSERT(global);
-    auto* obj = GlobalObject::getOrCreateSimdTypeDescr(cx, global, SimdType(simdTypeRepr));
-    args.rval().setObject(*obj);
-    return true;
-}
-
 #define JS_STORE_SCALAR_CLASS_IMPL(_constant, T, _name)                         \
 bool                                                                            \
 js::StoreScalar##T::Func(JSContext* cx, unsigned argc, Value* vp)               \
 {                                                                               \
     CallArgs args = CallArgsFromVp(argc, vp);                                   \
     MOZ_ASSERT(args.length() == 3);                                             \
     MOZ_ASSERT(args[0].isObject() && args[0].toObject().is<TypedObject>());     \
     MOZ_ASSERT(args[1].isInt32());                                              \
@@ -2736,17 +2655,16 @@ visitReferences(TypeDescr& descr,
                 uint8_t* mem,
                 V& visitor)
 {
     if (descr.transparent())
         return;
 
     switch (descr.kind()) {
       case type::Scalar:
-      case type::Simd:
         return;
 
       case type::Reference:
         visitor.visitReference(descr.as<ReferenceTypeDescr>(), mem);
         return;
 
       case type::Array:
       {
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -116,29 +116,27 @@ static T ConvertScalar(double d)
     return T(n);
 }
 
 namespace type {
 
 enum Kind {
     Scalar = JS_TYPEREPR_SCALAR_KIND,
     Reference = JS_TYPEREPR_REFERENCE_KIND,
-    Simd = JS_TYPEREPR_SIMD_KIND,
     Struct = JS_TYPEREPR_STRUCT_KIND,
     Array = JS_TYPEREPR_ARRAY_KIND
 };
 
 } // namespace type
 
 ///////////////////////////////////////////////////////////////////////////
 // Typed Prototypes
 
 class SimpleTypeDescr;
 class ComplexTypeDescr;
-class SimdTypeDescr;
 class StructTypeDescr;
 class TypedProto;
 
 /*
  * The prototype for a typed object.
  */
 class TypedProto : public NativeObject
 {
@@ -250,24 +248,16 @@ class ScalarTypeDescr : public SimpleTyp
         static_assert(Scalar::Uint32 == JS_SCALARTYPEREPR_UINT32,
                       "TypedObjectConstants.h must be consistent with Scalar::Type");
         static_assert(Scalar::Float32 == JS_SCALARTYPEREPR_FLOAT32,
                       "TypedObjectConstants.h must be consistent with Scalar::Type");
         static_assert(Scalar::Float64 == JS_SCALARTYPEREPR_FLOAT64,
                       "TypedObjectConstants.h must be consistent with Scalar::Type");
         static_assert(Scalar::Uint8Clamped == JS_SCALARTYPEREPR_UINT8_CLAMPED,
                       "TypedObjectConstants.h must be consistent with Scalar::Type");
-        static_assert(Scalar::Float32x4 == JS_SCALARTYPEREPR_FLOAT32X4,
-                      "TypedObjectConstants.h must be consistent with Scalar::Type");
-        static_assert(Scalar::Int8x16 == JS_SCALARTYPEREPR_INT8X16,
-                      "TypedObjectConstants.h must be consistent with Scalar::Type");
-        static_assert(Scalar::Int16x8 == JS_SCALARTYPEREPR_INT16X8,
-                      "TypedObjectConstants.h must be consistent with Scalar::Type");
-        static_assert(Scalar::Int32x4 == JS_SCALARTYPEREPR_INT32X4,
-                      "TypedObjectConstants.h must be consistent with Scalar::Type");
 
         return Type(getReservedSlot(JS_DESCR_SLOT_TYPE).toInt32());
     }
 
     static MOZ_MUST_USE bool call(JSContext* cx, unsigned argc, Value* vp);
 };
 
 // Enumerates the cases of ScalarTypeDescr::Type which have
@@ -335,35 +325,16 @@ class ComplexTypeDescr : public TypeDesc
   public:
     // Returns the prototype that instances of this type descriptor
     // will have.
     TypedProto& instancePrototype() const {
         return getReservedSlot(JS_DESCR_SLOT_TYPROTO).toObject().as<TypedProto>();
     }
 };
 
-enum class SimdType;
-
-/*
- * SIMD Type descriptors.
- */
-class SimdTypeDescr : public ComplexTypeDescr
-{
-  public:
-    static const type::Kind Kind = type::Simd;
-    static const bool Opaque = false;
-    static const Class class_;
-    static uint32_t size(SimdType t);
-    static uint32_t alignment(SimdType t);
-    static MOZ_MUST_USE bool call(JSContext* cx, unsigned argc, Value* vp);
-    static bool is(const Value& v);
-
-    SimdType type() const;
-};
-
 bool IsTypedObjectClass(const Class* clasp); // Defined below
 bool IsTypedObjectArray(JSObject& obj);
 
 MOZ_MUST_USE bool CreateUserSizeAndAlignmentProperties(JSContext* cx, HandleTypeDescr obj);
 
 class ArrayTypeDescr;
 
 /*
@@ -789,26 +760,16 @@ class InlineTransparentTypedObject : pub
 
 // Class for an opaque typed object with inline data and no array buffer.
 class InlineOpaqueTypedObject : public InlineTypedObject
 {
   public:
     static const Class class_;
 };
 
-// Class for the global SIMD object.
-class SimdObject : public NativeObject
-{
-  public:
-    static const Class class_;
-    static MOZ_MUST_USE bool toString(JSContext* cx, unsigned int argc, Value* vp);
-    static MOZ_MUST_USE bool resolve(JSContext* cx, JS::HandleObject obj, JS::HandleId,
-                                     bool* resolved);
-};
-
 /*
  * Usage: NewOpaqueTypedObject(typeObj)
  *
  * Constructs a new, unattached instance of `Handle`.
  */
 MOZ_MUST_USE bool NewOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
 
 /*
@@ -897,26 +858,16 @@ MOZ_MUST_USE bool ClampToUint8(JSContext
  * to the various builtin type descriptors. These are currently
  * exported as immutable properties so it is safe for self-hosted code
  * to access them; eventually this should be linked into the module
  * system.
  */
 MOZ_MUST_USE bool GetTypedObjectModule(JSContext* cx, unsigned argc, Value* vp);
 
 /*
- * Usage: GetSimdTypeDescr(simdTypeRepr)
- *
- * Returns one of the SIMD type objects, identified by `simdTypeRepr` which must
- * be one of the JS_SIMDTYPEREPR_* constants.
- *
- * The SIMD pseudo-module must have been initialized for this to be safe.
- */
-MOZ_MUST_USE bool GetSimdTypeDescr(JSContext* cx, unsigned argc, Value* vp);
-
-/*
  * Usage: Store_int8(targetDatum, targetOffset, value)
  *        ...
  *        Store_uint8(targetDatum, targetOffset, value)
  *        ...
  *        Store_float32(targetDatum, targetOffset, value)
  *        Store_float64(targetDatum, targetOffset, value)
  *
  * Intrinsic function. Stores `value` into the memory referenced by
@@ -1040,18 +991,17 @@ IsSimpleTypeDescrClass(const Class* clas
     return clasp == &ScalarTypeDescr::class_ ||
            clasp == &ReferenceTypeDescr::class_;
 }
 
 inline bool
 IsComplexTypeDescrClass(const Class* clasp)
 {
     return clasp == &StructTypeDescr::class_ ||
-           clasp == &ArrayTypeDescr::class_ ||
-           clasp == &SimdTypeDescr::class_;
+           clasp == &ArrayTypeDescr::class_;
 }
 
 inline bool
 IsTypeDescrClass(const Class* clasp)
 {
     return IsSimpleTypeDescrClass(clasp) ||
            IsComplexTypeDescrClass(clasp);
 }
--- a/js/src/builtin/TypedObject.js
+++ b/js/src/builtin/TypedObject.js
@@ -48,19 +48,16 @@ function TypedObjectGet(descr, typedObj,
 
   switch (DESCR_KIND(descr)) {
   case JS_TYPEREPR_SCALAR_KIND:
     return TypedObjectGetScalar(descr, typedObj, offset);
 
   case JS_TYPEREPR_REFERENCE_KIND:
     return TypedObjectGetReference(descr, typedObj, offset);
 
-  case JS_TYPEREPR_SIMD_KIND:
-    return TypedObjectGetSimd(descr, typedObj, offset);
-
   case JS_TYPEREPR_ARRAY_KIND:
   case JS_TYPEREPR_STRUCT_KIND:
     return TypedObjectGetDerived(descr, typedObj, offset);
   }
 
   assert(false, "Unhandled kind: " + DESCR_KIND(descr));
   return undefined;
 }
@@ -132,154 +129,16 @@ function TypedObjectGetReference(descr, 
   case JS_REFERENCETYPEREPR_STRING:
     return Load_string(typedObj, offset);
   }
 
   assert(false, "Unhandled scalar type: " + type);
   return undefined;
 }
 
-function TypedObjectGetSimd(descr, typedObj, offset) {
-  var type = DESCR_TYPE(descr);
-  var simdTypeDescr = GetSimdTypeDescr(type);
-  switch (type) {
-  case JS_SIMDTYPEREPR_FLOAT32X4:
-    var x = Load_float32(typedObj, offset + 0);
-    var y = Load_float32(typedObj, offset + 4);
-    var z = Load_float32(typedObj, offset + 8);
-    var w = Load_float32(typedObj, offset + 12);
-    return simdTypeDescr(x, y, z, w);
-
-  case JS_SIMDTYPEREPR_FLOAT64X2:
-    var x = Load_float64(typedObj, offset + 0);
-    var y = Load_float64(typedObj, offset + 8);
-    return simdTypeDescr(x, y);
-
-  case JS_SIMDTYPEREPR_INT8X16:
-    var s0 = Load_int8(typedObj, offset + 0);
-    var s1 = Load_int8(typedObj, offset + 1);
-    var s2 = Load_int8(typedObj, offset + 2);
-    var s3 = Load_int8(typedObj, offset + 3);
-    var s4 = Load_int8(typedObj, offset + 4);
-    var s5 = Load_int8(typedObj, offset + 5);
-    var s6 = Load_int8(typedObj, offset + 6);
-    var s7 = Load_int8(typedObj, offset + 7);
-    var s8 = Load_int8(typedObj, offset + 8);
-    var s9 = Load_int8(typedObj, offset + 9);
-    var s10 = Load_int8(typedObj, offset + 10);
-    var s11 = Load_int8(typedObj, offset + 11);
-    var s12 = Load_int8(typedObj, offset + 12);
-    var s13 = Load_int8(typedObj, offset + 13);
-    var s14 = Load_int8(typedObj, offset + 14);
-    var s15 = Load_int8(typedObj, offset + 15);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15);
-
-  case JS_SIMDTYPEREPR_INT16X8:
-    var s0 = Load_int16(typedObj, offset + 0);
-    var s1 = Load_int16(typedObj, offset + 2);
-    var s2 = Load_int16(typedObj, offset + 4);
-    var s3 = Load_int16(typedObj, offset + 6);
-    var s4 = Load_int16(typedObj, offset + 8);
-    var s5 = Load_int16(typedObj, offset + 10);
-    var s6 = Load_int16(typedObj, offset + 12);
-    var s7 = Load_int16(typedObj, offset + 14);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7);
-
-  case JS_SIMDTYPEREPR_INT32X4:
-    var x = Load_int32(typedObj, offset + 0);
-    var y = Load_int32(typedObj, offset + 4);
-    var z = Load_int32(typedObj, offset + 8);
-    var w = Load_int32(typedObj, offset + 12);
-    return simdTypeDescr(x, y, z, w);
-
-  case JS_SIMDTYPEREPR_UINT8X16:
-    var s0 = Load_uint8(typedObj, offset + 0);
-    var s1 = Load_uint8(typedObj, offset + 1);
-    var s2 = Load_uint8(typedObj, offset + 2);
-    var s3 = Load_uint8(typedObj, offset + 3);
-    var s4 = Load_uint8(typedObj, offset + 4);
-    var s5 = Load_uint8(typedObj, offset + 5);
-    var s6 = Load_uint8(typedObj, offset + 6);
-    var s7 = Load_uint8(typedObj, offset + 7);
-    var s8 = Load_uint8(typedObj, offset + 8);
-    var s9 = Load_uint8(typedObj, offset + 9);
-    var s10 = Load_uint8(typedObj, offset + 10);
-    var s11 = Load_uint8(typedObj, offset + 11);
-    var s12 = Load_uint8(typedObj, offset + 12);
-    var s13 = Load_uint8(typedObj, offset + 13);
-    var s14 = Load_uint8(typedObj, offset + 14);
-    var s15 = Load_uint8(typedObj, offset + 15);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15);
-
-  case JS_SIMDTYPEREPR_UINT16X8:
-    var s0 = Load_uint16(typedObj, offset + 0);
-    var s1 = Load_uint16(typedObj, offset + 2);
-    var s2 = Load_uint16(typedObj, offset + 4);
-    var s3 = Load_uint16(typedObj, offset + 6);
-    var s4 = Load_uint16(typedObj, offset + 8);
-    var s5 = Load_uint16(typedObj, offset + 10);
-    var s6 = Load_uint16(typedObj, offset + 12);
-    var s7 = Load_uint16(typedObj, offset + 14);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7);
-
-  case JS_SIMDTYPEREPR_UINT32X4:
-    var x = Load_uint32(typedObj, offset + 0);
-    var y = Load_uint32(typedObj, offset + 4);
-    var z = Load_uint32(typedObj, offset + 8);
-    var w = Load_uint32(typedObj, offset + 12);
-    return simdTypeDescr(x, y, z, w);
-
-  case JS_SIMDTYPEREPR_BOOL8X16:
-    var s0 = Load_int8(typedObj, offset + 0);
-    var s1 = Load_int8(typedObj, offset + 1);
-    var s2 = Load_int8(typedObj, offset + 2);
-    var s3 = Load_int8(typedObj, offset + 3);
-    var s4 = Load_int8(typedObj, offset + 4);
-    var s5 = Load_int8(typedObj, offset + 5);
-    var s6 = Load_int8(typedObj, offset + 6);
-    var s7 = Load_int8(typedObj, offset + 7);
-    var s8 = Load_int8(typedObj, offset + 8);
-    var s9 = Load_int8(typedObj, offset + 9);
-    var s10 = Load_int8(typedObj, offset + 10);
-    var s11 = Load_int8(typedObj, offset + 11);
-    var s12 = Load_int8(typedObj, offset + 12);
-    var s13 = Load_int8(typedObj, offset + 13);
-    var s14 = Load_int8(typedObj, offset + 14);
-    var s15 = Load_int8(typedObj, offset + 15);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15);
-
-  case JS_SIMDTYPEREPR_BOOL16X8:
-    var s0 = Load_int16(typedObj, offset + 0);
-    var s1 = Load_int16(typedObj, offset + 2);
-    var s2 = Load_int16(typedObj, offset + 4);
-    var s3 = Load_int16(typedObj, offset + 6);
-    var s4 = Load_int16(typedObj, offset + 8);
-    var s5 = Load_int16(typedObj, offset + 10);
-    var s6 = Load_int16(typedObj, offset + 12);
-    var s7 = Load_int16(typedObj, offset + 14);
-    return simdTypeDescr(s0, s1, s2, s3, s4, s5, s6, s7);
-
-  case JS_SIMDTYPEREPR_BOOL32X4:
-    var x = Load_int32(typedObj, offset + 0);
-    var y = Load_int32(typedObj, offset + 4);
-    var z = Load_int32(typedObj, offset + 8);
-    var w = Load_int32(typedObj, offset + 12);
-    return simdTypeDescr(x, y, z, w);
-
-  case JS_SIMDTYPEREPR_BOOL64X2:
-    var x = Load_int32(typedObj, offset + 0);
-    var y = Load_int32(typedObj, offset + 8);
-    return simdTypeDescr(x, y);
-
-  }
-
-  assert(false, "Unhandled SIMD type: " + type);
-  return undefined;
-}
-
 ///////////////////////////////////////////////////////////////////////////
 // Setting values
 //
 // The methods in this section modify the data pointed at by `this`.
 
 // Writes `fromValue` into the `typedObj` at offset `offset`, adapting
 // it to `descr` as needed. This is the most general entry point
 // and works for any type.
@@ -291,20 +150,16 @@ function TypedObjectSet(descr, typedObj,
   case JS_TYPEREPR_SCALAR_KIND:
     TypedObjectSetScalar(descr, typedObj, offset, fromValue);
     return;
 
   case JS_TYPEREPR_REFERENCE_KIND:
     TypedObjectSetReference(descr, typedObj, offset, name, fromValue);
     return;
 
-  case JS_TYPEREPR_SIMD_KIND:
-    TypedObjectSetSimd(descr, typedObj, offset, fromValue);
-    return;
-
   case JS_TYPEREPR_ARRAY_KIND:
     var length = DESCR_ARRAY_LENGTH(descr);
     if (TypedObjectSetArray(descr, length, typedObj, offset, fromValue))
       return;
     break;
 
   case JS_TYPEREPR_STRUCT_KIND:
     if (!IsObject(fromValue))
@@ -409,116 +264,16 @@ function TypedObjectSetReference(descr, 
     return Store_string(typedObj, offset, name, ToString(fromValue));
   }
 
   assert(false, "Unhandled scalar type: " + type);
   return undefined;
 }
 
 // Sets `fromValue` to `this` assuming that `this` is a scalar type.
-function TypedObjectSetSimd(descr, typedObj, offset, fromValue) {
-  if (!IsObject(fromValue) || !ObjectIsTypedObject(fromValue))
-    ThrowTypeError(JSMSG_CANT_CONVERT_TO,
-                   typeof(fromValue),
-                   DESCR_STRING_REPR(descr));
-
-  if (!DescrsEquiv(descr, TypedObjectTypeDescr(fromValue)))
-    ThrowTypeError(JSMSG_CANT_CONVERT_TO,
-                   typeof(fromValue),
-                   DESCR_STRING_REPR(descr));
-
-  var type = DESCR_TYPE(descr);
-  switch (type) {
-    case JS_SIMDTYPEREPR_FLOAT32X4:
-      Store_float32(typedObj, offset + 0, Load_float32(fromValue, 0));
-      Store_float32(typedObj, offset + 4, Load_float32(fromValue, 4));
-      Store_float32(typedObj, offset + 8, Load_float32(fromValue, 8));
-      Store_float32(typedObj, offset + 12, Load_float32(fromValue, 12));
-      break;
-    case JS_SIMDTYPEREPR_FLOAT64X2:
-      Store_float64(typedObj, offset + 0, Load_float64(fromValue, 0));
-      Store_float64(typedObj, offset + 8, Load_float64(fromValue, 8));
-      break;
-    case JS_SIMDTYPEREPR_INT8X16:
-    case JS_SIMDTYPEREPR_BOOL8X16:
-      Store_int8(typedObj, offset + 0, Load_int8(fromValue, 0));
-      Store_int8(typedObj, offset + 1, Load_int8(fromValue, 1));
-      Store_int8(typedObj, offset + 2, Load_int8(fromValue, 2));
-      Store_int8(typedObj, offset + 3, Load_int8(fromValue, 3));
-      Store_int8(typedObj, offset + 4, Load_int8(fromValue, 4));
-      Store_int8(typedObj, offset + 5, Load_int8(fromValue, 5));
-      Store_int8(typedObj, offset + 6, Load_int8(fromValue, 6));
-      Store_int8(typedObj, offset + 7, Load_int8(fromValue, 7));
-      Store_int8(typedObj, offset + 8, Load_int8(fromValue, 8));
-      Store_int8(typedObj, offset + 9, Load_int8(fromValue, 9));
-      Store_int8(typedObj, offset + 10, Load_int8(fromValue, 10));
-      Store_int8(typedObj, offset + 11, Load_int8(fromValue, 11));
-      Store_int8(typedObj, offset + 12, Load_int8(fromValue, 12));
-      Store_int8(typedObj, offset + 13, Load_int8(fromValue, 13));
-      Store_int8(typedObj, offset + 14, Load_int8(fromValue, 14));
-      Store_int8(typedObj, offset + 15, Load_int8(fromValue, 15));
-      break;
-    case JS_SIMDTYPEREPR_INT16X8:
-    case JS_SIMDTYPEREPR_BOOL16X8:
-      Store_int16(typedObj, offset + 0, Load_int16(fromValue, 0));
-      Store_int16(typedObj, offset + 2, Load_int16(fromValue, 2));
-      Store_int16(typedObj, offset + 4, Load_int16(fromValue, 4));
-      Store_int16(typedObj, offset + 6, Load_int16(fromValue, 6));
-      Store_int16(typedObj, offset + 8, Load_int16(fromValue, 8));
-      Store_int16(typedObj, offset + 10, Load_int16(fromValue, 10));
-      Store_int16(typedObj, offset + 12, Load_int16(fromValue, 12));
-      Store_int16(typedObj, offset + 14, Load_int16(fromValue, 14));
-      break;
-    case JS_SIMDTYPEREPR_INT32X4:
-    case JS_SIMDTYPEREPR_BOOL32X4:
-    case JS_SIMDTYPEREPR_BOOL64X2:
-      Store_int32(typedObj, offset + 0, Load_int32(fromValue, 0));
-      Store_int32(typedObj, offset + 4, Load_int32(fromValue, 4));
-      Store_int32(typedObj, offset + 8, Load_int32(fromValue, 8));
-      Store_int32(typedObj, offset + 12, Load_int32(fromValue, 12));
-      break;
-    case JS_SIMDTYPEREPR_UINT8X16:
-      Store_uint8(typedObj, offset + 0, Load_uint8(fromValue, 0));
-      Store_uint8(typedObj, offset + 1, Load_uint8(fromValue, 1));
-      Store_uint8(typedObj, offset + 2, Load_uint8(fromValue, 2));
-      Store_uint8(typedObj, offset + 3, Load_uint8(fromValue, 3));
-      Store_uint8(typedObj, offset + 4, Load_uint8(fromValue, 4));
-      Store_uint8(typedObj, offset + 5, Load_uint8(fromValue, 5));
-      Store_uint8(typedObj, offset + 6, Load_uint8(fromValue, 6));
-      Store_uint8(typedObj, offset + 7, Load_uint8(fromValue, 7));
-      Store_uint8(typedObj, offset + 8, Load_uint8(fromValue, 8));
-      Store_uint8(typedObj, offset + 9, Load_uint8(fromValue, 9));
-      Store_uint8(typedObj, offset + 10, Load_uint8(fromValue, 10));
-      Store_uint8(typedObj, offset + 11, Load_uint8(fromValue, 11));
-      Store_uint8(typedObj, offset + 12, Load_uint8(fromValue, 12));
-      Store_uint8(typedObj, offset + 13, Load_uint8(fromValue, 13));
-      Store_uint8(typedObj, offset + 14, Load_uint8(fromValue, 14));
-      Store_uint8(typedObj, offset + 15, Load_uint8(fromValue, 15));
-      break;
-    case JS_SIMDTYPEREPR_UINT16X8:
-      Store_uint16(typedObj, offset + 0, Load_uint16(fromValue, 0));
-      Store_uint16(typedObj, offset + 2, Load_uint16(fromValue, 2));
-      Store_uint16(typedObj, offset + 4, Load_uint16(fromValue, 4));
-      Store_uint16(typedObj, offset + 6, Load_uint16(fromValue, 6));
-      Store_uint16(typedObj, offset + 8, Load_uint16(fromValue, 8));
-      Store_uint16(typedObj, offset + 10, Load_uint16(fromValue, 10));
-      Store_uint16(typedObj, offset + 12, Load_uint16(fromValue, 12));
-      Store_uint16(typedObj, offset + 14, Load_uint16(fromValue, 14));
-      break;
-    case JS_SIMDTYPEREPR_UINT32X4:
-      Store_uint32(typedObj, offset + 0, Load_uint32(fromValue, 0));
-      Store_uint32(typedObj, offset + 4, Load_uint32(fromValue, 4));
-      Store_uint32(typedObj, offset + 8, Load_uint32(fromValue, 8));
-      Store_uint32(typedObj, offset + 12, Load_uint32(fromValue, 12));
-      break;
-    default:
-      assert(false, "Unhandled Simd type: " + type);
-  }
-}
-
 ///////////////////////////////////////////////////////////////////////////
 // C++ Wrappers
 //
 // These helpers are invoked by C++ code or used as method bodies.
 
 // Wrapper for use from C++ code.
 function ConvertAndCopyTo(destDescr,
                           destTypedObj,
@@ -625,251 +380,16 @@ function TypedObjectArrayRedimension(new
   assert(DESCR_SIZE(oldArrayType) == DESCR_SIZE(newArrayType),
          "Byte sizes should be equal");
 
   // Rewrap the data from `this` in a new type.
   return NewDerivedTypedObject(newArrayType, this, 0);
 }
 
 ///////////////////////////////////////////////////////////////////////////
-// SIMD
-
-function SimdProtoString(type) {
-  switch (type) {
-  case JS_SIMDTYPEREPR_INT8X16:
-    return "Int8x16";
-  case JS_SIMDTYPEREPR_INT16X8:
-    return "Int16x8";
-  case JS_SIMDTYPEREPR_INT32X4:
-    return "Int32x4";
-  case JS_SIMDTYPEREPR_UINT8X16:
-    return "Uint8x16";
-  case JS_SIMDTYPEREPR_UINT16X8:
-    return "Uint16x8";
-  case JS_SIMDTYPEREPR_UINT32X4:
-    return "Uint32x4";
-  case JS_SIMDTYPEREPR_FLOAT32X4:
-    return "Float32x4";
-  case JS_SIMDTYPEREPR_FLOAT64X2:
-    return "Float64x2";
-  case JS_SIMDTYPEREPR_BOOL8X16:
-    return "Bool8x16";
-  case JS_SIMDTYPEREPR_BOOL16X8:
-    return "Bool16x8";
-  case JS_SIMDTYPEREPR_BOOL32X4:
-    return "Bool32x4";
-  case JS_SIMDTYPEREPR_BOOL64X2:
-    return "Bool64x2";
-  }
-
-  assert(false, "Unhandled type constant");
-  return undefined;
-}
-
-function SimdTypeToLength(type) {
-  switch (type) {
-  case JS_SIMDTYPEREPR_INT8X16:
-  case JS_SIMDTYPEREPR_BOOL8X16:
-    return 16;
-  case JS_SIMDTYPEREPR_INT16X8:
-  case JS_SIMDTYPEREPR_BOOL16X8:
-    return 8;
-  case JS_SIMDTYPEREPR_INT32X4:
-  case JS_SIMDTYPEREPR_FLOAT32X4:
-  case JS_SIMDTYPEREPR_BOOL32X4:
-    return 4;
-  case JS_SIMDTYPEREPR_FLOAT64X2:
-  case JS_SIMDTYPEREPR_BOOL64X2:
-    return 2;
-  }
-
-  assert(false, "Unhandled type constant");
-  return undefined;
-}
-
-// This implements SIMD.*.prototype.valueOf().
-// Once we have proper value semantics for SIMD types, this function should just
-// perform a type check and return this.
-// For now, throw a TypeError unconditionally since valueOf() was probably
-// called from ToNumber() which is supposed to throw when attempting to convert
-// a SIMD value to a number.
-function SimdValueOf() {
-  if (!IsObject(this) || !ObjectIsTypedObject(this))
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD", "valueOf", typeof this);
-
-  var descr = TypedObjectTypeDescr(this);
-
-  if (DESCR_KIND(descr) != JS_TYPEREPR_SIMD_KIND)
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD", "valueOf", typeof this);
-
-  ThrowTypeError(JSMSG_SIMD_TO_NUMBER);
-}
-
-function SimdToSource() {
-  if (!IsObject(this) || !ObjectIsTypedObject(this))
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD.*", "toSource", typeof this);
-
-  var descr = TypedObjectTypeDescr(this);
-
-  if (DESCR_KIND(descr) != JS_TYPEREPR_SIMD_KIND)
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD.*", "toSource", typeof this);
-
-  return SimdFormatString(descr, this);
-}
-
-function SimdToString() {
-  if (!IsObject(this) || !ObjectIsTypedObject(this))
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD.*", "toString", typeof this);
-
-  var descr = TypedObjectTypeDescr(this);
-
-  if (DESCR_KIND(descr) != JS_TYPEREPR_SIMD_KIND)
-    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "SIMD.*", "toString", typeof this);
-
-  return SimdFormatString(descr, this);
-}
-
-function SimdFormatString(descr, typedObj) {
-  var typerepr = DESCR_TYPE(descr);
-  var protoString = SimdProtoString(typerepr);
-  switch (typerepr) {
-      case JS_SIMDTYPEREPR_INT8X16: {
-          var s1 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 7);
-          var s9 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 8);
-          var s10 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 9);
-          var s11 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 10);
-          var s12 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 11);
-          var s13 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 12);
-          var s14 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 13);
-          var s15 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 14);
-          var s16 = callFunction(std_SIMD_Int8x16_extractLane, null, typedObj, 15);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8}, ${s9}, ${s10}, ${s11}, ${s12}, ${s13}, ${s14}, ${s15}, ${s16})`;
-      }
-      case JS_SIMDTYPEREPR_INT16X8: {
-          var s1 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Int16x8_extractLane, null, typedObj, 7);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8})`;
-      }
-      case JS_SIMDTYPEREPR_INT32X4: {
-          var x = callFunction(std_SIMD_Int32x4_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Int32x4_extractLane, null, typedObj, 1);
-          var z = callFunction(std_SIMD_Int32x4_extractLane, null, typedObj, 2);
-          var w = callFunction(std_SIMD_Int32x4_extractLane, null, typedObj, 3);
-          return `SIMD.${protoString}(${x}, ${y}, ${z}, ${w})`;
-      }
-      case JS_SIMDTYPEREPR_UINT8X16: {
-          var s1 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 7);
-          var s9 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 8);
-          var s10 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 9);
-          var s11 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 10);
-          var s12 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 11);
-          var s13 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 12);
-          var s14 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 13);
-          var s15 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 14);
-          var s16 = callFunction(std_SIMD_Uint8x16_extractLane, null, typedObj, 15);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8}, ${s9}, ${s10}, ${s11}, ${s12}, ${s13}, ${s14}, ${s15}, ${s16})`;
-      }
-      case JS_SIMDTYPEREPR_UINT16X8: {
-          var s1 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Uint16x8_extractLane, null, typedObj, 7);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8})`;
-      }
-      case JS_SIMDTYPEREPR_UINT32X4: {
-          var x = callFunction(std_SIMD_Uint32x4_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Uint32x4_extractLane, null, typedObj, 1);
-          var z = callFunction(std_SIMD_Uint32x4_extractLane, null, typedObj, 2);
-          var w = callFunction(std_SIMD_Uint32x4_extractLane, null, typedObj, 3);
-          return `SIMD.${protoString}(${x}, ${y}, ${z}, ${w})`;
-      }
-      case JS_SIMDTYPEREPR_FLOAT32X4: {
-          var x = callFunction(std_SIMD_Float32x4_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Float32x4_extractLane, null, typedObj, 1);
-          var z = callFunction(std_SIMD_Float32x4_extractLane, null, typedObj, 2);
-          var w = callFunction(std_SIMD_Float32x4_extractLane, null, typedObj, 3);
-          return `SIMD.${protoString}(${x}, ${y}, ${z}, ${w})`;
-      }
-      case JS_SIMDTYPEREPR_FLOAT64X2: {
-          var x = callFunction(std_SIMD_Float64x2_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Float64x2_extractLane, null, typedObj, 1);
-          return `SIMD.${protoString}(${x}, ${y})`;
-      }
-      case JS_SIMDTYPEREPR_BOOL8X16: {
-          var s1 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 7);
-          var s9 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 8);
-          var s10 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 9);
-          var s11 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 10);
-          var s12 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 11);
-          var s13 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 12);
-          var s14 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 13);
-          var s15 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 14);
-          var s16 = callFunction(std_SIMD_Bool8x16_extractLane, null, typedObj, 15);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8}, ${s9}, ${s10}, ${s11}, ${s12}, ${s13}, ${s14}, ${s15}, ${s16})`;
-      }
-      case JS_SIMDTYPEREPR_BOOL16X8: {
-          var s1 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 0);
-          var s2 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 1);
-          var s3 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 2);
-          var s4 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 3);
-          var s5 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 4);
-          var s6 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 5);
-          var s7 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 6);
-          var s8 = callFunction(std_SIMD_Bool16x8_extractLane, null, typedObj, 7);
-          return `SIMD.${protoString}(${s1}, ${s2}, ${s3}, ${s4}, ${s5}, ${s6}, ${s7}, ${s8})`;
-      }
-      case JS_SIMDTYPEREPR_BOOL32X4: {
-          var x = callFunction(std_SIMD_Bool32x4_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Bool32x4_extractLane, null, typedObj, 1);
-          var z = callFunction(std_SIMD_Bool32x4_extractLane, null, typedObj, 2);
-          var w = callFunction(std_SIMD_Bool32x4_extractLane, null, typedObj, 3);
-          return `SIMD.${protoString}(${x}, ${y}, ${z}, ${w})`;
-      }
-      case JS_SIMDTYPEREPR_BOOL64X2: {
-          var x = callFunction(std_SIMD_Bool64x2_extractLane, null, typedObj, 0);
-          var y = callFunction(std_SIMD_Bool64x2_extractLane, null, typedObj, 1);
-          return `SIMD.${protoString}(${x}, ${y})`;
-      }
-  }
-  assert(false, "unexpected SIMD kind");
-  return "?";
-}
-
-///////////////////////////////////////////////////////////////////////////
 // Miscellaneous
 
 function DescrsEquiv(descr1, descr2) {
   assert(IsObject(descr1) && ObjectIsTypeDescr(descr1), "descr1 not descr");
   assert(IsObject(descr2) && ObjectIsTypeDescr(descr2), "descr2 not descr");
 
   // Potential optimization: these two strings are guaranteed to be
   // atoms, and hence this string comparison can just be a pointer
--- a/js/src/builtin/TypedObjectConstants.h
+++ b/js/src/builtin/TypedObjectConstants.h
@@ -48,17 +48,17 @@
 #define JS_DESCR_SLOT_STRING_REPR        1  // Atomized string representation
 #define JS_DESCR_SLOT_ALIGNMENT          2  // Alignment in bytes
 #define JS_DESCR_SLOT_SIZE               3  // Size in bytes, else 0
 #define JS_DESCR_SLOT_OPAQUE             4  // Atomized string representation
 #define JS_DESCR_SLOT_TYPROTO            5  // Prototype for instances, if any
 #define JS_DESCR_SLOT_ARRAYPROTO         6  // Lazily created prototype for arrays
 #define JS_DESCR_SLOT_TRACE_LIST         7  // List of references for use in tracing
 
-// Slots on scalars, references, and SIMD objects
+// Slots on scalars, references
 #define JS_DESCR_SLOT_TYPE               8  // Type code
 
 // Slots on array descriptors
 #define JS_DESCR_SLOT_ARRAY_ELEM_TYPE    8
 #define JS_DESCR_SLOT_ARRAY_LENGTH       9
 
 // Slots on struct type objects
 #define JS_DESCR_SLOT_STRUCT_FIELD_NAMES 8
@@ -70,52 +70,31 @@
 
 // These constants are for use exclusively in JS code. In C++ code,
 // prefer TypeRepresentation::Scalar etc, which allows you to
 // write a switch which will receive a warning if you omit a case.
 #define JS_TYPEREPR_SCALAR_KIND         1
 #define JS_TYPEREPR_REFERENCE_KIND      2
 #define JS_TYPEREPR_STRUCT_KIND         3
 #define JS_TYPEREPR_ARRAY_KIND          4
-#define JS_TYPEREPR_SIMD_KIND           5
 
 // These constants are for use exclusively in JS code. In C++ code,
 // prefer Scalar::Int8 etc, which allows you to write a switch which will
 // receive a warning if you omit a case.
 #define JS_SCALARTYPEREPR_INT8          0
 #define JS_SCALARTYPEREPR_UINT8         1
 #define JS_SCALARTYPEREPR_INT16         2
 #define JS_SCALARTYPEREPR_UINT16        3
 #define JS_SCALARTYPEREPR_INT32         4
 #define JS_SCALARTYPEREPR_UINT32        5
 #define JS_SCALARTYPEREPR_FLOAT32       6
 #define JS_SCALARTYPEREPR_FLOAT64       7
 #define JS_SCALARTYPEREPR_UINT8_CLAMPED 8
-#define JS_SCALARTYPEREPR_FLOAT32X4     11
-#define JS_SCALARTYPEREPR_INT8X16       12
-#define JS_SCALARTYPEREPR_INT16X8       13
-#define JS_SCALARTYPEREPR_INT32X4       14
 
 // These constants are for use exclusively in JS code. In C++ code,
 // prefer ReferenceTypeRepresentation::TYPE_ANY etc, which allows
 // you to write a switch which will receive a warning if you omit a
 // case.
 #define JS_REFERENCETYPEREPR_ANY        0
 #define JS_REFERENCETYPEREPR_OBJECT     1
 #define JS_REFERENCETYPEREPR_STRING     2
 
-// These constants are for use exclusively in JS code. In C++ code, prefer
-// SimdType::Int32x4 etc, since that allows you to write a switch which will
-// receive a warning if you omit a case.
-#define JS_SIMDTYPEREPR_INT8X16         0
-#define JS_SIMDTYPEREPR_INT16X8         1
-#define JS_SIMDTYPEREPR_INT32X4         2
-#define JS_SIMDTYPEREPR_UINT8X16        3
-#define JS_SIMDTYPEREPR_UINT16X8        4
-#define JS_SIMDTYPEREPR_UINT32X4        5
-#define JS_SIMDTYPEREPR_FLOAT32X4       6
-#define JS_SIMDTYPEREPR_FLOAT64X2       7
-#define JS_SIMDTYPEREPR_BOOL8X16        8
-#define JS_SIMDTYPEREPR_BOOL16X8        9
-#define JS_SIMDTYPEREPR_BOOL32X4       10
-#define JS_SIMDTYPEREPR_BOOL64X2       11
-
 #endif
--- a/js/src/devtools/automation/cgc-jittest-timeouts.txt
+++ b/js/src/devtools/automation/cgc-jittest-timeouts.txt
@@ -1,9 +1,8 @@
-SIMD/nursery-overflow.js
 asm.js/testBug1117235.js
 asm.js/testParallelCompile.js
 auto-regress/bug653395.js
 auto-regress/bug654392.js
 auto-regress/bug675251.js
 auto-regress/bug729797.js
 baseline/bug847446.js
 baseline/bug852175.js
--- a/js/src/doc/JITOptimizations/Outcomes.md
+++ b/js/src/doc/JITOptimizations/Outcomes.md
@@ -147,21 +147,16 @@ Arrays at this element access location h
 The storage for the typed object being accessed at this location might be a detached ArrayBuffer.  (This can happen if the typed object, or its underlying buffer as accessed using `TypedObject.storage(typedObject).buffer`, is transferred using the structured clone algorithm.)
 
 ### TypedObjectArrayRange
 
 Failed to do range check of element access on a typed object.
 
 ### AccessNotDense
 
-### AccessNotSimdObject
-
-The observed type of the target of the property access doesn't guarantee
-that it is a SIMD object.
-
 ### AccessNotTypedObject
 
 The observed type of the target of the property access doesn't guarantee
 that it is a TypedObject.
 
 ### AccessNotTypedArray
 
 The observed type of the target of the property access doesn't guarantee
@@ -217,25 +212,16 @@ target values which may be non-native ob
 IonMonkey does not generate inline caches for element reads in which
 the keys have never been observed to be a String, Symbol, or Int32.
 
 ### SetElemNonDenseNonTANotCached
 
 IonMonkey only generates inline caches for element accesses which are
 either on dense objects (e.g. dense Arrays), or Typed Arrays.
 
-### NoSimdJitSupport
-
-Optimization failed because SIMD JIT support was not enabled.
-
-### SimdTypeNotOptimized
-
-The type observed as being retrieved from this property access did not
-match an optimizable type.
-
 ### HasCommonInliningPath
 
 Inlining was abandoned because the inlining call path was repeated.  A
 repeated call path is indicative of a potentially mutually recursive
 function call chain.
 
 ### Inlined
 
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -248,19 +248,16 @@ def main(argv):
 
     if read_all:
         test_list = jittests.find_tests()
 
     # Exclude tests when code coverage is enabled.
     # This part is equivalent to:
     # skip-if = coverage
     if os.getenv('GCOV_PREFIX') is not None:
-        # GCOV errors.
-        options.exclude += [os.path.join('asm.js', 'testSIMD.js')]               # Bug 1347245
-
         # JSVM errors.
         options.exclude += [os.path.join('basic', 'functionnames.js')]           # Bug 1369783
         options.exclude += [os.path.join('debug', 'Debugger-findScripts-23.js')]
         options.exclude += [os.path.join('debug', 'bug1160182.js')]
         options.exclude += [os.path.join('xdr', 'incremental-encoder.js')]
         options.exclude += [os.path.join('xdr', 'bug1186973.js')]                # Bug 1369785
         options.exclude += [os.path.join('xdr', 'relazify.js')]
         options.exclude += [os.path.join('basic', 'werror.js')]
deleted file mode 100644
--- a/js/src/jit-test/lib/simd.js
+++ /dev/null
@@ -1,109 +0,0 @@
-if (!this.hasOwnProperty("SIMD"))
-    quit();
-
-function booleanBinaryX4(op, v, w) {
-    var arr = [];
-    var [varr, warr] = [simdToArray(v), simdToArray(w)];
-    for (var i = 0; i < 4; i++)
-        arr[i] = op(varr[i], warr[i]);
-    return arr;
-}
-
-function binaryX(op, v, w) {
-    var arr = [];
-    var [varr, warr] = [simdToArray(v), simdToArray(w)];
-    [varr, warr] = [varr.map(Math.fround), warr.map(Math.fround)];
-    for (var i = 0; i < varr.length; i++)
-        arr[i] = op(varr[i], warr[i]);
-    return arr.map(Math.fround);
-}
-
-function unaryX4(op, v, coerceFunc) {
-    var arr = [];
-    var varr = simdToArray(v).map(coerceFunc);
-    for (var i = 0; i < 4; i++)
-        arr[i] = op(varr[i]);
-    return arr.map(coerceFunc);
-}
-
-function assertNear(a, b) {
-    assertEq((a != a && b != b) || Math.abs(a - b) < 0.001, true);
-}
-
-function GetType(v) {
-    var pt = Object.getPrototypeOf(v);
-    switch (pt) {
-        case SIMD.Int8x16.prototype: return SIMD.Int8x16;
-        case SIMD.Int16x8.prototype: return SIMD.Int16x8;
-        case SIMD.Int32x4.prototype: return SIMD.Int32x4;
-        case SIMD.Uint8x16.prototype: return SIMD.Uint8x16;
-        case SIMD.Uint16x8.prototype: return SIMD.Uint16x8;
-        case SIMD.Uint32x4.prototype: return SIMD.Uint32x4;
-        case SIMD.Float32x4.prototype: return SIMD.Float32x4;
-        case SIMD.Bool8x16.prototype: return SIMD.Bool8x16;
-        case SIMD.Bool16x8.prototype: return SIMD.Bool16x8;
-        case SIMD.Bool32x4.prototype: return SIMD.Bool32x4;
-    }
-    throw "unexpected SIMD type";
-}
-
-function GetLength(t) {
-    switch (t) {
-      case SIMD.Int8x16: return 16;
-      case SIMD.Int16x8: return 8;
-      case SIMD.Int32x4: return 4;
-      case SIMD.Uint8x16: return 16;
-      case SIMD.Uint16x8: return 8;
-      case SIMD.Uint32x4: return 4;
-      case SIMD.Float32x4: return 4;
-      case SIMD.Bool8x16: return 16;
-      case SIMD.Bool16x8: return 8;
-      case SIMD.Bool32x4: return 4;
-    }
-    throw "unexpected SIMD type";
-}
-
-function assertEqVec(v, w) {
-    var typeV = GetType(v);
-    var lengthV = GetLength(typeV);
-    var ext = typeV.extractLane;
-    assertEq(GetType(w), typeV);
-    for (var i = 0; i < lengthV; i++)
-        assertEq(ext(v, i), ext(w, i));
-}
-
-function assertEqVecArr(v, w) {
-    var typeV = GetType(v);
-    var lengthV = GetLength(typeV);
-    var ext = typeV.extractLane;
-    assertEq(w.length, lengthV);
-
-    for (var i = 0; i < lengthV; i++)
-        assertEq(ext(v, i), w[i]);
-}
-
-function assertEqX4(vec, arr, ...opts) {
-
-    var assertFunc;
-    if (opts.length == 1 && typeof opts[0] !== 'undefined') {
-        assertFunc = opts[0];
-    } else {
-        assertFunc = assertEq;
-    }
-
-    var Type = GetType(vec);
-
-    assertFunc(Type.extractLane(vec, 0), arr[0]);
-    assertFunc(Type.extractLane(vec, 1), arr[1]);
-    assertFunc(Type.extractLane(vec, 2), arr[2]);
-    assertFunc(Type.extractLane(vec, 3), arr[3]);
-}
-
-function simdToArray(vec) {
-    var Type = GetType(vec);
-    var Length = GetLength(Type);
-    var a = [];
-    for (var i = 0; i < Length; i++)
-        a.push(Type.extractLane(vec, i));
-    return a;
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/anyall.js
+++ /dev/null
@@ -1,38 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function all(B, n) {
-    var a = B.splat(true);
-    for (var i = 0; i < n; i++) {
-        var b = B.replaceLane(a, i, false);
-        assertEq(B.allTrue(b), false);
-        var c = B.replaceLane(b, i, true);
-        assertEq(B.allTrue(c), true);
-    }
-}
-
-function any(B, n) {
-    var a = B.splat(false);
-    for (var i = 0; i < n; i++) {
-        var b = B.replaceLane(a, i, true);
-        assertEq(B.anyTrue(b), true);
-        var c = B.replaceLane(b, i, false);
-        assertEq(B.anyTrue(c), false);
-    }
-}
-
-function f() {
-    for (var j = 0; j < 200; j++) {
-        all(SIMD.Bool64x2, 2)
-        any(SIMD.Bool64x2, 2)
-        all(SIMD.Bool32x4, 4)
-        any(SIMD.Bool32x4, 4)
-        all(SIMD.Bool16x8, 8)
-        any(SIMD.Bool16x8, 8)
-        all(SIMD.Bool8x16, 16)
-        any(SIMD.Bool8x16, 16)
-    }
-}
-
-f()
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/binary-arith.js
+++ /dev/null
@@ -1,30 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var i1 = SIMD.Int32x4(1, 2, 3, 4);
-    var i2 = SIMD.Int32x4(4, 3, 2, 1);
-
-    var f1 = SIMD.Float32x4(1, 2, 3, 4);
-    var f2 = SIMD.Float32x4(4, 3, 2, 1);
-
-    var i8_1 = SIMD.Int8x16(1, 2, 3, 4, 20, 30, 40, 50, 100, 115, 120, 125);
-    var i8_2 = SIMD.Int8x16(4, 3, 2, 1,  8,  7,  6,  5,  12,  11,  10,   9);
-
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Float32x4.add(f1, f2), binaryX((x, y) => x + y, f1, f2));
-        assertEqX4(SIMD.Float32x4.sub(f1, f2), binaryX((x, y) => x - y, f1, f2));
-        assertEqX4(SIMD.Float32x4.mul(f1, f2), binaryX((x, y) => x * y, f1, f2));
-
-        assertEqX4(SIMD.Int32x4.add(i1, i2), binaryX((x, y) => x + y, i1, i2));
-        assertEqX4(SIMD.Int32x4.sub(i1, i2), binaryX((x, y) => x - y, i1, i2));
-        assertEqX4(SIMD.Int32x4.mul(i1, i2), binaryX((x, y) => x * y, i1, i2));
-
-        assertEqX4(SIMD.Int8x16.add(i8_1, i8_2), binaryX((x, y) => (x + y) << 24 >> 24, i8_1, i8_2));
-        assertEqX4(SIMD.Int8x16.sub(i8_1, i8_2), binaryX((x, y) => (x - y) << 24 >> 24, i8_1, i8_2));
-        assertEqX4(SIMD.Int8x16.mul(i8_1, i8_2), binaryX((x, y) => (x * y) << 24 >> 24, i8_1, i8_2));
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bool32x4-arith.js
+++ /dev/null
@@ -1,15 +0,0 @@
-load(libdir + "simd.js");
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var b1 = SIMD.Bool32x4(true, false, true, false);
-    var b2 = SIMD.Bool32x4(true, true, true, true);
-    do {
-        assertEqX4(SIMD.Bool32x4.and(b1, b2), booleanBinaryX4((x, y) => x && y, b1, b2));
-        assertEqX4(SIMD.Bool32x4.or(b1, b2),  booleanBinaryX4((x, y) => x || y, b1, b2));
-        assertEqX4(SIMD.Bool32x4.xor(b1, b2), booleanBinaryX4((x, y) => x != y, b1, b2));
-    } while (!inIon());
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bool32x4-const.js
+++ /dev/null
@@ -1,65 +0,0 @@
-load(libdir + "simd.js");
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-// Test constant folding into the Bool32x4 constructor.
-// Verify that we get the truthiness right, c.f. the ECMA ToBoolean() function.
-function f1() {
-    var B = SIMD.Bool32x4;
-    var S = SIMD.Bool32x4.splat;
-    return [
-        B(false, false, false, true),
-        B(true),
-        B(undefined, null, "", "x"),
-        B({}, 0, 1, -0.0),
-        B(NaN, -NaN, Symbol(), createIsHTMLDDA()),
-
-        S(false),
-        S(true),
-        S(undefined),
-        S(null),
-
-        S(""),
-        S("x"),
-        S(0),
-        S(1),
-
-        S({}),
-        S(-0.0),
-        S(NaN),
-        S(Symbol()),
-
-        S(createIsHTMLDDA())
-    ];
-}
-
-function f() {
-    for (var i = 0; i < 100; i++) {
-        var a = f1()
-        assertEqX4(a[0], [false, false, false, true]);
-        assertEqX4(a[1], [true,  false, false, false]);
-        assertEqX4(a[2], [false, false, false, true]);
-        assertEqX4(a[3], [true,  false, true,  false]);
-        assertEqX4(a[4], [false, false, true,  false]);
-
-        // Splats.
-        assertEqX4(a[5], [false, false, false, false]);
-        assertEqX4(a[6], [true, true, true, true]);
-        assertEqX4(a[7], [false, false, false, false]);
-        assertEqX4(a[8], [false, false, false, false]);
-
-        assertEqX4(a[9], [false, false, false, false]);
-        assertEqX4(a[10], [true, true, true, true]);
-        assertEqX4(a[11], [false, false, false, false]);
-        assertEqX4(a[12], [true, true, true, true]);
-
-        assertEqX4(a[13], [true, true, true, true]);
-        assertEqX4(a[14], [false, false, false, false]);
-        assertEqX4(a[15], [false, false, false, false]);
-        assertEqX4(a[16], [true, true, true, true]);
-
-        assertEqX4(a[17], [false, false, false, false]);
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1109911.js
+++ /dev/null
@@ -1,11 +0,0 @@
-if (typeof TypedObject === "undefined" || typeof SIMD === 'undefined')
-  quit();
-
-var Int32x4 = SIMD.Int32x4;
-var a = Int32x4((4294967295), 200, 300, 400);
-addCase( new Array(Math.pow(2,12)) );
-for ( var arg = "", i = 0; i < Math.pow(2,12); i++ ) {}
-addCase( a );
-function addCase(object) {
-  object.length
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1121299.js
+++ /dev/null
@@ -1,31 +0,0 @@
-if (!this.hasOwnProperty("SIMD"))
-  quit();
-
-setJitCompilerOption("baseline.warmup.trigger", 10);
-setJitCompilerOption("ion.warmup.trigger", 30);
-
-function test_1(i) {
-  if (i >= 40)
-    return;
-  var a = SIMD.Float32x4(1.1, 2.2, 3.3, 4.6);
-  SIMD.Int32x4.fromFloat32x4(a);
-  test_1(i + 1);
-}
-test_1(0);
-
-
-var Float32x4 = SIMD.Float32x4;
-function test_2() {
-    var Array = Float32x4.array(3);
-    var array = new Array([
-        Float32x4(1, 2, 3, 4),
-        Float32x4(5, 6, 7, 8),
-        Float32x4(9, 10, 11, 12)
-    ]);
-    if (typeof reportCompare === "function")
-        reportCompare(true, true);
-}
-test_2();
-evaluate("test_2(); test_2();", {
-    isRunOnce: true,
-});
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1123631.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (!this.hasOwnProperty("SIMD"))
-  quit();
-
-var Float64x2 = SIMD.Float64x2;
-function test() {
-  var a = Float64x2(1, 2);
-}
-test();
-test();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1130845.js
+++ /dev/null
@@ -1,15 +0,0 @@
-if (!this.hasOwnProperty("SIMD"))
-  quit();
-
-var Int32x4 = SIMD.Int32x4;
-function test() {
-  var a = Int32x4();
-  var b = Int32x4(10, 20, 30, 40);
-  var c = SIMD.Int32x4.and(a, b);
-  assertEq(Int32x4.extractLane(c, 0), 0);
-  return 0;
-}
-test();
-var u = [], v = [];
-for (var j=0; j<u.length; ++j)
-    v[test()] = t;
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1241872.js
+++ /dev/null
@@ -1,10 +0,0 @@
-if (typeof SIMD !== 'object')
-    quit(0);
-
-function test() {
-    return SIMD.Float32x4().toSource();
-}
-
-var r = '';
-for (var i = 0; i < 10000; i++)
-    r = test();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1248503.js
+++ /dev/null
@@ -1,16 +0,0 @@
-if (typeof SIMD !== 'object')
-    quit(0);
-
-function assertEqVec(v, w) {
-    [0].forEach(i => v, w);
-    function assertEqX4(...opts) {}
-}
-gczeal(1);
-function f() {
-    SIMD.Float32x4();
-    var i1 = SIMD.Int32x4();
-    for (j = 0; j < 100000; ++j, eval.eval)
-        assertEqVec(SIMD.Int32x4.check(i1), i1);
-}
-f();
-
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1273483.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (typeof SIMD === 'undefined')
-    quit();
-
-Int8x16 = SIMD.Int8x16;
-var Int32x4 = SIMD.Int32x4;
-function testSwizzleForType(type) { return type(); }
-testSwizzleForType(Int8x16);
-function testSwizzleInt32x4() { return testSwizzleForType(Int32x4); }
-testSwizzleInt32x4();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1296640-gc-args.js
+++ /dev/null
@@ -1,9 +0,0 @@
-if (typeof gczeal === 'undefined' || typeof SIMD === 'undefined') {
-    quit();
-}
-
-gczeal(9, 2);
-var Int8x16 = SIMD.Int8x16;
-var v = Int8x16();
-var good = { valueOf: () => 21 };
-Int8x16.shiftLeftByScalar(v, good);
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1303780-gc-args.js
+++ /dev/null
@@ -1,12 +0,0 @@
-if (typeof gczeal === 'undefined' || typeof SIMD === 'undefined') {
-    quit();
-}
-
-gczeal(14,2);
-var Float32x4 = SIMD.Float32x4;
-function test() {
-    var v = Float32x4(1,2,3,4);
-    var good = {valueOf: () => 42};
-    Float32x4.replaceLane(v, 0, good);
-}
-test();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug1435317.js
+++ /dev/null
@@ -1,25 +0,0 @@
-load(libdir + 'simd.js');
-
-var ab = new ArrayBuffer(64 * 1024);
-var arr = new Uint8Array(ab);
-
-(function(glob, imp, b) {
-  "use asm";
-  var arr = new glob.Uint8Array(b);
-  return {}
-})(this, null, ab);
-
-function testSimdX4() {
-    for (var i = 10; i --> 0;) {
-        var caught;
-        try {
-            v = SIMD.Int32x4.load(arr, 65534);
-        } catch (e) {
-            caught = e;
-        }
-        assertEq(caught instanceof RangeError, true);
-    }
-}
-
-setJitCompilerOption('ion.warmup.trigger', 0);
-testSimdX4();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/bug953108.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/
- */
-
-if (!this.hasOwnProperty("TypedObject") || !this.hasOwnProperty("SIMD"))
-  quit();
-
-var Float32x4 = SIMD.Float32x4;
-Float32x4.array(1);
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/check.js
+++ /dev/null
@@ -1,25 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var f1 = SIMD.Float32x4(1, 2, 3, 4);
-    var i1 = SIMD.Int32x4(1, 2, -3, 4);
-    var b1 = SIMD.Bool32x4(true, true, false, true);
-    var i = 0;
-    try {
-        for (; i < 150; i++) {
-            if (i > 148)
-                i1 = f1;
-            assertEqVec(SIMD.Int32x4.check(i1), i1);
-            assertEqVec(SIMD.Float32x4.check(f1), f1);
-            assertEqVec(SIMD.Bool32x4.check(b1), b1);
-        }
-    } catch (ex) {
-        assertEq(i, 149);
-        assertEq(ex instanceof TypeError, true);
-    }
-}
-
-f();
-
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/compare.js
+++ /dev/null
@@ -1,39 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var f1 = SIMD.Float32x4(1, 2, 3, 4);
-    var f2 = SIMD.Float32x4(NaN, Infinity, 3.14, -0);
-
-    var i1 = SIMD.Int32x4(1, 2, -3, 4);
-    var i2 = SIMD.Int32x4(1, -2, 3, 0);
-
-    var u1 = SIMD.Uint32x4(1, 2, -3, 4);
-    var u2 = SIMD.Uint32x4(1, -2, 3, 0x80000000);
-
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Int32x4.lessThan(i1, i2),             [false, false, true, false]);
-        assertEqX4(SIMD.Int32x4.lessThanOrEqual(i1, i2),      [true, false, true, false]);
-        assertEqX4(SIMD.Int32x4.equal(i1, i2),                [true, false, false, false]);
-        assertEqX4(SIMD.Int32x4.notEqual(i1, i2),             [false, true, true, true]);
-        assertEqX4(SIMD.Int32x4.greaterThan(i1, i2),          [false, true, false, true]);
-        assertEqX4(SIMD.Int32x4.greaterThanOrEqual(i1, i2),   [true, true, false, true]);
-
-        assertEqX4(SIMD.Uint32x4.lessThan(u1, u2),             [false, true, false, true]);
-        assertEqX4(SIMD.Uint32x4.lessThanOrEqual(u1, u2),      [true,  true, false, true]);
-        assertEqX4(SIMD.Uint32x4.equal(u1, u2),                [true, false, false, false]);
-        assertEqX4(SIMD.Uint32x4.notEqual(u1, u2),             [false, true, true, true]);
-        assertEqX4(SIMD.Uint32x4.greaterThan(u1, u2),          [false, false, true, false]);
-        assertEqX4(SIMD.Uint32x4.greaterThanOrEqual(u1, u2),   [true, false, true, false]);
-
-        assertEqX4(SIMD.Float32x4.lessThan(f1, f2),             [false, true, true, false]);
-        assertEqX4(SIMD.Float32x4.lessThanOrEqual(f1, f2),      [false, true, true, false]);
-        assertEqX4(SIMD.Float32x4.equal(f1, f2),                [false, false, false, false]);
-        assertEqX4(SIMD.Float32x4.notEqual(f1, f2),             [true, true, true, true]);
-        assertEqX4(SIMD.Float32x4.greaterThan(f1, f2),          [false, false, false, true]);
-        assertEqX4(SIMD.Float32x4.greaterThanOrEqual(f1, f2),   [false, false, false, true]);
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/complex-4.js
+++ /dev/null
@@ -1,70 +0,0 @@
-load(libdir + 'simd.js');
-
-if (typeof SIMD === "undefined")
-    quit();
-
-setJitCompilerOption("baseline.warmup.trigger", 10);
-setJitCompilerOption("ion.warmup.trigger", 90);
-var max = 100; // Make have the warm-up counter high enough to
-               // consider inlining functions.
-
-var f4 = SIMD.Int32x4; // :TODO: Support Float32x4 arith.
-var f4add = f4.add;
-var f4sub = f4.sub;
-var f4mul = f4.mul;
-
-function c4mul(z1, z2) {
-  var { re: re1, im: im1 } = z1;
-  var { re: re2, im: im2 } = z2;
-  var rere = f4mul(re1, re2);
-  var reim = f4mul(re1, im2);
-  var imre = f4mul(im1, re2);
-  var imim = f4mul(im1, im2);
-  return { re: f4sub(rere, imim), im: f4add(reim, imre) };
-}
-
-function c4inv(z) {
-  var { re: re, im: im } = z;
-  var minus = f4(-1, -1, -1, -1);
-  return { re: re, im: f4mul(im, minus) };
-}
-
-function c4inv_inplace(z) {
-  var res = c4inv(z);
-  z.re = res.re;
-  z.im = res.im;
-}
-
-function c4norm(z) {
-  var { re: re, im: im } = c4mul(z, c4inv(z));
-  return re;
-}
-
-function c4scale(z, s) {
-  var { re: re, im: im } = z;
-  var f4s = f4(s, s, s, s);
-  return { re: f4mul(re, f4s), im: f4mul(im, f4s) };
-}
-
-var rotate90 = { re: f4(0, 0, 0, 0), im: f4(1, 1, 1, 1) };
-var cardinals = { re: f4(1, 0, -1, 0), im: f4(0, 1, 0, -1) };
-
-function test(dots) {
-  for (var j = 0; j < 4; j++) {
-    dots = c4mul(rotate90, dots);
-    if (j % 2 == 0) // Magic !
-      c4inv_inplace(dots);
-    dots = c4scale(dots, 2);
-  }
-  return dots;
-}
-
-assertEqX4(c4norm(cardinals), simdToArray(f4.splat(1)));
-var cardinals16 = c4scale(cardinals, 16);
-
-for (var i = 0; i < max; i++) {
-  var res = test(cardinals);
-  assertEqX4(c4norm(res), simdToArray(f4.splat(16 * 16)));
-  assertEqX4(res.re, simdToArray(cardinals16.re));
-  assertEqX4(res.im, simdToArray(cardinals16.im));
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/convert.js
+++ /dev/null
@@ -1,68 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 30);
-
-var cast = (function() {
-    var i32 = new Int32Array(1);
-    var f32 = new Float32Array(i32.buffer);
-    return {
-        fromInt32Bits(x) {
-            i32[0] = x;
-            return f32[0];
-        },
-
-        fromFloat32Bits(x) {
-            f32[0] = x;
-            return i32[0];
-        }
-    }
-})();
-
-function f() {
-    // No bailout here.
-    var f4 = SIMD.Float32x4(1, 2, 3, 4);
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    var BitOrZero = (x) => x | 0;
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Float32x4.fromInt32x4(i4), unaryX4(BitOrZero, f4, Math.fround));
-        assertEqX4(SIMD.Float32x4.fromInt32x4Bits(i4), unaryX4(cast.fromInt32Bits, f4, Math.fround));
-        assertEqX4(SIMD.Int32x4.fromFloat32x4(f4), unaryX4(Math.fround, i4, BitOrZero));
-        assertEqX4(SIMD.Int32x4.fromFloat32x4Bits(f4), unaryX4(cast.fromFloat32Bits, i4, BitOrZero));
-    }
-}
-
-function uglyDuckling(val) {
-    // We bail out when i == 149 because the conversion will return
-    // 0x80000000 and the input actually wasn't in bounds.
-    val = Math.fround(val);
-    for (var i = 0; i < 150; i++) {
-        var caught = false;
-        try {
-            var v = SIMD.Float32x4(i < 149 ? 0 : val, 0, 0, 0)
-            SIMD.Int32x4.fromFloat32x4(v);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-}
-
-function dontBail() {
-    // On x86, the conversion will return 0x80000000, which will imply that we
-    // check the input values. However, we shouldn't bail out in this case.
-    for (var i = 0; i < 150; i++) {
-        var v = SIMD.Float32x4(i < 149 ? 0 : -Math.pow(2, 31), 0, 0, 0)
-        SIMD.Int32x4.fromFloat32x4(v);
-    }
-}
-
-f();
-
-dontBail();
-dontBail();
-
-uglyDuckling(Math.pow(2, 31));
-uglyDuckling(NaN);
-uglyDuckling(-Math.pow(2, 32));
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/float32x4-binary-arith.js
+++ /dev/null
@@ -1,33 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function maxNum(x, y) {
-    if (x != x)
-        return y;
-    if (y != y)
-        return x;
-    return Math.max(x, y);
-}
-
-function minNum(x, y) {
-    if (x != x)
-        return y;
-    if (y != y)
-        return x;
-    return Math.min(x, y);
-}
-
-function f() {
-    var f1 = SIMD.Float32x4(1, 2, 3, 4);
-    var f2 = SIMD.Float32x4(4, 3, 2, 1);
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Float32x4.div(f1, f2), binaryX((x, y) => x / y, f1, f2));
-        assertEqX4(SIMD.Float32x4.min(f1, f2), binaryX(Math.min, f1, f2));
-        assertEqX4(SIMD.Float32x4.max(f1, f2), binaryX(Math.max, f1, f2));
-        assertEqX4(SIMD.Float32x4.minNum(f1, f2), binaryX(minNum, f1, f2));
-        assertEqX4(SIMD.Float32x4.maxNum(f1, f2), binaryX(maxNum, f1, f2));
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/getters.js
+++ /dev/null
@@ -1,48 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var i4 = SIMD.Int32x4(1, -2, 3, -4);
-    var u4 = SIMD.Uint32x4(1, -2, 3, 0x88000000);
-    var b4 = SIMD.Bool32x4(true, true, false, true);
-
-
-    var bt4 = SIMD.Bool32x4(true, true, true, true);
-    var bf4 = SIMD.Bool32x4(false, false, false, false);
-
-    var v = Math.fround(13.37);
-    var f4 = SIMD.Float32x4(13.37, NaN, Infinity, -0);
-
-    for (var i = 0; i < 150; i++) {
-        assertEq(SIMD.Int32x4.extractLane(i4, 0), 1);
-        assertEq(SIMD.Int32x4.extractLane(i4, 1), -2);
-        assertEq(SIMD.Int32x4.extractLane(i4, 2), 3);
-        assertEq(SIMD.Int32x4.extractLane(i4, 3), -4);
-
-        assertEq(SIMD.Uint32x4.extractLane(u4, 0), 1);
-        assertEq(SIMD.Uint32x4.extractLane(u4, 1), -2 >>> 0);
-        assertEq(SIMD.Uint32x4.extractLane(u4, 2), 3);
-        assertEq(SIMD.Uint32x4.extractLane(u4, 3), 0x88000000);
-
-        assertEq(SIMD.Float32x4.extractLane(f4, 0), v);
-        assertEq(SIMD.Float32x4.extractLane(f4, 1), NaN);
-        assertEq(SIMD.Float32x4.extractLane(f4, 2), Infinity);
-        assertEq(SIMD.Float32x4.extractLane(f4, 3), -0);
-
-        assertEq(SIMD.Bool32x4.extractLane(b4, 0), true);
-        assertEq(SIMD.Bool32x4.extractLane(b4, 1), true);
-        assertEq(SIMD.Bool32x4.extractLane(b4, 2), false);
-        assertEq(SIMD.Bool32x4.extractLane(b4, 3), true);
-
-        assertEq(SIMD.Bool32x4.anyTrue(b4), true);
-        assertEq(SIMD.Bool32x4.allTrue(b4), false);
-
-        assertEq(SIMD.Bool32x4.anyTrue(bt4), true);
-        assertEq(SIMD.Bool32x4.allTrue(bt4), true);
-        assertEq(SIMD.Bool32x4.anyTrue(bf4), false);
-        assertEq(SIMD.Bool32x4.allTrue(bf4), false);
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/inline-missing-arguments.js
+++ /dev/null
@@ -1,81 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function test(i) {
-    assertEqX4(SIMD.Int32x4(),              [0, 0, 0, 0]);
-    assertEqX4(SIMD.Int32x4(i),             [i, 0, 0, 0]);
-    assertEqX4(SIMD.Int32x4(i, 1),          [i, 1, 0, 0]);
-    assertEqX4(SIMD.Int32x4(i, 1, 2),       [i, 1, 2, 0]);
-    assertEqX4(SIMD.Int32x4(i, 1, 2, 3),    [i, 1, 2, 3]);
-    assertEqX4(SIMD.Int32x4(i, 1, 2, 3, 4), [i, 1, 2, 3]);
-
-    assertEqVecArr(SIMD.Int16x8(),              [0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i),             [i, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i, 1),          [i, 1, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i, 1, 2),       [i, 1, 2, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i, 1, 2, 3),    [i, 1, 2, 3, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i, 1, 2, 3, 4), [i, 1, 2, 3, 4, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int16x8(i, 1, 2, 3, 4, 5, 6),
-                               [i, 1, 2, 3, 4, 5, 6, 0]);
-    j = i & 32
-    assertEqVecArr(SIMD.Int8x16(),              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j),             [j, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1),          [j, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1, 2),       [j, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1, 2, 3),    [j, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1, 2, 3, 4), [j, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1, 2, 3, 4, 5, 6),
-                               [j, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    assertEqVecArr(SIMD.Int8x16(j, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
-                               [j, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0]);
-
-    assertEqX4(SIMD.Float32x4(),                [NaN, NaN, NaN, NaN]);
-    assertEqX4(SIMD.Float32x4(i),               [i,   NaN, NaN, NaN]);
-    assertEqX4(SIMD.Float32x4(i, 1),            [i,   1,   NaN, NaN]);
-    assertEqX4(SIMD.Float32x4(i, 1, 2),         [i,   1,   2,   NaN]);
-    assertEqX4(SIMD.Float32x4(i, 1, 2, 3),      [i,   1,   2,   3  ]);
-    assertEqX4(SIMD.Float32x4(i, 1, 2, 3, 4),   [i,   1,   2,   3  ]);
-
-    var b = i % 2 > 0 ;
-    assertEqX4(SIMD.Bool32x4(),                           [false, false, false, false]);
-    assertEqX4(SIMD.Bool32x4(b),                          [b,     false, false, false]);
-    assertEqX4(SIMD.Bool32x4(b, true),                    [b,     true,  false, false]);
-    assertEqX4(SIMD.Bool32x4(b, false, true),             [b,     false, true,  false]);
-    assertEqX4(SIMD.Bool32x4(b, false, true, true),       [b,     false, true,  true ]);
-    assertEqX4(SIMD.Bool32x4(b, false, true, true, true), [b,     false, true,  true ]);
-
-    assertEqVecArr(SIMD.Bool16x8(),
-                                [false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b),
-                                [b,     false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b,     true),
-                                [b,     true,  false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b,     false, true),
-                                [b,     false, true,  false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b,     false, true,  true),
-                                [b,     false, true,  true,  false, false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b,     false, true,  true,  true),
-                                [b,     false, true,  true,  true,  false, false, false]);
-    assertEqVecArr(SIMD.Bool16x8(b,     false, true,  true,  true,  true),
-                                [b,     false, true,  true,  true,  true,  false, false]);
-
-    assertEqVecArr(SIMD.Bool8x16(),
-                                [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b),
-                                [b,     false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b,     true),
-                                [b,     true,  false, false, false, false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b,     false, true),
-                                [b,     false, true,  false, false, false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b,     false, true,  true),
-                                [b,     false, true,  true,  false, false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b,     false, true,  true,  true),
-                                [b,     false, true,  true,  true,  false, false, false, false, false, false, false, false, false, false, false]);
-    assertEqVecArr(SIMD.Bool8x16(b,     false, true,  true,  true,  true,  false, true,  true,  true),
-                                [b,     false, true,  true,  true,  true,  false, true,  true,  true,  false, false, false, false, false, false]);
-}
-
-for(var i=0; i<300; i++) {
-    test(i);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/load.js
+++ /dev/null
@@ -1,123 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 40);
-
-function f() {
-    var f32 = new Float32Array(16);
-    for (var i = 0; i < 16; i++)
-        f32[i] = i + 1;
-
-    var f64 = new Float64Array(f32.buffer);
-    var i32 = new Int32Array(f32.buffer);
-    var u32 = new Uint32Array(f32.buffer);
-    var i16 = new Int16Array(f32.buffer);
-    var u16 = new Uint16Array(f32.buffer);
-    var i8  = new Int8Array(f32.buffer);
-    var u8  = new Uint8Array(f32.buffer);
-
-    function testLoad() {
-        assertEqX4(SIMD.Float32x4.load(f64, 0),      [1,2,3,4]);
-        assertEqX4(SIMD.Float32x4.load(f32, 1),      [2,3,4,5]);
-        assertEqX4(SIMD.Float32x4.load(i32, 2),      [3,4,5,6]);
-        assertEqX4(SIMD.Float32x4.load(i16, 3 << 1), [4,5,6,7]);
-        assertEqX4(SIMD.Float32x4.load(u16, 4 << 1), [5,6,7,8]);
-        assertEqX4(SIMD.Float32x4.load(i8 , 5 << 2), [6,7,8,9]);
-        assertEqX4(SIMD.Float32x4.load(u8 , 6 << 2), [7,8,9,10]);
-
-        assertEqX4(SIMD.Float32x4.load(f64, (16 >> 1) - (4 >> 1)), [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(f32, 16 - 4),               [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(i32, 16 - 4),               [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(i16, (16 << 1) - (4 << 1)), [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(u16, (16 << 1) - (4 << 1)), [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(i8,  (16 << 2) - (4 << 2)), [13,14,15,16]);
-        assertEqX4(SIMD.Float32x4.load(u8,  (16 << 2) - (4 << 2)), [13,14,15,16]);
-    }
-
-    function testLoad1() {
-        assertEqX4(SIMD.Float32x4.load1(f64, 0),      [1,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(f32, 1),      [2,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i32, 2),      [3,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i16, 3 << 1), [4,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(u16, 4 << 1), [5,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i8 , 5 << 2), [6,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(u8 , 6 << 2), [7,0,0,0]);
-
-        assertEqX4(SIMD.Float32x4.load1(f64, (16 >> 1) - (4 >> 1)), [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(f32, 16 - 4),               [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i32, 16 - 4),               [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i16, (16 << 1) - (4 << 1)), [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(u16, (16 << 1) - (4 << 1)), [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(i8,  (16 << 2) - (4 << 2)), [13,0,0,0]);
-        assertEqX4(SIMD.Float32x4.load1(u8,  (16 << 2) - (4 << 2)), [13,0,0,0]);
-    }
-
-    function testLoad2() {
-        assertEqX4(SIMD.Float32x4.load2(f64, 0),      [1,2,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(f32, 1),      [2,3,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i32, 2),      [3,4,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i16, 3 << 1), [4,5,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(u16, 4 << 1), [5,6,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i8 , 5 << 2), [6,7,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(u8 , 6 << 2), [7,8,0,0]);
-
-        assertEqX4(SIMD.Float32x4.load2(f64, (16 >> 1) - (4 >> 1)), [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(f32, 16 - 4),               [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i32, 16 - 4),               [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i16, (16 << 1) - (4 << 1)), [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(u16, (16 << 1) - (4 << 1)), [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(i8,  (16 << 2) - (4 << 2)), [13,14,0,0]);
-        assertEqX4(SIMD.Float32x4.load2(u8,  (16 << 2) - (4 << 2)), [13,14,0,0]);
-    }
-
-    function testLoad3() {
-        assertEqX4(SIMD.Float32x4.load3(f64, 0),      [1,2,3,0]);
-        assertEqX4(SIMD.Float32x4.load3(f32, 1),      [2,3,4,0]);
-        assertEqX4(SIMD.Float32x4.load3(i32, 2),      [3,4,5,0]);
-        assertEqX4(SIMD.Float32x4.load3(i16, 3 << 1), [4,5,6,0]);
-        assertEqX4(SIMD.Float32x4.load3(u16, 4 << 1), [5,6,7,0]);
-        assertEqX4(SIMD.Float32x4.load3(i8 , 5 << 2), [6,7,8,0]);
-        assertEqX4(SIMD.Float32x4.load3(u8 , 6 << 2), [7,8,9,0]);
-
-        assertEqX4(SIMD.Float32x4.load3(f64, (16 >> 1) - (4 >> 1)), [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(f32, 16 - 4),               [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(i32, 16 - 4),               [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(i16, (16 << 1) - (4 << 1)), [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(u16, (16 << 1) - (4 << 1)), [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(i8,  (16 << 2) - (4 << 2)), [13,14,15,0]);
-        assertEqX4(SIMD.Float32x4.load3(u8,  (16 << 2) - (4 << 2)), [13,14,15,0]);
-    }
-
-    for (var i = 0; i < 150; i++) {
-        testLoad();
-        testLoad1();
-        testLoad2();
-        testLoad3();
-    }
-}
-
-f();
-
-function testBailout(uglyDuckling) {
-    var f32 = new Float32Array(16);
-    for (var i = 0; i < 16; i++)
-        f32[i] = i + 1;
-
-    var i8  = new Int8Array(f32.buffer);
-
-    for (var i = 0; i < 150; i++) {
-        var caught = false;
-        try {
-            SIMD.Float32x4.load(i8, (i < 149) ? 0 : uglyDuckling);
-        } catch (e) {
-            print(e);
-            assertEq(e instanceof RangeError, true);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-}
-
-print('Testing range checks...');
-testBailout(-1);
-testBailout(-15);
-testBailout(12 * 4 + 1);
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/nursery-overflow.js
+++ /dev/null
@@ -1,29 +0,0 @@
-load(libdir + 'simd.js');
-
-if (typeof SIMD === "undefined")
-    quit();
-
-setJitCompilerOption("baseline.warmup.trigger", 10);
-setJitCompilerOption("ion.warmup.trigger", 30);
-
-var i4 = SIMD.Int32x4;
-var i4sub = SIMD.Int32x4.sub;
-
-function simdbox(i) {
-  return i4(i, i, i, i);
-}
-
-function test() {
-  var arr = [];
-
-  // overflow the nursery with live SIMD objects.
-  for (var i = 0; i < 100000; i++) {
-    arr.push(simdbox(i));
-  }
-
-  return arr;
-}
-
-var arr = test();
-for (var i = 0; i < arr.length; i++)
-  assertEqX4(arr[i], [i, i, i, i]);
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/recover.js
+++ /dev/null
@@ -1,70 +0,0 @@
-load(libdir + 'simd.js');
-
-if (!this.hasOwnProperty("SIMD"))
-  quit();
-
-// This test case ensure that if we are able to optimize SIMD, then we can use
-// recover instructions to get rid of the allocations. So, there is no value
-// (and the test case would fail) if we are not able to inline SIMD
-// constructors.
-if (!isSimdAvailable())
-  quit();
-
-setJitCompilerOption("baseline.warmup.trigger", 10);
-setJitCompilerOption("ion.warmup.trigger", 20);
-
-// This function is used to cause an invalidation after having removed a branch
-// after DCE.  This is made to check if we correctly recover an array
-// allocation.
-var uceFault = function (i) {
-    if (i > 98)
-        uceFault = function (i) { return true; };
-    return false;
-};
-
-// Check that we can correctly recover a boxed value.
-var uceFault_simdBox_i4 = eval(uneval(uceFault).replace('uceFault', 'uceFault_simdBox_i4'));
-function simdBox_i4(i) {
-    var a = SIMD.Int32x4(i, i, i, i);
-    if (uceFault_simdBox_i4(i) || uceFault_simdBox_i4(i))
-        assertEqX4(a, [i, i, i, i]);
-    assertRecoveredOnBailout(a, true);
-    return 0;
-}
-
-var uceFault_simdBox_u4 = eval(uneval(uceFault).replace('uceFault', 'uceFault_simdBox_u4'));
-function simdBox_u4(i) {
-    var a = SIMD.Uint32x4(i, 98 - i, i + 0x7ffffff0, i + 0xffffff00);
-    if (uceFault_simdBox_u4(i) || uceFault_simdBox_u4(i))
-        assertEqX4(a, [i, 98 - i, i + 0x7ffffff0, i + 0xffffff00].map(x => x >>> 0));
-    assertRecoveredOnBailout(a, true);
-    return 0;
-}
-
-var uceFault_simdBox_f4 = eval(uneval(uceFault).replace('uceFault', 'uceFault_simdBox_f4'));
-function simdBox_f4(i) {
-    var a = SIMD.Float32x4(i, i + 0.1, i + 0.2, i + 0.3);
-    if (uceFault_simdBox_f4(i) || uceFault_simdBox_f4(i))
-        assertEqX4(a, [i, i + 0.1, i + 0.2, i + 0.3].map(Math.fround));
-    assertRecoveredOnBailout(a, true);
-    return 0;
-}
-
-var uceFault_simdBox_b4 = eval(uneval(uceFault).replace('uceFault', 'uceFault_simdBox_b4'));
-function simdBox_b4(i) {
-    var val1 = i%2 === 0,
-        val2 = !val1;
-
-    var a = SIMD.Bool32x4(val1, val2, val1, val2);
-    if (uceFault_simdBox_b4(i) || uceFault_simdBox_b4(i))
-        assertEqX4(a, [val1, val2, val1, val2]);
-    assertRecoveredOnBailout(a, true);
-    return 0;
-}
-
-for (var i = 0; i < 100; i++) {
-    simdBox_i4(i);
-    simdBox_u4(i);
-    simdBox_f4(i);
-    simdBox_b4(i);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/replacelane.js
+++ /dev/null
@@ -1,181 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var f4 = SIMD.Float32x4(1, 2, 3, 4);
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    var b4 = SIMD.Bool32x4(true, false, true, false);
-
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Int32x4.replaceLane(i4, 0, 42), [42, 2, 3, 4]);
-        assertEqX4(SIMD.Int32x4.replaceLane(i4, 1, 42), [1, 42, 3, 4]);
-        assertEqX4(SIMD.Int32x4.replaceLane(i4, 2, 42), [1, 2, 42, 4]);
-        assertEqX4(SIMD.Int32x4.replaceLane(i4, 3, 42), [1, 2, 3, 42]);
-
-        assertEqX4(SIMD.Float32x4.replaceLane(f4, 0, 42), [42, 2, 3, 4]);
-        assertEqX4(SIMD.Float32x4.replaceLane(f4, 1, 42), [1, 42, 3, 4]);
-        assertEqX4(SIMD.Float32x4.replaceLane(f4, 2, 42), [1, 2, 42, 4]);
-        assertEqX4(SIMD.Float32x4.replaceLane(f4, 3, 42), [1, 2, 3, 42]);
-
-        assertEqX4(SIMD.Bool32x4.replaceLane(b4, 0, false), [false, false, true, false]);
-        assertEqX4(SIMD.Bool32x4.replaceLane(b4, 1, true), [true, true, true, false]);
-        assertEqX4(SIMD.Bool32x4.replaceLane(b4, 2, false), [true, false, false, false]);
-        assertEqX4(SIMD.Bool32x4.replaceLane(b4, 3, true), [true, false, true, true]);
-    }
-}
-
-f();
-
-function e() {
-    var f4 = SIMD.Float32x4(1, 2, 3, 4);
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    var b4 = SIMD.Bool32x4(true, false, true, false);
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Int32x4.replaceLane(i < 149 ? i4 : f4, 0, 42);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Int32x4.replaceLane(i < 149 ? i4 : b4, 0, 42);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Int32x4.replaceLane(i4, i < 149 ? 0 : 4, 42);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Int32x4.replaceLane(i4, i < 149 ? 0 : 1.1, 42);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Float32x4.replaceLane(i < 149 ? f4 : i4, 0, 42);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Float32x4.replaceLane(i < 149 ? f4 : b4, 0, 42);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Float32x4.replaceLane(f4, i < 149 ? 0 : 4, 42);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Float32x4.replaceLane(f4, i < 149 ? 0 : 1.1, 42);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Bool32x4.replaceLane(i < 149 ? b4 : i4, 0, true);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Bool32x4.replaceLane(i < 149 ? b4 : f4, 0, true);
-        } catch(e) {
-            assertEq(e instanceof TypeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Bool32x4.replaceLane(b4, i < 149 ? 0 : 4, true);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-    for (let i = 0; i < 150; i++) {
-        let caught = false;
-        try {
-            let x = SIMD.Bool32x4.replaceLane(b4, i < 149 ? 0 : 1.1, true);
-        } catch(e) {
-            assertEq(e instanceof RangeError, true);
-            assertEq(i, 149);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-
-}
-
-e();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/saturate.js
+++ /dev/null
@@ -1,37 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-const INT8_MIN = -128;
-const INT8_MAX = 127;
-const UINT8_MAX = 255;
-
-function sat8(x) {
-    if (x < INT8_MIN) return INT8_MIN;
-    if (x > INT8_MAX) return INT8_MAX;
-    return x;
-}
-
-function usat8(x) {
-    if (x < 0) return 0;
-    if (x > UINT8_MAX) return UINT8_MAX;
-    return x;
-}
-
-function f() {
-    var i1 = SIMD.Int8x16(1, 100, 3, 4);
-    var i2 = SIMD.Int8x16(4, 30, 2, 1);
-
-    var u1 = SIMD.Uint8x16(1, 2, 3, 4);
-    var u2 = SIMD.Uint8x16(4, 3, 2, 1);
-
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Int8x16.addSaturate(i1, i2), binaryX((x, y) => sat8(x + y), i1, i2));
-        assertEqX4(SIMD.Int8x16.subSaturate(i1, i2), binaryX((x, y) => sat8(x - y), i1, i2));
-
-        assertEqX4(SIMD.Uint8x16.addSaturate(u1, u2), binaryX((x, y) => usat8(x + y), u1, u2));
-        assertEqX4(SIMD.Uint8x16.subSaturate(u1, u2), binaryX((x, y) => usat8(x - y), u1, u2));
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/select.js
+++ /dev/null
@@ -1,35 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function select(type, mask, ifTrue, ifFalse) {
-    var arr = [];
-    for (var i = 0; i < 4; i++) {
-        var selector = SIMD.Bool32x4.extractLane(mask, i);
-        arr.push(type.extractLane(selector ? ifTrue : ifFalse, i));
-    }
-    return arr;
-}
-
-function f() {
-    var f1 = SIMD.Float32x4(1, 2, 3, 4);
-    var f2 = SIMD.Float32x4(NaN, Infinity, 3.14, -0);
-
-    var i1 = SIMD.Int32x4(2, 3, 5, 8);
-    var i2 = SIMD.Int32x4(13, 37, 24, 42);
-
-    var TTFT = SIMD.Bool32x4(true, true, false, true);
-    var TFTF = SIMD.Bool32x4(true, false, true, false);
-
-    var mask = SIMD.Int32x4(0xdeadbeef, 0xbaadf00d, 0x00ff1ce, 0xdeadc0de);
-
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Float32x4.select(TTFT, f1, f2), select(SIMD.Float32x4, TTFT, f1, f2));
-        assertEqX4(SIMD.Float32x4.select(TFTF, f1, f2), select(SIMD.Float32x4, TFTF, f1, f2));
-
-        assertEqX4(SIMD.Int32x4.select(TFTF, i1, i2), select(SIMD.Int32x4, TFTF, i1, i2));
-        assertEqX4(SIMD.Int32x4.select(TTFT, i1, i2), select(SIMD.Int32x4, TTFT, i1, i2));
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/shift.js
+++ /dev/null
@@ -1,75 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function curry(f, arg) { return f.bind(null, arg); }
-
-function binaryLsh(count, v) { count &= 31; return (v << count) | 0; }
-function lsh(count) { return curry(binaryLsh, count); }
-
-function binaryRsh(count, v) { count &= 31; return (v >> count) | 0; }
-function rsh(count) { return curry(binaryRsh, count); }
-
-function binaryUlsh(count, v) { count &= 31; return (v << count) >>> 0; }
-function ulsh(count) { return curry(binaryUlsh, count); }
-
-function binaryUrsh(count, v) { count &= 31; return v >>> count; }
-function ursh(count) { return curry(binaryUrsh, count); }
-
-function f() {
-    var v = SIMD.Int32x4(1, 2, -3, 4);
-    var u = SIMD.Uint32x4(1, 0x55005500, -3, 0xaa00aa00);
-    var a = [1, 2, -3, 4];
-    var b = [1, 0x55005500, -3, 0xaa00aa00];
-
-    var shifts = [-2, -1, 0, 1, 31, 32, 33];
-
-    var r;
-    for (var i = 0; i < 150; i++) {
-        // Constant shift counts
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, -1), a.map(lsh(-1)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 0),  a.map(lsh(0)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 1),  a.map(lsh(1)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 2),  a.map(lsh(2)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 31), a.map(lsh(31)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 32), a.map(lsh(32)));
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, 33), a.map(lsh(33)));
-
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, -1), a.map(rsh(31)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 0),  a.map(rsh(0)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 1),  a.map(rsh(1)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 2),  a.map(rsh(2)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 31), a.map(rsh(31)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 32), a.map(rsh(32)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, 33), a.map(rsh(33)));
-
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, -1), b.map(ulsh(-1)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 0),  b.map(ulsh(0)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 1),  b.map(ulsh(1)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 2),  b.map(ulsh(2)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 31), b.map(ulsh(31)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 32), b.map(ulsh(32)));
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, 33), b.map(ulsh(33)));
-
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, -1), b.map(ursh(-1)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 0),  b.map(ursh(0)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 1),  b.map(ursh(1)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 2),  b.map(ursh(2)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 31), b.map(ursh(31)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 32), b.map(ursh(32)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, 33), b.map(ursh(33)));
-
-        // Non constant shift counts
-        var c = shifts[i % shifts.length];
-
-        assertEqX4(SIMD.Int32x4.shiftLeftByScalar(v, c), a.map(lsh(c)));
-        assertEqX4(SIMD.Int32x4.shiftRightByScalar(v, c), a.map(rsh(c)));
-
-        assertEqX4(SIMD.Uint32x4.shiftLeftByScalar(u, c), b.map(ulsh(c)));
-        assertEqX4(SIMD.Uint32x4.shiftRightByScalar(u, c), b.map(ursh(c)));
-    }
-    return r;
-}
-
-f();
-
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/shuffle.js
+++ /dev/null
@@ -1,86 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var i1 = SIMD.Int32x4(1, 2, 3, 4);
-    var i2 = SIMD.Int32x4(5, 6, 7, 8);
-
-    var leet = Math.fround(13.37);
-    var f1 = SIMD.Float32x4(-.5, -0, Infinity, leet);
-    var f2 = SIMD.Float32x4(42, .5, 23, -10);
-
-    // computes all rotations of a given array
-    function *gen(arr) {
-        var previous = arr.slice().splice(0, 4);
-        var i = 4;
-        for (var j = 0; j < 8; j++) {
-            yield previous.slice();
-            previous = previous.splice(1, previous.length - 1);
-            previous.push(arr[i]);
-            i = (i + 1) % arr.length;
-        }
-    }
-
-    var compI = [];
-    var baseI = [];
-    for (var i = 0; i < 8; i++)
-        baseI.push(SIMD.Int32x4.extractLane(i < 4 ? i1 : i2, i % 4));
-    for (var k of gen(baseI))
-        compI.push(k);
-
-    var compF = [];
-    var baseF = [];
-    for (var i = 0; i < 8; i++)
-        baseF.push(SIMD.Float32x4.extractLane(i < 4 ? f1 : f2, i % 4));
-    for (var k of gen(baseF))
-        compF.push(k);
-
-    for (var i = 0; i < 150; i++) {
-        // Variable lanes
-        var r = SIMD.Float32x4.shuffle(f1, f2, i % 8, (i + 1) % 8, (i + 2) % 8, (i + 3) % 8);
-        assertEqX4(r, compF[i % 8]);
-
-        // Constant lanes
-        assertEqX4(SIMD.Float32x4.shuffle(f1, f2, 3, 2, 4, 5), [leet, Infinity, 42, .5]);
-
-        // Variable lanes
-        var r = SIMD.Int32x4.shuffle(i1, i2, i % 8, (i + 1) % 8, (i + 2) % 8, (i + 3) % 8);
-        assertEqX4(r, compI[i % 8]);
-
-        // Constant lanes
-        assertEqX4(SIMD.Int32x4.shuffle(i1, i2, 3, 2, 4, 5), [4, 3, 5, 6]);
-    }
-}
-
-function testBailouts(expectException, uglyDuckling) {
-    var i1 = SIMD.Int32x4(1, 2, 3, 4);
-    var i2 = SIMD.Int32x4(5, 6, 7, 8);
-
-    for (var i = 0; i < 150; i++) {
-        // Test bailouts
-        var value = i == 149 ? uglyDuckling : 0;
-        var caught = false;
-        try {
-            assertEqX4(SIMD.Int32x4.shuffle(i1, i2, value, 2, 4, 5), [1, 3, 5, 6]);
-        } catch(e) {
-            print(e);
-            caught = true;
-            assertEq(i, 149);
-            assertEq(e instanceof TypeError || e instanceof RangeError, true);
-        }
-        if (i == 149)
-            assertEq(caught, expectException);
-    }
-}
-
-f();
-testBailouts(true, -1);
-testBailouts(true, 8);
-testBailouts(true, 2.5);
-testBailouts(true, undefined);
-testBailouts(true, {});
-testBailouts(true, 'one');
-testBailouts(false, false);
-testBailouts(false, null);
-testBailouts(false, " 0.0 ");
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/splat.js
+++ /dev/null
@@ -1,15 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Int32x4.splat(42),   [42, 42, 42, 42]);
-        assertEqX4(SIMD.Float32x4.splat(42), [42, 42, 42, 42]);
-        assertEqX4(SIMD.Bool32x4.splat(true), [true, true, true, true]);
-        assertEqX4(SIMD.Bool32x4.splat(false), [false, false, false, false]);
-    }
-}
-
-f();
-
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/store.js
+++ /dev/null
@@ -1,143 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 40);
-
-function f() {
-    var f32 = new Float32Array(16);
-    for (var i = 0; i < 16; i++)
-        f32[i] = i + 1;
-
-    var f64 = new Float64Array(f32.buffer);
-    var i32 = new Int32Array(f32.buffer);
-    var u32 = new Uint32Array(f32.buffer);
-    var i16 = new Int16Array(f32.buffer);
-    var u16 = new Uint16Array(f32.buffer);
-    var i8  = new Int8Array(f32.buffer);
-    var u8  = new Uint8Array(f32.buffer);
-
-    var f4 = SIMD.Float32x4(42, 43, 44, 45);
-
-    function check(n) {
-        assertEq(f32[0], 42);
-        assertEq(f32[1], n > 1 ? 43 : 2);
-        assertEq(f32[2], n > 2 ? 44 : 3);
-        assertEq(f32[3], n > 3 ? 45 : 4);
-
-        f32[0] = 1;
-        f32[1] = 2;
-        f32[2] = 3;
-        f32[3] = 4;
-    }
-
-    function testStore() {
-        SIMD.Float32x4.store(f64, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(f32, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(i32, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(u32, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(i16, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(u16, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(i8, 0, f4);
-        check(4);
-        SIMD.Float32x4.store(u8, 0, f4);
-        check(4);
-    }
-
-    function testStore1() {
-        SIMD.Float32x4.store1(f64, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(f32, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(i32, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(u32, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(i16, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(u16, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(i8, 0, f4);
-        check(1);
-        SIMD.Float32x4.store1(u8, 0, f4);
-        check(1);
-    }
-
-    function testStore2() {
-        SIMD.Float32x4.store2(f64, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(f32, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(i32, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(u32, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(i16, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(u16, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(i8, 0, f4);
-        check(2);
-        SIMD.Float32x4.store2(u8, 0, f4);
-        check(2);
-    }
-
-    function testStore3() {
-        SIMD.Float32x4.store3(f64, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(f32, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(i32, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(u32, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(i16, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(u16, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(i8, 0, f4);
-        check(3);
-        SIMD.Float32x4.store3(u8, 0, f4);
-        check(3);
-    }
-
-    for (var i = 0; i < 150; i++) {
-        testStore();
-        testStore1();
-        testStore2();
-        testStore3();
-    }
-}
-
-f();
-
-function testBailout(uglyDuckling) {
-    var f32 = new Float32Array(16);
-    for (var i = 0; i < 16; i++)
-        f32[i] = i + 1;
-
-    var i8  = new Int8Array(f32.buffer);
-
-    var f4 = SIMD.Float32x4(42, 43, 44, 45);
-
-    for (var i = 0; i < 150; i++) {
-        var caught = false;
-        try {
-            SIMD.Float32x4.store(i8, (i < 149) ? 0 : (16 << 2) - (4 << 2) + 1, f4);
-        } catch (e) {
-            print(e);
-            assertEq(e instanceof RangeError, true);
-            caught = true;
-        }
-        assertEq(i < 149 || caught, true);
-    }
-}
-
-print('Testing range checks...');
-testBailout(-1);
-testBailout(-15);
-testBailout(12 * 4 + 1);
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/swizzle.js
+++ /dev/null
@@ -1,104 +0,0 @@
-if (!this.hasOwnProperty("SIMD"))
-  quit();
-
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-function f() {
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-
-    var leet = Math.fround(13.37);
-    var f4 = SIMD.Float32x4(-.5, -0, Infinity, leet);
-
-    var compI = [
-        [1,2,3,4],
-        [2,3,4,1],
-        [3,4,1,2],
-        [4,1,2,3]
-    ];
-
-    var compF = [
-        [-.5, -0, Infinity, leet],
-        [-0, Infinity, leet, -.5],
-        [Infinity, leet, -.5, -0],
-        [leet, -.5, -0, Infinity]
-    ];
-
-    for (var i = 0; i < 150; i++) {
-        // Variable lanes
-        var r = SIMD.Float32x4.swizzle(f4, i % 4, (i + 1) % 4, (i + 2) % 4, (i + 3) % 4);
-        assertEqX4(r, compF[i % 4]);
-
-        // Constant lanes
-        assertEqX4(SIMD.Float32x4.swizzle(f4, 3, 2, 1, 0), [leet, Infinity, -0, -.5]);
-
-        // Variable lanes
-        var r = SIMD.Int32x4.swizzle(i4, i % 4, (i + 1) % 4, (i + 2) % 4, (i + 3) % 4);
-        assertEqX4(r, compI[i % 4]);
-
-        // Constant lanes
-        assertEqX4(SIMD.Int32x4.swizzle(i4, 3, 2, 1, 0), [4, 3, 2, 1]);
-    }
-}
-
-function testBailouts(expectException, uglyDuckling) {
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    for (var i = 0; i < 150; i++) {
-        // Test bailouts
-        var value = i == 149 ? uglyDuckling : 0;
-        var caught = false;
-        try {
-            assertEqX4(SIMD.Int32x4.swizzle(i4, value, 3, 2, 0), [1, 4, 3, 1]);
-        } catch(e) {
-            print(e);
-            caught = true;
-            assertEq(i, 149);
-            assertEq(e instanceof TypeError || e instanceof RangeError, true);
-        }
-        if (i == 149)
-            assertEq(caught, expectException);
-    }
-}
-
-function testInt32x4SwizzleBailout() {
-    // Test out-of-bounds non-constant indices. This is expected to throw.
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Int32x4.swizzle(i4, i, 3, 2, 0), [i + 1, 4, 3, 1]);
-    }
-}
-
-f();
-testBailouts(true, -1);
-testBailouts(true, 4);
-testBailouts(true, 2.5);
-testBailouts(true, undefined);
-testBailouts(true, {});
-testBailouts(true, 'one');
-testBailouts(false, false);
-testBailouts(false, null);
-testBailouts(false, " 0.0 ");
-
-try {
-    testInt32x4SwizzleBailout();
-    throw 'not caught';
-} catch(e) {
-    assertEq(e instanceof RangeError, true);
-}
-
-(function() {
-    var zappa = 0;
-
-    function testBailouts() {
-        var i4 = SIMD.Int32x4(1, 2, 3, 4);
-        for (var i = 0; i < 300; i++) {
-            var value = i == 299 ? 2.5 : 1;
-            SIMD.Int32x4.swizzle(i4, value, 3, 2, 0);
-            zappa = i;
-        }
-    }
-
-    try { testBailouts(); } catch (e) {}
-    assertEq(zappa, 298);
-})();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/uconvert.js
+++ /dev/null
@@ -1,86 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 30);
-
-// Testing Uint32 <-> Float32 conversions.
-// These conversions deserve special attention because SSE doesn't provide
-// simple conversion instructions.
-
-// Convert an Uint32Array to a Float32Array using scalar conversions.
-function cvt_utof_scalar(u32s, f32s) {
-    assertEq(u32s.length, f32s.length);
-    for (var i = 0; i < u32s.length; i++) {
-        f32s[i] = u32s[i];
-    }
-}
-
-// Convert an Uint32Array to a Float32Array using simd conversions.
-function cvt_utof_simd(u32s, f32s) {
-    assertEq(u32s.length, f32s.length);
-    for (var i = 0; i < u32s.length; i += 4) {
-        SIMD.Float32x4.store(f32s, i, SIMD.Float32x4.fromUint32x4(SIMD.Uint32x4.load(u32s, i)));
-    }
-}
-
-// Convert a Float32Array to an Uint32Array using scalar conversions.
-function cvt_ftou_scalar(f32s, u32s) {
-    assertEq(f32s.length, u32s.length);
-    for (var i = 0; i < f32s.length; i++) {
-        u32s[i] = f32s[i];
-    }
-}
-
-// Convert a Float32Array to an Uint32Array using simd conversions.
-function cvt_ftou_simd(f32s, u32s) {
-    assertEq(f32s.length, u32s.length);
-    for (var i = 0; i < f32s.length; i += 4) {
-        SIMD.Uint32x4.store(u32s, i, SIMD.Uint32x4.fromFloat32x4(SIMD.Float32x4.load(f32s, i)));
-    }
-}
-
-function check(a, b) {
-    assertEq(a.length, b.length);
-    for (var i = 0; i < a.length; i++) {
-        assertEq(a[i], b[i]);
-    }
-}
-
-// Uint32x4 --> Float32x4 tests.
-var src = new Uint32Array(8000);
-var dst1 = new Float32Array(8000);
-var dst2 = new Float32Array(8000);
-
-for (var i = 0; i < 2000; i++) {
-    src[i] = i;
-    src[i + 2000] = 0x7fffffff - i;
-    src[i + 4000] = 0x80000000 + i;
-    src[i + 6000] = 0xffffffff - i;
-}
-
-for (var n = 0; n < 10; n++) {
-    cvt_utof_scalar(src, dst1);
-    cvt_utof_simd(src, dst2);
-    check(dst1, dst2);
-}
-
-// Float32x4 --> Uint32x4 tests.
-var fsrc = dst1;
-var fdst1 = new Uint32Array(8000);
-var fdst2 = new Uint32Array(8000);
-
-// The 0xffffffff entries in fsrc round to 0x1.0p32f which throws.
-// Go as high as 0x0.ffffffp32f.
-for (var i = 0; i < 2000; i++) {
-    fsrc[i + 6000] = 0xffffff7f - i;
-}
-
-// Truncation towards 0.
-fsrc[1990] = -0.9
-fsrc[1991] = 0.9
-fsrc[1992] = 1.9
-
-for (var n = 0; n < 10; n++) {
-    cvt_ftou_scalar(fsrc, fdst1);
-    cvt_ftou_simd(fsrc, fdst2);
-    check(fdst1, fdst2);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/unary.js
+++ /dev/null
@@ -1,35 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("ion.warmup.trigger", 50);
-
-var notf = (function() {
-    var i32 = new Int32Array(1);
-    var f32 = new Float32Array(i32.buffer);
-    return function(x) {
-        f32[0] = x;
-        i32[0] = ~i32[0];
-        return f32[0];
-    }
-})();
-
-function f() {
-    var f4 = SIMD.Float32x4(1, 2, 3, 4);
-    var i4 = SIMD.Int32x4(1, 2, 3, 4);
-    var b4 = SIMD.Bool32x4(true, false, true, false);
-    var BitOrZero = (x) => x | 0;
-    for (var i = 0; i < 150; i++) {
-        assertEqX4(SIMD.Float32x4.neg(f4), unaryX4((x) => -x, f4, Math.fround));
-        assertEqX4(SIMD.Float32x4.abs(f4), unaryX4(Math.abs, f4, Math.fround));
-        assertEqX4(SIMD.Float32x4.sqrt(f4), unaryX4(Math.sqrt, f4, Math.fround));
-
-        assertEqX4(SIMD.Float32x4.reciprocalApproximation(f4), unaryX4((x) => 1 / x, f4, Math.fround), assertNear);
-        assertEqX4(SIMD.Float32x4.reciprocalSqrtApproximation(f4), unaryX4((x) => 1 / Math.sqrt(x), f4, Math.fround), assertNear);
-
-        assertEqX4(SIMD.Int32x4.not(i4), unaryX4((x) => ~x, i4, BitOrZero));
-        assertEqX4(SIMD.Int32x4.neg(i4), unaryX4((x) => -x, i4, BitOrZero));
-
-        assertEqX4(SIMD.Bool32x4.not(b4), unaryX4((x) => !x, b4, (x) => x ));
-    }
-}
-
-f();
deleted file mode 100644
--- a/js/src/jit-test/tests/SIMD/unbox.js
+++ /dev/null
@@ -1,144 +0,0 @@
-load(libdir + 'simd.js');
-
-setJitCompilerOption("baseline.warmup.trigger", 10);
-setJitCompilerOption("ion.warmup.trigger", 30);
-
-var max = 40, pivot = 35;
-
-var i32x4 = SIMD.Int32x4;
-var f32x4 = SIMD.Float32x4;
-var i32x4Add = SIMD.Int32x4.add;
-
-var FakeSIMDType = function (o) { this.x = o.x; this.y = o.y; this.z = o.z; this.w = o.w; };
-if (this.hasOwnProperty("TypedObject")) {
-  var TO = TypedObject;
-  FakeSIMDType = new TO.StructType({ x: TO.int32, y: TO.int32, z: TO.int32, w: TO.int32 });
-}
-
-function simdunbox_bail_undef(i, lhs, rhs) {
-  return i32x4Add(lhs, rhs);
-}
-
-function simdunbox_bail_object(i, lhs, rhs) {
-  return i32x4Add(lhs, rhs);
-}
-
-function simdunbox_bail_typeobj(i, lhs, rhs) {
-  return i32x4Add(lhs, rhs);
-}
-
-function simdunbox_bail_badsimd(i, lhs, rhs) {
-  return i32x4Add(lhs, rhs);
-}
-
-var arr_undef = [ i32x4(0, 1, 1, 2), i32x4(1, 1, 2, 3) ];
-var fail_undef = 0;
-var arr_object = [ i32x4(0, 1, 1, 2), i32x4(1, 1, 2, 3) ];
-var fail_object = 0;
-var arr_typeobj = [ i32x4(0, 1, 1, 2), i32x4(1, 1, 2, 3) ];
-var fail_typeobj = 0;
-var arr_badsimd = [ i32x4(0, 1, 1, 2), i32x4(1, 1, 2, 3) ];
-var fail_badsimd = 0;
-for (var i = 0; i < max; i++) {
-  try {
-    arr_undef[i + 2] = simdunbox_bail_undef(i, arr_undef[i], arr_undef[i + 1]);
-  } catch (x) {
-    arr_undef[i + 2] = arr_undef[i - 1];
-    fail_undef++;
-  }
-
-  try {
-    arr_object[i + 2] = simdunbox_bail_object(i, arr_object[i], arr_object[i + 1]);
-  } catch (x) {
-    arr_object[i + 2] = arr_object[i - 1];
-    fail_object++;
-  }
-
-  try {
-    arr_typeobj[i + 2] = simdunbox_bail_typeobj(i, arr_typeobj[i], arr_typeobj[i + 1]);
-  } catch (x) {
-    arr_typeobj[i + 2] = arr_typeobj[i - 1];
-    fail_typeobj++;
-  }
-
-  try {
-    arr_badsimd[i + 2] = simdunbox_bail_badsimd(i, arr_badsimd[i], arr_badsimd[i + 1]);
-  } catch (x) {
-    arr_badsimd[i + 2] = arr_badsimd[i - 1];
-    fail_badsimd++;
-  }
-
-  if (i + 2 == pivot) {
-    arr_undef[pivot] = undefined;
-    arr_object[pivot] = { x: 0, y: 1, z: 2, w: 3 };
-    arr_typeobj[pivot] = new FakeSIMDType({ x: 0, y: 1, z: 2, w: 3 });
-    arr_badsimd[pivot] = f32x4(0, 1, 2, 3);
-  }
-}
-
-assertEq(fail_undef, 2);
-assertEq(fail_object, 2);
-assertEq(fail_typeobj, 2);
-assertEq(fail_badsimd, 2);
-
-// Assert that all SIMD values are correct.
-function assertEqX4(real, expected, assertFunc) {
-    if (typeof assertFunc === 'undefined')
-        assertFunc = assertEq;
-
-    assertFunc(real.x, expected[0]);
-    assertFunc(real.y, expected[1]);
-    assertFunc(real.z, expected[2]);
-    assertFunc(real.w, expected[3]);
-}
-
-var fib = [0, 1];
-for (i = 0; i < max + 5; i++)
-  fib[i+2] = (fib[i] + fib[i+1]) | 0;
-
-for (i = 0; i < max; i++) {
-  if (i == pivot)
-    continue;
-  var ref = fib.slice(i < pivot ? i : i - 3);
-  assertEqX4(arr_undef[i], ref);
-  assertEqX4(arr_object[i], ref);
-  assertEqX4(arr_typeobj[i], ref);
-  assertEqX4(arr_badsimd[i], ref);
-}
-
-// Check that unbox operations aren't removed
-(function() {
-
-    function add(i, v, w) {
-        if (i % 2 == 0) {
-            SIMD.Int32x4.add(v, w);
-        } else {
-            SIMD.Float32x4.add(v, w);
-        }
-    }
-
-    var i = 0;
-    var caught = false;
-    var f4 = SIMD.Float32x4(1,2,3,4);
-    var i4 = SIMD.Int32x4(1,2,3,4);
-    try {
-        for (; i < 200; i++) {
-            if (i % 2 == 0) {
-                add(i, i4, i4);
-            } else if (i == 199) {
-                add(i, i4, f4);
-            } else {
-                add(i, f4, f4);
-            }
-        }
-    } catch(e) {
-        print(e);
-        assertEq(e instanceof TypeError, true);
-        assertEq(i, 199);
-        caught = true;
-    }
-
-    assertEq(i < 199 || caught, true);
-
-})();
-
--- a/js/src/jit-test/tests/asm.js/bug1126251.js
+++ b/js/src/jit-test/tests/asm.js/bug1126251.js
@@ -8,46 +8,8 @@ var v = asmLink(asmCompile('global', `
         var x = frd(.1e+71);
         x = frd(x / x);
         return +x;
     }
     return e;
 `), this)();
 
 assertEq(v, NaN);
-
-if (!isSimdAvailable() || typeof SIMD === 'undefined') {
-    quit(0);
-}
-
-var v = asmLink(asmCompile('global', `
-    "use asm";
-    var frd = global.Math.fround;
-    var Float32x4 = global.SIMD.Float32x4;
-    var splat = Float32x4.splat;
-    var ext = Float32x4.extractLane;
-    function e() {
-        var v = Float32x4(0,0,0,0);
-        var x = frd(0.);
-        v = splat(.1e+71);
-        x = ext(v,0);
-        x = frd(x / x);
-        return +x;
-    }
-    return e;
-`), this)();
-
-assertEq(v, NaN);
-
-// Bug 1130618: without GVN
-setJitCompilerOption("ion.gvn.enable", 0);
-var v = asmLink(asmCompile('global', `
-    "use asm";
-    var Float32x4 = global.SIMD.Float32x4;
-    var splat = Float32x4.splat;
-    var ext = Float32x4.extractLane;
-    function e() {
-        return +ext(splat(.1e+71),0);
-    }
-    return e;
-`), this)();
-
-assertEq(v, Infinity);
deleted file mode 100644
--- a/js/src/jit-test/tests/asm.js/bug1201124-simd-proxy.js
+++ /dev/null
@@ -1,28 +0,0 @@
-load(libdir + "asm.js");
-load(libdir + "asserts.js");
-
-if (typeof newGlobal !== 'function' ||
-    !isSimdAvailable() ||
-    typeof SIMD === 'undefined')
-{
-    quit();
-}
-
-var stdlib = new (newGlobal().Proxy)(this, new Proxy({
-    simdGet: 0,
-    getOwnPropertyDescriptor(t, pk) {
-        if (pk === "SIMD" && this.simdGet++ === 1) {
-            return {};
-        }
-        return Reflect.getOwnPropertyDescriptor(t, pk);
-    }
-}, {
-    get(t, pk, r) {
-        print("trap", pk);
-        return Reflect.get(t, pk, r);
-    }
-}));
-
-var m = asmCompile('stdlib', '"use asm"; var i4=stdlib.SIMD.Int32x4; var i4add=i4.add; return {}');
-
-assertAsmLinkFail(m, stdlib);
deleted file mode 100644
--- a/js/src/jit-test/tests/asm.js/simd-fbirds.js
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level : 2 ; js-curly-indent-offset: 0 -*- */
-/* vim: set ts=4 et sw=4 tw=80: */
-
-// Author: Peter Jensen
-
-load(libdir + "asm.js");
-if (!isSimdAvailable() || typeof SIMD === 'undefined') {
-    print("won't run tests as simd extensions aren't activated yet");
-    quit(0);
-}
-
-const NUM_BIRDS = 30;
-const NUM_UPDATES = 20;
-const ACCEL_DATA_STEPS = 30;
-
-var buffer = new ArrayBuffer(0x200000);
-var bufferF32 = new Float32Array(buffer);
-
-var actualBirds = 0;
-
-function init() {
-    actualBirds = 0;
-    // Make it a power of two, for quick modulo wrapping.
-    var accelDataValues = [10.0, 9.5, 9.0, 8.0, 7.0, 6.0, 5.5, 5.0, 5.0, 5.0, 5.5, 6.0, 7.0, 8.0, 9.0, 10.0];
-    accelDataValues = accelDataValues.map(function(v) { return 50*v; });
-    var accelDataValuesLength = accelDataValues.length;
-    assertEq(accelDataValuesLength, 16); // Hard coded in the asm.js module
-    for (i = 0; i < accelDataValuesLength; i++)
-        bufferF32[i + NUM_BIRDS * 2] = accelDataValues[i];
-}
-
-function addBird(pos, vel) {
-    bufferF32[actualBirds] = pos;
-    bufferF32[actualBirds + NUM_BIRDS] = vel;
-    actualBirds++;
-    return actualBirds - 1;
-}
-
-function getActualBirds() {
-    return actualBirds;
-}
-
-var code = `
-    "use asm";
-    var toF = global.Math.fround;
-    var u8 = new global.Uint8Array(buffer);
-    var f32 = new global.Float32Array(buffer);
-    const maxBirds = 100000;
-    const maxBirdsx4 = 400000;
-    const maxBirdsx8 = 800000;
-    const accelMask = 0x3c;
-    const mk4 = 0x000ffff0;
-
-    const getMaxPos = 1000.0;
-    const getAccelDataSteps = imp.accelDataSteps | 0;
-    var getActualBirds = imp.getActualBirds;
-
-    var i4 = global.SIMD.Int32x4;
-    var f4 = global.SIMD.Float32x4;
-    var b4 = global.SIMD.Bool32x4;
-    var i4add = i4.add;
-    var i4and = i4.and;
-    var f4select = f4.select;
-    var f4add = f4.add;
-    var f4sub = f4.sub;
-    var f4mul = f4.mul;
-    var f4greaterThan = f4.greaterThan;
-    var f4splat = f4.splat;
-    var f4load = f4.load;
-    var f4store = f4.store;
-    var b4any = b4.anyTrue;
-
-    const zerox4 = f4(0.0,0.0,0.0,0.0);
-
-    function declareHeapSize() {
-        f32[0x0007ffff] = toF(0.0);
-    }
-
-    function update(timeDelta) {
-        timeDelta = toF(timeDelta);
-        //      var steps               = Math.ceil(timeDelta/accelData.interval);
-        var steps = 0;
-        var subTimeDelta = toF(0.0);
-        var actualBirds = 0;
-        var maxPos = toF(0.0);
-        var maxPosx4 = f4(0.0,0.0,0.0,0.0);
-        var subTimeDeltax4  = f4(0.0,0.0,0.0,0.0);
-        var subTimeDeltaSquaredx4 = f4(0.0,0.0,0.0,0.0);
-        var point5x4 = f4(0.5, 0.5, 0.5, 0.5);
-        var i = 0;
-        var len = 0;
-        var accelIndex = 0;
-        var newPosx4 = f4(0.0,0.0,0.0,0.0);
-        var newVelx4 = f4(0.0,0.0,0.0,0.0);
-        var accel = toF(0.0);
-        var accelx4 = f4(0.0,0.0,0.0,0.0);
-        var a = 0;
-        var posDeltax4 = f4(0.0,0.0,0.0,0.0);
-        var cmpx4 = b4(0,0,0,0);
-        var newVelTruex4 = f4(0.0,0.0,0.0,0.0);
-
-        steps = getAccelDataSteps | 0;
-        subTimeDelta = toF(toF(timeDelta / toF(steps | 0)) / toF(1000.0));
-        actualBirds = getActualBirds() | 0;
-        maxPos = toF(+getMaxPos);
-        maxPosx4 = f4splat(maxPos);
-        subTimeDeltax4 = f4splat(subTimeDelta);
-        subTimeDeltaSquaredx4 = f4mul(subTimeDeltax4, subTimeDeltax4);
-
-        len = ((actualBirds + 3) >> 2) << 4;
-
-        for (i = 0; (i | 0) < (len | 0); i = (i + 16) | 0) {
-            accelIndex = 0;
-            newPosx4 = f4load(u8, i & mk4);
-            newVelx4 = f4load(u8, (i & mk4) + maxBirdsx4);
-            for (a = 0; (a | 0) < (steps | 0); a = (a + 1) | 0) {
-                accel = toF(f32[(accelIndex & accelMask) + maxBirdsx8 >> 2]);
-                accelx4 = f4splat(accel);
-                accelIndex = (accelIndex + 4) | 0;
-                posDeltax4 = f4mul(point5x4, f4mul(accelx4, subTimeDeltaSquaredx4));
-                posDeltax4 = f4add(posDeltax4, f4mul(newVelx4, subTimeDeltax4));
-                newPosx4 = f4add(newPosx4, posDeltax4);
-                newVelx4 = f4add(newVelx4, f4mul(accelx4, subTimeDeltax4));
-                cmpx4 = f4greaterThan(newPosx4, maxPosx4);
-
-                if (b4any(cmpx4)) {
-                    // Work around unimplemented 'neg' operation, using 0 - x.
-                    newVelTruex4 = f4sub(zerox4, newVelx4);
-                    newVelx4 = f4select(cmpx4, newVelTruex4, newVelx4);
-                }
-            }
-            f4store(u8, i & mk4, newPosx4);
-            f4store(u8, (i & mk4) + maxBirdsx4, newVelx4);
-        }
-    }
-
-    return update;
-`
-
-var ffi = {
-    getActualBirds,
-    accelDataSteps: ACCEL_DATA_STEPS
-};
-
-var fbirds = asmLink(asmCompile('global', 'imp', 'buffer', code), this, ffi, buffer);
-
-init();
-for (var i = 0; i < NUM_BIRDS; i++) {
-    addBird(i / 10, Math.exp(2, NUM_BIRDS - i));
-}
-
-var b = dateNow();
-for (var j = 0; j < NUM_UPDATES; j++) {
-    fbirds(16);
-}
-print(dateNow() - b);
-
-assertEq(bufferF32[0], 0);
-assertEq(bufferF32[1], 0.10000000149011612);
-assertEq(bufferF32[2], 0.20000000298023224);
-assertEq(bufferF32[3], 0.30000001192092896);
-assertEq(bufferF32[4], 0.4000000059604645);
-assertEq(bufferF32[5], 0.5);
-assertEq(bufferF32[6], 0.6000000238418579);
-assertEq(bufferF32[7], 0.699999988079071);
-assertEq(bufferF32[8], 0.800000011920929);
-assertEq(bufferF32[9], 0.8999999761581421);
-assertEq(bufferF32[10], 1);
-assertEq(bufferF32[11], 1.100000023841858);
-assertEq(bufferF32[12], 1.2000000476837158);
-assertEq(bufferF32[13], 1.2999999523162842);
-assertEq(bufferF32[14], 1.399999976158142);
-assertEq(bufferF32[15], 1.5);
-assertEq(bufferF32[16], 1.600000023841858);
-assertEq(bufferF32[17], 1.7000000476837158);
-assertEq(bufferF32[18], 1.7999999523162842);
-assertEq(bufferF32[19], 1.899999976158142);
-assertEq(bufferF32[20], 2);
-assertEq(bufferF32[21], 2.0999999046325684);
-assertEq(bufferF32[22], 2.200000047683716);
-assertEq(bufferF32[23], 2.299999952316284);
-assertEq(bufferF32[24], 2.4000000953674316);
-assertEq(bufferF32[25], 2.5);
-assertEq(bufferF32[26], 2.5999999046325684);
-assertEq(bufferF32[27], 2.700000047683716);
-assertEq(bufferF32[28], 2.799999952316284);
-assertEq(bufferF32[29], 2.9000000953674316);
-
-
-// Code used to generate the assertEq list above.
-function generateAssertList() {
-    var buf = '';
-    for (var k = 0; k < NUM_BIRDS; k++) {
-        buf += 'assertEq(bufferF32['+ k + '], ' + bufferF32[k] + ');\n';
-    }
-    print(buf);
-}
-//generateAssertList();
deleted file mode 100644
--- a/js/src/jit-test/tests/asm.js/simd-mandelbrot.js
+++ /dev/null
@@ -1,1819 +0,0 @@
-/* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level : 2 ; js-curly-indent-offset: 0 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-
-// Mandelbrot using SIMD
-// Author: Peter Jensen, Intel Corporation
-
-load(libdir + "asm.js");
-if (!isSimdAvailable() || typeof SIMD === 'undefined') {
-    print("won't run tests as simd extensions aren't activated yet");
-    quit(0);
-}
-
-// global variables
-const MAX_ITERATIONS = 10;
-const DRAW_ITERATIONS = 10;
-
-const CANVAS_WIDTH = 20;
-const CANVAS_HEIGHT = 20;
-
-const LIMIT_SHOW = 20 * 20 * 4;
-
-// Asm.js module buffer.
-var buffer = new ArrayBuffer(16 * 1024 * 1024);
-var view = new Uint8Array(buffer);
-
-var moduleCode = `
-  "use asm"
-  var b8 = new global.Uint8Array(buffer);
-  var toF = global.Math.fround;
-  var i4 = global.SIMD.Int32x4;
-  var ci4 = i4.check;
-  var f4 = global.SIMD.Float32x4;
-  var i4add = i4.add;
-  var i4and = i4.and;
-  var i4ext = i4.extractLane;
-  var i4sel = i4.select;
-  var f4add = f4.add;
-  var f4sub = f4.sub;
-  var f4mul = f4.mul;
-  var f4lessThanOrEqual = f4.lessThanOrEqual;
-  var f4splat = f4.splat;
-  var imul = global.Math.imul;
-  var b4 = global.SIMD.Bool32x4;
-  var b4any = b4.anyTrue;
-  const zero4 = i4(0,0,0,0), one4 = i4(1,1,1,1), two4 = f4(2,2,2,2), four4 = f4(4,4,4,4);
-
-  const mk0 = 0x007fffff;
-
-  function declareHeapLength() {
-    b8[0x00ffffff] = 0;
-  }
-
-  function mapColorAndSetPixel (x, y, width, value, max_iterations) {
-    x = x | 0;
-    y = y | 0;
-    width = width | 0;
-    value = value | 0;
-    max_iterations = max_iterations | 0;
-
-    var rgb = 0, r = 0, g = 0, b = 0, index = 0;
-
-    index = (((imul((width >>> 0), (y >>> 0)) + x) | 0) * 4) | 0;
-    if ((value | 0) == (max_iterations | 0)) {
-      r = 0;
-      g = 0;
-      b = 0;
-    } else {
-      rgb = ~~toF(toF(toF(toF(value >>> 0) * toF(0xffff)) / toF(max_iterations >>> 0)) * toF(0xff));
-      r = rgb & 0xff;
-      g = (rgb >>> 8) & 0xff;
-      b = (rgb >>> 16) & 0xff;
-    }
-    b8[(index & mk0) >> 0] = r;
-    b8[(index & mk0) + 1 >> 0] = g;
-    b8[(index & mk0) + 2 >> 0] = b;
-    b8[(index & mk0) + 3 >> 0] = 255;
-  }
-
-  function mandelPixelX4 (xf, yf, yd, max_iterations) {
-    xf = toF(xf);
-    yf = toF(yf);
-    yd = toF(yd);
-    max_iterations = max_iterations | 0;
-    var c_re4  = f4(0,0,0,0), c_im4  = f4(0,0,0,0);
-    var z_re4  = f4(0,0,0,0), z_im4  = f4(0,0,0,0);
-    var count4 = i4(0,0,0,0);
-    var z_re24 = f4(0,0,0,0), z_im24 = f4(0,0,0,0);
-    var new_re4 = f4(0,0,0,0), new_im4 = f4(0,0,0,0);
-    var i = 0;
-    var mb4 = b4(0,0,0,0);
-
-    c_re4 = f4splat(xf);
-    c_im4 = f4(yf, toF(yd + yf), toF(yd + toF(yd + yf)), toF(yd + toF(yd + toF(yd + yf))));
-
-    z_re4  = c_re4;
-    z_im4  = c_im4;
-
-    for (i = 0; (i | 0) < (max_iterations | 0); i = (i + 1) | 0) {
-      z_re24 = f4mul(z_re4, z_re4);
-      z_im24 = f4mul(z_im4, z_im4);
-      mb4 = f4lessThanOrEqual(f4add(z_re24, z_im24), four4);
-      // If all 4 values are greater than 4.0, there's no reason to continue.
-      if (!b4any(mb4))
-        break;
-
-      new_re4 = f4sub(z_re24, z_im24);
-      new_im4 = f4mul(f4mul(two4, z_re4), z_im4);
-      z_re4   = f4add(c_re4, new_re4);
-      z_im4   = f4add(c_im4, new_im4);
-      count4  = i4add(count4, i4sel(mb4, one4, zero4));
-    }
-    return ci4(count4);
-  }
-
-  function mandelColumnX4 (x, width, height, xf, yf, yd, max_iterations) {
-    x = x | 0;
-    width = width | 0;
-    height = height | 0;
-    xf = toF(xf);
-    yf = toF(yf);
-    yd = toF(yd);
-    max_iterations = max_iterations | 0;
-
-    var y = 0;
-    var ydx4 = toF(0);
-    var m4 = i4(0,0,0,0);
-
-    ydx4 = toF(yd * toF(4));
-    for (y = 0; (y | 0) < (height | 0); y = (y + 4) | 0) {
-      m4   = ci4(mandelPixelX4(toF(xf), toF(yf), toF(yd), max_iterations));
-      mapColorAndSetPixel(x | 0, y | 0,   width, i4ext(m4,0), max_iterations);
-      mapColorAndSetPixel(x | 0, (y + 1) | 0, width, i4ext(m4,1), max_iterations);
-      mapColorAndSetPixel(x | 0, (y + 2) | 0, width, i4ext(m4,2), max_iterations);
-      mapColorAndSetPixel(x | 0, (y + 3) | 0, width, i4ext(m4,3), max_iterations);
-      yf = toF(yf + ydx4);
-    }
-  }
-
-  function mandel (width, height, xc, yc, scale, max_iterations) {
-    width = width | 0;
-    height = height | 0;
-    xc = toF(xc);
-    yc = toF(yc);
-    scale = toF(scale);
-    max_iterations = max_iterations | 0;
-
-    var x0 = toF(0), y0 = toF(0);
-    var xd = toF(0), yd = toF(0);
-    var xf = toF(0);
-    var x = 0;
-
-    x0 = toF(xc - toF(scale * toF(1.5)));
-    y0 = toF(yc - scale);
-    xd = toF(toF(scale * toF(3)) / toF(width >>> 0));
-    yd = toF(toF(scale * toF(2)) / toF(height >>> 0));
-    xf = x0;
-
-    for (x = 0; (x | 0) < (width | 0); x = (x + 1) | 0) {
-      mandelColumnX4(x, width, height, xf, y0, yd, max_iterations);
-      xf = toF(xf + xd);
-    }
-  }
-
-  return mandel;
-`;
-
-var FFI = {};
-var mandelbro = asmLink(asmCompile('global', 'ffi', 'buffer', moduleCode), this, FFI, buffer);
-
-function animateMandelbrot () {
-  var scale_start = 1.0;
-  var scale_end   = 0.0005;
-  var xc_start    = -0.5;
-  var yc_start    = 0.0;
-  var xc_end      = 0.0;
-  var yc_end      = 0.75;
-  var steps       = 200.0;
-  var scale_step  = (scale_end - scale_start)/steps;
-  var xc_step     = (xc_end - xc_start)/steps;
-  var yc_step     = (yc_end - yc_start)/steps;
-  var scale       = scale_start;
-  var xc          = xc_start;
-  var yc          = yc_start;
-  var i           = 0;
-  var now         = dateNow();
-
-  function draw1 () {
-    mandelbro(CANVAS_WIDTH, CANVAS_HEIGHT, xc, yc, scale, MAX_ITERATIONS);
-    if (scale < scale_end || scale > scale_start) {
-      scale_step = -scale_step;
-      xc_step = -xc_step;
-      yc_step = -yc_step;
-    }
-    scale += scale_step;
-    xc += xc_step;
-    yc += yc_step;
-    i++;
-  }
-
-  var b = dateNow();
-  for (var j = DRAW_ITERATIONS; j --> 0;)
-    draw1();
-  print(dateNow() - b);
-}
-
-animateMandelbrot();
-
-assertEq(view[0], 0, "0th value should be 0");
-assertEq(view[1], 0, "1th value should be 0");
-assertEq(view[2], 0, "2th value should be 0");
-assertEq(view[3], 255, "3th value should be 255");
-assertEq(view[4], 230, "4th value should be 230");
-assertEq(view[5], 127, "5th value should be 127");
-assertEq(view[6], 25, "6th value should be 25");
-assertEq(view[7], 255, "7th value should be 255");
-assertEq(view[8], 230, "8th value should be 230");
-assertEq(view[9], 127, "9th value should be 127");
-assertEq(view[10], 25, "10th value should be 25");
-assertEq(view[11], 255, "11th value should be 255");
-assertEq(view[12], 205, "12th value should be 205");
-assertEq(view[13], 255, "13th value should be 255");
-assertEq(view[14], 50, "14th value should be 50");
-assertEq(view[15], 255, "15th value should be 255");
-assertEq(view[16], 205, "16th value should be 205");
-assertEq(view[17], 255, "17th value should be 255");
-assertEq(view[18], 50, "18th value should be 50");
-assertEq(view[19], 255, "19th value should be 255");
-assertEq(view[20], 205, "20th value should be 205");
-assertEq(view[21], 255, "21th value should be 255");
-assertEq(view[22], 50, "22th value should be 50");
-assertEq(view[23], 255, "23th value should be 255");
-assertEq(view[24], 205, "24th value should be 205");
-assertEq(view[25], 255, "25th value should be 255");
-assertEq(view[26], 50, "26th value should be 50");
-assertEq(view[27], 255, "27th value should be 255");
-assertEq(view[28], 205, "28th value should be 205");
-assertEq(view[29], 255, "29th value should be 255");
-assertEq(view[30], 50, "30th value should be 50");
-assertEq(view[31], 255, "31th value should be 255");
-assertEq(view[32], 179, "32th value should be 179");
-assertEq(view[33], 127, "33th value should be 127");
-assertEq(view[34], 76, "34th value should be 76");
-assertEq(view[35], 255, "35th value should be 255");
-assertEq(view[36], 179, "36th value should be 179");
-assertEq(view[37], 127, "37th value should be 127");
-assertEq(view[38], 76, "38th value should be 76");
-assertEq(view[39], 255, "39th value should be 255");
-assertEq(view[40], 179, "40th value should be 179");
-assertEq(view[41], 127, "41th value should be 127");
-assertEq(view[42], 76, "42th value should be 76");
-assertEq(view[43], 255, "43th value should be 255");
-assertEq(view[44], 154, "44th value should be 154");
-assertEq(view[45], 255, "45th value should be 255");
-assertEq(view[46], 101, "46th value should be 101");
-assertEq(view[47], 255, "47th value should be 255");
-assertEq(view[48], 78, "48th value should be 78");
-assertEq(view[49], 127, "49th value should be 127");
-assertEq(view[50], 178, "50th value should be 178");
-assertEq(view[51], 255, "51th value should be 255");
-assertEq(view[52], 52, "52th value should be 52");
-assertEq(view[53], 255, "53th value should be 255");
-assertEq(view[54], 203, "54th value should be 203");
-assertEq(view[55], 255, "55th value should be 255");
-assertEq(view[56], 154, "56th value should be 154");
-assertEq(view[57], 255, "57th value should be 255");
-assertEq(view[58], 101, "58th value should be 101");
-assertEq(view[59], 255, "59th value should be 255");
-assertEq(view[60], 179, "60th value should be 179");
-assertEq(view[61], 127, "61th value should be 127");
-assertEq(view[62], 76, "62th value should be 76");
-assertEq(view[63], 255, "63th value should be 255");
-assertEq(view[64], 205, "64th value should be 205");
-assertEq(view[65], 255, "65th value should be 255");
-assertEq(view[66], 50, "66th value should be 50");
-assertEq(view[67], 255, "67th value should be 255");
-assertEq(view[68], 205, "68th value should be 205");
-assertEq(view[69], 255, "69th value should be 255");
-assertEq(view[70], 50, "70th value should be 50");
-assertEq(view[71], 255, "71th value should be 255");
-assertEq(view[72], 230, "72th value should be 230");
-assertEq(view[73], 127, "73th value should be 127");
-assertEq(view[74], 25, "74th value should be 25");
-assertEq(view[75], 255, "75th value should be 255");
-assertEq(view[76], 230, "76th value should be 230");
-assertEq(view[77], 127, "77th value should be 127");
-assertEq(view[78], 25, "78th value should be 25");
-assertEq(view[79], 255, "79th value should be 255");
-assertEq(view[80], 0, "80th value should be 0");
-assertEq(view[81], 0, "81th value should be 0");
-assertEq(view[82], 0, "82th value should be 0");
-assertEq(view[83], 255, "83th value should be 255");
-assertEq(view[84], 230, "84th value should be 230");
-assertEq(view[85], 127, "85th value should be 127");
-assertEq(view[86], 25, "86th value should be 25");
-assertEq(view[87], 255, "87th value should be 255");
-assertEq(view[88], 205, "88th value should be 205");
-assertEq(view[89], 255, "89th value should be 255");
-assertEq(view[90], 50, "90th value should be 50");
-assertEq(view[91], 255, "91th value should be 255");
-assertEq(view[92], 205, "92th value should be 205");
-assertEq(view[93], 255, "93th value should be 255");
-assertEq(view[94], 50, "94th value should be 50");
-assertEq(view[95], 255, "95th value should be 255");
-assertEq(view[96], 205, "96th value should be 205");
-assertEq(view[97], 255, "97th value should be 255");
-assertEq(view[98], 50, "98th value should be 50");
-assertEq(view[99], 255, "99th value should be 255");
-assertEq(view[100], 205, "100th value should be 205");
-assertEq(view[101], 255, "101th value should be 255");
-assertEq(view[102], 50, "102th value should be 50");
-assertEq(view[103], 255, "103th value should be 255");
-assertEq(view[104], 205, "104th value should be 205");
-assertEq(view[105], 255, "105th value should be 255");
-assertEq(view[106], 50, "106th value should be 50");
-assertEq(view[107], 255, "107th value should be 255");
-assertEq(view[108], 205, "108th value should be 205");
-assertEq(view[109], 255, "109th value should be 255");
-assertEq(view[110], 50, "110th value should be 50");
-assertEq(view[111], 255, "111th value should be 255");
-assertEq(view[112], 179, "112th value should be 179");
-assertEq(view[113], 127, "113th value should be 127");
-assertEq(view[114], 76, "114th value should be 76");
-assertEq(view[115], 255, "115th value should be 255");
-assertEq(view[116], 179, "116th value should be 179");
-assertEq(view[117], 127, "117th value should be 127");
-assertEq(view[118], 76, "118th value should be 76");
-assertEq(view[119], 255, "119th value should be 255");
-assertEq(view[120], 154, "120th value should be 154");
-assertEq(view[121], 255, "121th value should be 255");
-assertEq(view[122], 101, "122th value should be 101");
-assertEq(view[123], 255, "123th value should be 255");
-assertEq(view[124], 103, "124th value should be 103");
-assertEq(view[125], 255, "125th value should be 255");
-assertEq(view[126], 152, "126th value should be 152");
-assertEq(view[127], 255, "127th value should be 255");
-assertEq(view[128], 0, "128th value should be 0");
-assertEq(view[129], 0, "129th value should be 0");
-assertEq(view[130], 0, "130th value should be 0");
-assertEq(view[131], 255, "131th value should be 255");
-assertEq(view[132], 0, "132th value should be 0");
-assertEq(view[133], 0, "133th value should be 0");
-assertEq(view[134], 0, "134th value should be 0");
-assertEq(view[135], 255, "135th value should be 255");
-assertEq(view[136], 128, "136th value should be 128");
-assertEq(view[137], 127, "137th value should be 127");
-assertEq(view[138], 127, "138th value should be 127");
-assertEq(view[139], 255, "139th value should be 255");
-assertEq(view[140], 154, "140th value should be 154");
-assertEq(view[141], 255, "141th value should be 255");
-assertEq(view[142], 101, "142th value should be 101");
-assertEq(view[143], 255, "143th value should be 255");
-assertEq(view[144], 179, "144th value should be 179");
-assertEq(view[145], 127, "145th value should be 127");
-assertEq(view[146], 76, "146th value should be 76");
-assertEq(view[147], 255, "147th value should be 255");
-assertEq(view[148], 205, "148th value should be 205");
-assertEq(view[149], 255, "149th value should be 255");
-assertEq(view[150], 50, "150th value should be 50");
-assertEq(view[151], 255, "151th value should be 255");
-assertEq(view[152], 205, "152th value should be 205");
-assertEq(view[153], 255, "153th value should be 255");
-assertEq(view[154], 50, "154th value should be 50");
-assertEq(view[155], 255, "155th value should be 255");
-assertEq(view[156], 230, "156th value should be 230");
-assertEq(view[157], 127, "157th value should be 127");
-assertEq(view[158], 25, "158th value should be 25");
-assertEq(view[159], 255, "159th value should be 255");
-assertEq(view[160], 0, "160th value should be 0");
-assertEq(view[161], 0, "161th value should be 0");
-assertEq(view[162], 0, "162th value should be 0");
-assertEq(view[163], 255, "163th value should be 255");
-assertEq(view[164], 230, "164th value should be 230");
-assertEq(view[165], 127, "165th value should be 127");
-assertEq(view[166], 25, "166th value should be 25");
-assertEq(view[167], 255, "167th value should be 255");
-assertEq(view[168], 205, "168th value should be 205");
-assertEq(view[169], 255, "169th value should be 255");
-assertEq(view[170], 50, "170th value should be 50");
-assertEq(view[171], 255, "171th value should be 255");
-assertEq(view[172], 205, "172th value should be 205");
-assertEq(view[173], 255, "173th value should be 255");
-assertEq(view[174], 50, "174th value should be 50");
-assertEq(view[175], 255, "175th value should be 255");
-assertEq(view[176], 205, "176th value should be 205");
-assertEq(view[177], 255, "177th value should be 255");
-assertEq(view[178], 50, "178th value should be 50");
-assertEq(view[179], 255, "179th value should be 255");
-assertEq(view[180], 205, "180th value should be 205");
-assertEq(view[181], 255, "181th value should be 255");
-assertEq(view[182], 50, "182th value should be 50");
-assertEq(view[183], 255, "183th value should be 255");
-assertEq(view[184], 205, "184th value should be 205");
-assertEq(view[185], 255, "185th value should be 255");
-assertEq(view[186], 50, "186th value should be 50");
-assertEq(view[187], 255, "187th value should be 255");
-assertEq(view[188], 179, "188th value should be 179");
-assertEq(view[189], 127, "189th value should be 127");
-assertEq(view[190], 76, "190th value should be 76");
-assertEq(view[191], 255, "191th value should be 255");
-assertEq(view[192], 179, "192th value should be 179");
-assertEq(view[193], 127, "193th value should be 127");
-assertEq(view[194], 76, "194th value should be 76");
-assertEq(view[195], 255, "195th value should be 255");
-assertEq(view[196], 154, "196th value should be 154");
-assertEq(view[197], 255, "197th value should be 255");
-assertEq(view[198], 101, "198th value should be 101");
-assertEq(view[199], 255, "199th value should be 255");
-assertEq(view[200], 103, "200th value should be 103");
-assertEq(view[201], 255, "201th value should be 255");
-assertEq(view[202], 152, "202th value should be 152");
-assertEq(view[203], 255, "203th value should be 255");
-assertEq(view[204], 78, "204th value should be 78");
-assertEq(view[205], 127, "205th value should be 127");
-assertEq(view[206], 178, "206th value should be 178");
-assertEq(view[207], 255, "207th value should be 255");
-assertEq(view[208], 0, "208th value should be 0");
-assertEq(view[209], 0, "209th value should be 0");
-assertEq(view[210], 0, "210th value should be 0");
-assertEq(view[211], 255, "211th value should be 255");
-assertEq(view[212], 0, "212th value should be 0");
-assertEq(view[213], 0, "213th value should be 0");
-assertEq(view[214], 0, "214th value should be 0");
-assertEq(view[215], 255, "215th value should be 255");
-assertEq(view[216], 78, "216th value should be 78");
-assertEq(view[217], 127, "217th value should be 127");
-assertEq(view[218], 178, "218th value should be 178");
-assertEq(view[219], 255, "219th value should be 255");
-assertEq(view[220], 128, "220th value should be 128");
-assertEq(view[221], 127, "221th value should be 127");
-assertEq(view[222], 127, "222th value should be 127");
-assertEq(view[223], 255, "223th value should be 255");
-assertEq(view[224], 154, "224th value should be 154");
-assertEq(view[225], 255, "225th value should be 255");
-assertEq(view[226], 101, "226th value should be 101");
-assertEq(view[227], 255, "227th value should be 255");
-assertEq(view[228], 205, "228th value should be 205");
-assertEq(view[229], 255, "229th value should be 255");
-assertEq(view[230], 50, "230th value should be 50");
-assertEq(view[231], 255, "231th value should be 255");
-assertEq(view[232], 205, "232th value should be 205");
-assertEq(view[233], 255, "233th value should be 255");
-assertEq(view[234], 50, "234th value should be 50");
-assertEq(view[235], 255, "235th value should be 255");
-assertEq(view[236], 230, "236th value should be 230");
-assertEq(view[237], 127, "237th value should be 127");
-assertEq(view[238], 25, "238th value should be 25");
-assertEq(view[239], 255, "239th value should be 255");
-assertEq(view[240], 0, "240th value should be 0");
-assertEq(view[241], 0, "241th value should be 0");
-assertEq(view[242], 0, "242th value should be 0");
-assertEq(view[243], 255, "243th value should be 255");
-assertEq(view[244], 205, "244th value should be 205");
-assertEq(view[245], 255, "245th value should be 255");
-assertEq(view[246], 50, "246th value should be 50");
-assertEq(view[247], 255, "247th value should be 255");
-assertEq(view[248], 205, "248th value should be 205");
-assertEq(view[249], 255, "249th value should be 255");
-assertEq(view[250], 50, "250th value should be 50");
-assertEq(view[251], 255, "251th value should be 255");
-assertEq(view[252], 205, "252th value should be 205");
-assertEq(view[253], 255, "253th value should be 255");
-assertEq(view[254], 50, "254th value should be 50");
-assertEq(view[255], 255, "255th value should be 255");
-assertEq(view[256], 205, "256th value should be 205");
-assertEq(view[257], 255, "257th value should be 255");
-assertEq(view[258], 50, "258th value should be 50");
-assertEq(view[259], 255, "259th value should be 255");
-assertEq(view[260], 205, "260th value should be 205");
-assertEq(view[261], 255, "261th value should be 255");
-assertEq(view[262], 50, "262th value should be 50");
-assertEq(view[263], 255, "263th value should be 255");
-assertEq(view[264], 179, "264th value should be 179");
-assertEq(view[265], 127, "265th value should be 127");
-assertEq(view[266], 76, "266th value should be 76");
-assertEq(view[267], 255, "267th value should be 255");
-assertEq(view[268], 179, "268th value should be 179");
-assertEq(view[269], 127, "269th value should be 127");
-assertEq(view[270], 76, "270th value should be 76");
-assertEq(view[271], 255, "271th value should be 255");
-assertEq(view[272], 154, "272th value should be 154");
-assertEq(view[273], 255, "273th value should be 255");
-assertEq(view[274], 101, "274th value should be 101");
-assertEq(view[275], 255, "275th value should be 255");
-assertEq(view[276], 52, "276th value should be 52");
-assertEq(view[277], 255, "277th value should be 255");
-assertEq(view[278], 203, "278th value should be 203");
-assertEq(view[279], 255, "279th value should be 255");
-assertEq(view[280], 0, "280th value should be 0");
-assertEq(view[281], 0, "281th value should be 0");
-assertEq(view[282], 0, "282th value should be 0");
-assertEq(view[283], 255, "283th value should be 255");
-assertEq(view[284], 0, "284th value should be 0");
-assertEq(view[285], 0, "285th value should be 0");
-assertEq(view[286], 0, "286th value should be 0");
-assertEq(view[287], 255, "287th value should be 255");
-assertEq(view[288], 0, "288th value should be 0");
-assertEq(view[289], 0, "289th value should be 0");
-assertEq(view[290], 0, "290th value should be 0");
-assertEq(view[291], 255, "291th value should be 255");
-assertEq(view[292], 0, "292th value should be 0");
-assertEq(view[293], 0, "293th value should be 0");
-assertEq(view[294], 0, "294th value should be 0");
-assertEq(view[295], 255, "295th value should be 255");
-assertEq(view[296], 0, "296th value should be 0");
-assertEq(view[297], 0, "297th value should be 0");
-assertEq(view[298], 0, "298th value should be 0");
-assertEq(view[299], 255, "299th value should be 255");
-assertEq(view[300], 52, "300th value should be 52");
-assertEq(view[301], 255, "301th value should be 255");
-assertEq(view[302], 203, "302th value should be 203");
-assertEq(view[303], 255, "303th value should be 255");
-assertEq(view[304], 52, "304th value should be 52");
-assertEq(view[305], 255, "305th value should be 255");
-assertEq(view[306], 203, "306th value should be 203");
-assertEq(view[307], 255, "307th value should be 255");
-assertEq(view[308], 179, "308th value should be 179");
-assertEq(view[309], 127, "309th value should be 127");
-assertEq(view[310], 76, "310th value should be 76");
-assertEq(view[311], 255, "311th value should be 255");
-assertEq(view[312], 205, "312th value should be 205");
-assertEq(view[313], 255, "313th value should be 255");
-assertEq(view[314], 50, "314th value should be 50");
-assertEq(view[315], 255, "315th value should be 255");
-assertEq(view[316], 205, "316th value should be 205");
-assertEq(view[317], 255, "317th value should be 255");
-assertEq(view[318], 50, "318th value should be 50");
-assertEq(view[319], 255, "319th value should be 255");
-assertEq(view[320], 230, "320th value should be 230");
-assertEq(view[321], 127, "321th value should be 127");
-assertEq(view[322], 25, "322th value should be 25");
-assertEq(view[323], 255, "323th value should be 255");
-assertEq(view[324], 205, "324th value should be 205");
-assertEq(view[325], 255, "325th value should be 255");
-assertEq(view[326], 50, "326th value should be 50");
-assertEq(view[327], 255, "327th value should be 255");
-assertEq(view[328], 205, "328th value should be 205");
-assertEq(view[329], 255, "329th value should be 255");
-assertEq(view[330], 50, "330th value should be 50");
-assertEq(view[331], 255, "331th value should be 255");
-assertEq(view[332], 205, "332th value should be 205");
-assertEq(view[333], 255, "333th value should be 255");
-assertEq(view[334], 50, "334th value should be 50");
-assertEq(view[335], 255, "335th value should be 255");
-assertEq(view[336], 205, "336th value should be 205");
-assertEq(view[337], 255, "337th value should be 255");
-assertEq(view[338], 50, "338th value should be 50");
-assertEq(view[339], 255, "339th value should be 255");
-assertEq(view[340], 179, "340th value should be 179");
-assertEq(view[341], 127, "341th value should be 127");
-assertEq(view[342], 76, "342th value should be 76");
-assertEq(view[343], 255, "343th value should be 255");
-assertEq(view[344], 154, "344th value should be 154");
-assertEq(view[345], 255, "345th value should be 255");
-assertEq(view[346], 101, "346th value should be 101");
-assertEq(view[347], 255, "347th value should be 255");
-assertEq(view[348], 154, "348th value should be 154");
-assertEq(view[349], 255, "349th value should be 255");
-assertEq(view[350], 101, "350th value should be 101");
-assertEq(view[351], 255, "351th value should be 255");
-assertEq(view[352], 128, "352th value should be 128");
-assertEq(view[353], 127, "353th value should be 127");
-assertEq(view[354], 127, "354th value should be 127");
-assertEq(view[355], 255, "355th value should be 255");
-assertEq(view[356], 52, "356th value should be 52");
-assertEq(view[357], 255, "357th value should be 255");
-assertEq(view[358], 203, "358th value should be 203");
-assertEq(view[359], 255, "359th value should be 255");
-assertEq(view[360], 0, "360th value should be 0");
-assertEq(view[361], 0, "361th value should be 0");
-assertEq(view[362], 0, "362th value should be 0");
-assertEq(view[363], 255, "363th value should be 255");
-assertEq(view[364], 0, "364th value should be 0");
-assertEq(view[365], 0, "365th value should be 0");
-assertEq(view[366], 0, "366th value should be 0");
-assertEq(view[367], 255, "367th value should be 255");
-assertEq(view[368], 0, "368th value should be 0");
-assertEq(view[369], 0, "369th value should be 0");
-assertEq(view[370], 0, "370th value should be 0");
-assertEq(view[371], 255, "371th value should be 255");
-assertEq(view[372], 0, "372th value should be 0");
-assertEq(view[373], 0, "373th value should be 0");
-assertEq(view[374], 0, "374th value should be 0");
-assertEq(view[375], 255, "375th value should be 255");
-assertEq(view[376], 0, "376th value should be 0");
-assertEq(view[377], 0, "377th value should be 0");
-assertEq(view[378], 0, "378th value should be 0");
-assertEq(view[379], 255, "379th value should be 255");
-assertEq(view[380], 0, "380th value should be 0");
-assertEq(view[381], 0, "381th value should be 0");
-assertEq(view[382], 0, "382th value should be 0");
-assertEq(view[383], 255, "383th value should be 255");
-assertEq(view[384], 52, "384th value should be 52");
-assertEq(view[385], 255, "385th value should be 255");
-assertEq(view[386], 203, "386th value should be 203");
-assertEq(view[387], 255, "387th value should be 255");
-assertEq(view[388], 179, "388th value should be 179");
-assertEq(view[389], 127, "389th value should be 127");
-assertEq(view[390], 76, "390th value should be 76");
-assertEq(view[391], 255, "391th value should be 255");
-assertEq(view[392], 205, "392th value should be 205");
-assertEq(view[393], 255, "393th value should be 255");
-assertEq(view[394], 50, "394th value should be 50");
-assertEq(view[395], 255, "395th value should be 255");
-assertEq(view[396], 205, "396th value should be 205");
-assertEq(view[397], 255, "397th value should be 255");
-assertEq(view[398], 50, "398th value should be 50");
-assertEq(view[399], 255, "399th value should be 255");
-assertEq(view[400], 205, "400th value should be 205");
-assertEq(view[401], 255, "401th value should be 255");
-assertEq(view[402], 50, "402th value should be 50");
-assertEq(view[403], 255, "403th value should be 255");
-assertEq(view[404], 205, "404th value should be 205");
-assertEq(view[405], 255, "405th value should be 255");
-assertEq(view[406], 50, "406th value should be 50");
-assertEq(view[407], 255, "407th value should be 255");
-assertEq(view[408], 205, "408th value should be 205");
-assertEq(view[409], 255, "409th value should be 255");
-assertEq(view[410], 50, "410th value should be 50");
-assertEq(view[411], 255, "411th value should be 255");
-assertEq(view[412], 205, "412th value should be 205");
-assertEq(view[413], 255, "413th value should be 255");
-assertEq(view[414], 50, "414th value should be 50");
-assertEq(view[415], 255, "415th value should be 255");
-assertEq(view[416], 154, "416th value should be 154");
-assertEq(view[417], 255, "417th value should be 255");
-assertEq(view[418], 101, "418th value should be 101");
-assertEq(view[419], 255, "419th value should be 255");
-assertEq(view[420], 128, "420th value should be 128");
-assertEq(view[421], 127, "421th value should be 127");
-assertEq(view[422], 127, "422th value should be 127");
-assertEq(view[423], 255, "423th value should be 255");
-assertEq(view[424], 154, "424th value should be 154");
-assertEq(view[425], 255, "425th value should be 255");
-assertEq(view[426], 101, "426th value should be 101");
-assertEq(view[427], 255, "427th value should be 255");
-assertEq(view[428], 128, "428th value should be 128");
-assertEq(view[429], 127, "429th value should be 127");
-assertEq(view[430], 127, "430th value should be 127");
-assertEq(view[431], 255, "431th value should be 255");
-assertEq(view[432], 103, "432th value should be 103");
-assertEq(view[433], 255, "433th value should be 255");
-assertEq(view[434], 152, "434th value should be 152");
-assertEq(view[435], 255, "435th value should be 255");
-assertEq(view[436], 0, "436th value should be 0");
-assertEq(view[437], 0, "437th value should be 0");
-assertEq(view[438], 0, "438th value should be 0");
-assertEq(view[439], 255, "439th value should be 255");
-assertEq(view[440], 0, "440th value should be 0");
-assertEq(view[441], 0, "441th value should be 0");
-assertEq(view[442], 0, "442th value should be 0");
-assertEq(view[443], 255, "443th value should be 255");
-assertEq(view[444], 0, "444th value should be 0");
-assertEq(view[445], 0, "445th value should be 0");
-assertEq(view[446], 0, "446th value should be 0");
-assertEq(view[447], 255, "447th value should be 255");
-assertEq(view[448], 0, "448th value should be 0");
-assertEq(view[449], 0, "449th value should be 0");
-assertEq(view[450], 0, "450th value should be 0");
-assertEq(view[451], 255, "451th value should be 255");
-assertEq(view[452], 0, "452th value should be 0");
-assertEq(view[453], 0, "453th value should be 0");
-assertEq(view[454], 0, "454th value should be 0");
-assertEq(view[455], 255, "455th value should be 255");
-assertEq(view[456], 0, "456th value should be 0");
-assertEq(view[457], 0, "457th value should be 0");
-assertEq(view[458], 0, "458th value should be 0");
-assertEq(view[459], 255, "459th value should be 255");
-assertEq(view[460], 0, "460th value should be 0");
-assertEq(view[461], 0, "461th value should be 0");
-assertEq(view[462], 0, "462th value should be 0");
-assertEq(view[463], 255, "463th value should be 255");
-assertEq(view[464], 78, "464th value should be 78");
-assertEq(view[465], 127, "465th value should be 127");
-assertEq(view[466], 178, "466th value should be 178");
-assertEq(view[467], 255, "467th value should be 255");
-assertEq(view[468], 154, "468th value should be 154");
-assertEq(view[469], 255, "469th value should be 255");
-assertEq(view[470], 101, "470th value should be 101");
-assertEq(view[471], 255, "471th value should be 255");
-assertEq(view[472], 205, "472th value should be 205");
-assertEq(view[473], 255, "473th value should be 255");
-assertEq(view[474], 50, "474th value should be 50");
-assertEq(view[475], 255, "475th value should be 255");
-assertEq(view[476], 205, "476th value should be 205");
-assertEq(view[477], 255, "477th value should be 255");
-assertEq(view[478], 50, "478th value should be 50");
-assertEq(view[479], 255, "479th value should be 255");
-assertEq(view[480], 205, "480th value should be 205");
-assertEq(view[481], 255, "481th value should be 255");
-assertEq(view[482], 50, "482th value should be 50");
-assertEq(view[483], 255, "483th value should be 255");
-assertEq(view[484], 205, "484th value should be 205");
-assertEq(view[485], 255, "485th value should be 255");
-assertEq(view[486], 50, "486th value should be 50");
-assertEq(view[487], 255, "487th value should be 255");
-assertEq(view[488], 179, "488th value should be 179");
-assertEq(view[489], 127, "489th value should be 127");
-assertEq(view[490], 76, "490th value should be 76");
-assertEq(view[491], 255, "491th value should be 255");
-assertEq(view[492], 179, "492th value should be 179");
-assertEq(view[493], 127, "493th value should be 127");
-assertEq(view[494], 76, "494th value should be 76");
-assertEq(view[495], 255, "495th value should be 255");
-assertEq(view[496], 128, "496th value should be 128");
-assertEq(view[497], 127, "497th value should be 127");
-assertEq(view[498], 127, "498th value should be 127");
-assertEq(view[499], 255, "499th value should be 255");
-assertEq(view[500], 52, "500th value should be 52");
-assertEq(view[501], 255, "501th value should be 255");
-assertEq(view[502], 203, "502th value should be 203");
-assertEq(view[503], 255, "503th value should be 255");
-assertEq(view[504], 0, "504th value should be 0");
-assertEq(view[505], 0, "505th value should be 0");
-assertEq(view[506], 0, "506th value should be 0");
-assertEq(view[507], 255, "507th value should be 255");
-assertEq(view[508], 78, "508th value should be 78");
-assertEq(view[509], 127, "509th value should be 127");
-assertEq(view[510], 178, "510th value should be 178");
-assertEq(view[511], 255, "511th value should be 255");
-assertEq(view[512], 52, "512th value should be 52");
-assertEq(view[513], 255, "513th value should be 255");
-assertEq(view[514], 203, "514th value should be 203");
-assertEq(view[515], 255, "515th value should be 255");
-assertEq(view[516], 0, "516th value should be 0");
-assertEq(view[517], 0, "517th value should be 0");
-assertEq(view[518], 0, "518th value should be 0");
-assertEq(view[519], 255, "519th value should be 255");
-assertEq(view[520], 0, "520th value should be 0");
-assertEq(view[521], 0, "521th value should be 0");
-assertEq(view[522], 0, "522th value should be 0");
-assertEq(view[523], 255, "523th value should be 255");
-assertEq(view[524], 0, "524th value should be 0");
-assertEq(view[525], 0, "525th value should be 0");
-assertEq(view[526], 0, "526th value should be 0");
-assertEq(view[527], 255, "527th value should be 255");
-assertEq(view[528], 0, "528th value should be 0");
-assertEq(view[529], 0, "529th value should be 0");
-assertEq(view[530], 0, "530th value should be 0");
-assertEq(view[531], 255, "531th value should be 255");
-assertEq(view[532], 0, "532th value should be 0");
-assertEq(view[533], 0, "533th value should be 0");
-assertEq(view[534], 0, "534th value should be 0");
-assertEq(view[535], 255, "535th value should be 255");
-assertEq(view[536], 0, "536th value should be 0");
-assertEq(view[537], 0, "537th value should be 0");
-assertEq(view[538], 0, "538th value should be 0");
-assertEq(view[539], 255, "539th value should be 255");
-assertEq(view[540], 0, "540th value should be 0");
-assertEq(view[541], 0, "541th value should be 0");
-assertEq(view[542], 0, "542th value should be 0");
-assertEq(view[543], 255, "543th value should be 255");
-assertEq(view[544], 0, "544th value should be 0");
-assertEq(view[545], 0, "545th value should be 0");
-assertEq(view[546], 0, "546th value should be 0");
-assertEq(view[547], 255, "547th value should be 255");
-assertEq(view[548], 154, "548th value should be 154");
-assertEq(view[549], 255, "549th value should be 255");
-assertEq(view[550], 101, "550th value should be 101");
-assertEq(view[551], 255, "551th value should be 255");
-assertEq(view[552], 205, "552th value should be 205");
-assertEq(view[553], 255, "553th value should be 255");
-assertEq(view[554], 50, "554th value should be 50");
-assertEq(view[555], 255, "555th value should be 255");
-assertEq(view[556], 205, "556th value should be 205");
-assertEq(view[557], 255, "557th value should be 255");
-assertEq(view[558], 50, "558th value should be 50");
-assertEq(view[559], 255, "559th value should be 255");
-assertEq(view[560], 205, "560th value should be 205");
-assertEq(view[561], 255, "561th value should be 255");
-assertEq(view[562], 50, "562th value should be 50");
-assertEq(view[563], 255, "563th value should be 255");
-assertEq(view[564], 179, "564th value should be 179");
-assertEq(view[565], 127, "565th value should be 127");
-assertEq(view[566], 76, "566th value should be 76");
-assertEq(view[567], 255, "567th value should be 255");
-assertEq(view[568], 179, "568th value should be 179");
-assertEq(view[569], 127, "569th value should be 127");
-assertEq(view[570], 76, "570th value should be 76");
-assertEq(view[571], 255, "571th value should be 255");
-assertEq(view[572], 154, "572th value should be 154");
-assertEq(view[573], 255, "573th value should be 255");
-assertEq(view[574], 101, "574th value should be 101");
-assertEq(view[575], 255, "575th value should be 255");
-assertEq(view[576], 103, "576th value should be 103");
-assertEq(view[577], 255, "577th value should be 255");
-assertEq(view[578], 152, "578th value should be 152");
-assertEq(view[579], 255, "579th value should be 255");
-assertEq(view[580], 0, "580th value should be 0");
-assertEq(view[581], 0, "581th value should be 0");
-assertEq(view[582], 0, "582th value should be 0");
-assertEq(view[583], 255, "583th value should be 255");
-assertEq(view[584], 0, "584th value should be 0");
-assertEq(view[585], 0, "585th value should be 0");
-assertEq(view[586], 0, "586th value should be 0");
-assertEq(view[587], 255, "587th value should be 255");
-assertEq(view[588], 0, "588th value should be 0");
-assertEq(view[589], 0, "589th value should be 0");
-assertEq(view[590], 0, "590th value should be 0");
-assertEq(view[591], 255, "591th value should be 255");
-assertEq(view[592], 0, "592th value should be 0");
-assertEq(view[593], 0, "593th value should be 0");
-assertEq(view[594], 0, "594th value should be 0");
-assertEq(view[595], 255, "595th value should be 255");
-assertEq(view[596], 0, "596th value should be 0");
-assertEq(view[597], 0, "597th value should be 0");
-assertEq(view[598], 0, "598th value should be 0");
-assertEq(view[599], 255, "599th value should be 255");
-assertEq(view[600], 0, "600th value should be 0");
-assertEq(view[601], 0, "601th value should be 0");
-assertEq(view[602], 0, "602th value should be 0");
-assertEq(view[603], 255, "603th value should be 255");
-assertEq(view[604], 0, "604th value should be 0");
-assertEq(view[605], 0, "605th value should be 0");
-assertEq(view[606], 0, "606th value should be 0");
-assertEq(view[607], 255, "607th value should be 255");
-assertEq(view[608], 0, "608th value should be 0");
-assertEq(view[609], 0, "609th value should be 0");
-assertEq(view[610], 0, "610th value should be 0");
-assertEq(view[611], 255, "611th value should be 255");
-assertEq(view[612], 0, "612th value should be 0");
-assertEq(view[613], 0, "613th value should be 0");
-assertEq(view[614], 0, "614th value should be 0");
-assertEq(view[615], 255, "615th value should be 255");
-assertEq(view[616], 0, "616th value should be 0");
-assertEq(view[617], 0, "617th value should be 0");
-assertEq(view[618], 0, "618th value should be 0");
-assertEq(view[619], 255, "619th value should be 255");
-assertEq(view[620], 0, "620th value should be 0");
-assertEq(view[621], 0, "621th value should be 0");
-assertEq(view[622], 0, "622th value should be 0");
-assertEq(view[623], 255, "623th value should be 255");
-assertEq(view[624], 0, "624th value should be 0");
-assertEq(view[625], 0, "625th value should be 0");
-assertEq(view[626], 0, "626th value should be 0");
-assertEq(view[627], 255, "627th value should be 255");
-assertEq(view[628], 154, "628th value should be 154");
-assertEq(view[629], 255, "629th value should be 255");
-assertEq(view[630], 101, "630th value should be 101");
-assertEq(view[631], 255, "631th value should be 255");
-assertEq(view[632], 205, "632th value should be 205");
-assertEq(view[633], 255, "633th value should be 255");
-assertEq(view[634], 50, "634th value should be 50");
-assertEq(view[635], 255, "635th value should be 255");
-assertEq(view[636], 205, "636th value should be 205");
-assertEq(view[637], 255, "637th value should be 255");
-assertEq(view[638], 50, "638th value should be 50");
-assertEq(view[639], 255, "639th value should be 255");
-assertEq(view[640], 179, "640th value should be 179");
-assertEq(view[641], 127, "641th value should be 127");
-assertEq(view[642], 76, "642th value should be 76");
-assertEq(view[643], 255, "643th value should be 255");
-assertEq(view[644], 179, "644th value should be 179");
-assertEq(view[645], 127, "645th value should be 127");
-assertEq(view[646], 76, "646th value should be 76");
-assertEq(view[647], 255, "647th value should be 255");
-assertEq(view[648], 154, "648th value should be 154");
-assertEq(view[649], 255, "649th value should be 255");
-assertEq(view[650], 101, "650th value should be 101");
-assertEq(view[651], 255, "651th value should be 255");
-assertEq(view[652], 128, "652th value should be 128");
-assertEq(view[653], 127, "653th value should be 127");
-assertEq(view[654], 127, "654th value should be 127");
-assertEq(view[655], 255, "655th value should be 255");
-assertEq(view[656], 52, "656th value should be 52");
-assertEq(view[657], 255, "657th value should be 255");
-assertEq(view[658], 203, "658th value should be 203");
-assertEq(view[659], 255, "659th value should be 255");
-assertEq(view[660], 0, "660th value should be 0");
-assertEq(view[661], 0, "661th value should be 0");
-assertEq(view[662], 0, "662th value should be 0");
-assertEq(view[663], 255, "663th value should be 255");
-assertEq(view[664], 0, "664th value should be 0");
-assertEq(view[665], 0, "665th value should be 0");
-assertEq(view[666], 0, "666th value should be 0");
-assertEq(view[667], 255, "667th value should be 255");
-assertEq(view[668], 0, "668th value should be 0");
-assertEq(view[669], 0, "669th value should be 0");
-assertEq(view[670], 0, "670th value should be 0");
-assertEq(view[671], 255, "671th value should be 255");
-assertEq(view[672], 0, "672th value should be 0");
-assertEq(view[673], 0, "673th value should be 0");
-assertEq(view[674], 0, "674th value should be 0");
-assertEq(view[675], 255, "675th value should be 255");
-assertEq(view[676], 0, "676th value should be 0");
-assertEq(view[677], 0, "677th value should be 0");
-assertEq(view[678], 0, "678th value should be 0");
-assertEq(view[679], 255, "679th value should be 255");
-assertEq(view[680], 0, "680th value should be 0");
-assertEq(view[681], 0, "681th value should be 0");
-assertEq(view[682], 0, "682th value should be 0");
-assertEq(view[683], 255, "683th value should be 255");
-assertEq(view[684], 0, "684th value should be 0");
-assertEq(view[685], 0, "685th value should be 0");
-assertEq(view[686], 0, "686th value should be 0");
-assertEq(view[687], 255, "687th value should be 255");
-assertEq(view[688], 0, "688th value should be 0");
-assertEq(view[689], 0, "689th value should be 0");
-assertEq(view[690], 0, "690th value should be 0");
-assertEq(view[691], 255, "691th value should be 255");
-assertEq(view[692], 0, "692th value should be 0");
-assertEq(view[693], 0, "693th value should be 0");
-assertEq(view[694], 0, "694th value should be 0");
-assertEq(view[695], 255, "695th value should be 255");
-assertEq(view[696], 0, "696th value should be 0");
-assertEq(view[697], 0, "697th value should be 0");
-assertEq(view[698], 0, "698th value should be 0");
-assertEq(view[699], 255, "699th value should be 255");
-assertEq(view[700], 0, "700th value should be 0");
-assertEq(view[701], 0, "701th value should be 0");
-assertEq(view[702], 0, "702th value should be 0");
-assertEq(view[703], 255, "703th value should be 255");
-assertEq(view[704], 0, "704th value should be 0");
-assertEq(view[705], 0, "705th value should be 0");
-assertEq(view[706], 0, "706th value should be 0");
-assertEq(view[707], 255, "707th value should be 255");
-assertEq(view[708], 154, "708th value should be 154");
-assertEq(view[709], 255, "709th value should be 255");
-assertEq(view[710], 101, "710th value should be 101");
-assertEq(view[711], 255, "711th value should be 255");
-assertEq(view[712], 179, "712th value should be 179");
-assertEq(view[713], 127, "713th value should be 127");
-assertEq(view[714], 76, "714th value should be 76");
-assertEq(view[715], 255, "715th value should be 255");
-assertEq(view[716], 205, "716th value should be 205");
-assertEq(view[717], 255, "717th value should be 255");
-assertEq(view[718], 50, "718th value should be 50");
-assertEq(view[719], 255, "719th value should be 255");
-assertEq(view[720], 154, "720th value should be 154");
-assertEq(view[721], 255, "721th value should be 255");
-assertEq(view[722], 101, "722th value should be 101");
-assertEq(view[723], 255, "723th value should be 255");
-assertEq(view[724], 52, "724th value should be 52");
-assertEq(view[725], 255, "725th value should be 255");
-assertEq(view[726], 203, "726th value should be 203");
-assertEq(view[727], 255, "727th value should be 255");
-assertEq(view[728], 128, "728th value should be 128");
-assertEq(view[729], 127, "729th value should be 127");
-assertEq(view[730], 127, "730th value should be 127");
-assertEq(view[731], 255, "731th value should be 255");
-assertEq(view[732], 78, "732th value should be 78");
-assertEq(view[733], 127, "733th value should be 127");
-assertEq(view[734], 178, "734th value should be 178");
-assertEq(view[735], 255, "735th value should be 255");
-assertEq(view[736], 0, "736th value should be 0");
-assertEq(view[737], 0, "737th value should be 0");
-assertEq(view[738], 0, "738th value should be 0");
-assertEq(view[739], 255, "739th value should be 255");
-assertEq(view[740], 0, "740th value should be 0");
-assertEq(view[741], 0, "741th value should be 0");
-assertEq(view[742], 0, "742th value should be 0");
-assertEq(view[743], 255, "743th value should be 255");
-assertEq(view[744], 0, "744th value should be 0");
-assertEq(view[745], 0, "745th value should be 0");
-assertEq(view[746], 0, "746th value should be 0");
-assertEq(view[747], 255, "747th value should be 255");
-assertEq(view[748], 0, "748th value should be 0");
-assertEq(view[749], 0, "749th value should be 0");
-assertEq(view[750], 0, "750th value should be 0");
-assertEq(view[751], 255, "751th value should be 255");
-assertEq(view[752], 0, "752th value should be 0");
-assertEq(view[753], 0, "753th value should be 0");
-assertEq(view[754], 0, "754th value should be 0");
-assertEq(view[755], 255, "755th value should be 255");
-assertEq(view[756], 0, "756th value should be 0");
-assertEq(view[757], 0, "757th value should be 0");
-assertEq(view[758], 0, "758th value should be 0");
-assertEq(view[759], 255, "759th value should be 255");
-assertEq(view[760], 0, "760th value should be 0");
-assertEq(view[761], 0, "761th value should be 0");
-assertEq(view[762], 0, "762th value should be 0");
-assertEq(view[763], 255, "763th value should be 255");
-assertEq(view[764], 0, "764th value should be 0");
-assertEq(view[765], 0, "765th value should be 0");
-assertEq(view[766], 0, "766th value should be 0");
-assertEq(view[767], 255, "767th value should be 255");
-assertEq(view[768], 0, "768th value should be 0");
-assertEq(view[769], 0, "769th value should be 0");
-assertEq(view[770], 0, "770th value should be 0");
-assertEq(view[771], 255, "771th value should be 255");
-assertEq(view[772], 0, "772th value should be 0");
-assertEq(view[773], 0, "773th value should be 0");
-assertEq(view[774], 0, "774th value should be 0");
-assertEq(view[775], 255, "775th value should be 255");
-assertEq(view[776], 0, "776th value should be 0");
-assertEq(view[777], 0, "777th value should be 0");
-assertEq(view[778], 0, "778th value should be 0");
-assertEq(view[779], 255, "779th value should be 255");
-assertEq(view[780], 0, "780th value should be 0");
-assertEq(view[781], 0, "781th value should be 0");
-assertEq(view[782], 0, "782th value should be 0");
-assertEq(view[783], 255, "783th value should be 255");
-assertEq(view[784], 78, "784th value should be 78");
-assertEq(view[785], 127, "785th value should be 127");
-assertEq(view[786], 178, "786th value should be 178");
-assertEq(view[787], 255, "787th value should be 255");
-assertEq(view[788], 154, "788th value should be 154");
-assertEq(view[789], 255, "789th value should be 255");
-assertEq(view[790], 101, "790th value should be 101");
-assertEq(view[791], 255, "791th value should be 255");
-assertEq(view[792], 179, "792th value should be 179");
-assertEq(view[793], 127, "793th value should be 127");
-assertEq(view[794], 76, "794th value should be 76");
-assertEq(view[795], 255, "795th value should be 255");
-assertEq(view[796], 205, "796th value should be 205");
-assertEq(view[797], 255, "797th value should be 255");
-assertEq(view[798], 50, "798th value should be 50");
-assertEq(view[799], 255, "799th value should be 255");
-assertEq(view[800], 128, "800th value should be 128");
-assertEq(view[801], 127, "801th value should be 127");
-assertEq(view[802], 127, "802th value should be 127");
-assertEq(view[803], 255, "803th value should be 255");
-assertEq(view[804], 0, "804th value should be 0");
-assertEq(view[805], 0, "805th value should be 0");
-assertEq(view[806], 0, "806th value should be 0");
-assertEq(view[807], 255, "807th value should be 255");
-assertEq(view[808], 26, "808th value should be 26");
-assertEq(view[809], 127, "809th value should be 127");
-assertEq(view[810], 229, "810th value should be 229");
-assertEq(view[811], 255, "811th value should be 255");
-assertEq(view[812], 0, "812th value should be 0");
-assertEq(view[813], 0, "813th value should be 0");
-assertEq(view[814], 0, "814th value should be 0");
-assertEq(view[815], 255, "815th value should be 255");
-assertEq(view[816], 0, "816th value should be 0");
-assertEq(view[817], 0, "817th value should be 0");
-assertEq(view[818], 0, "818th value should be 0");
-assertEq(view[819], 255, "819th value should be 255");
-assertEq(view[820], 0, "820th value should be 0");
-assertEq(view[821], 0, "821th value should be 0");
-assertEq(view[822], 0, "822th value should be 0");
-assertEq(view[823], 255, "823th value should be 255");
-assertEq(view[824], 0, "824th value should be 0");
-assertEq(view[825], 0, "825th value should be 0");
-assertEq(view[826], 0, "826th value should be 0");
-assertEq(view[827], 255, "827th value should be 255");
-assertEq(view[828], 0, "828th value should be 0");
-assertEq(view[829], 0, "829th value should be 0");
-assertEq(view[830], 0, "830th value should be 0");
-assertEq(view[831], 255, "831th value should be 255");
-assertEq(view[832], 0, "832th value should be 0");
-assertEq(view[833], 0, "833th value should be 0");
-assertEq(view[834], 0, "834th value should be 0");
-assertEq(view[835], 255, "835th value should be 255");
-assertEq(view[836], 0, "836th value should be 0");
-assertEq(view[837], 0, "837th value should be 0");
-assertEq(view[838], 0, "838th value should be 0");
-assertEq(view[839], 255, "839th value should be 255");
-assertEq(view[840], 0, "840th value should be 0");
-assertEq(view[841], 0, "841th value should be 0");
-assertEq(view[842], 0, "842th value should be 0");
-assertEq(view[843], 255, "843th value should be 255");
-assertEq(view[844], 0, "844th value should be 0");
-assertEq(view[845], 0, "845th value should be 0");
-assertEq(view[846], 0, "846th value should be 0");
-assertEq(view[847], 255, "847th value should be 255");
-assertEq(view[848], 0, "848th value should be 0");
-assertEq(view[849], 0, "849th value should be 0");
-assertEq(view[850], 0, "850th value should be 0");
-assertEq(view[851], 255, "851th value should be 255");
-assertEq(view[852], 0, "852th value should be 0");
-assertEq(view[853], 0, "853th value should be 0");
-assertEq(view[854], 0, "854th value should be 0");
-assertEq(view[855], 255, "855th value should be 255");
-assertEq(view[856], 0, "856th value should be 0");
-assertEq(view[857], 0, "857th value should be 0");
-assertEq(view[858], 0, "858th value should be 0");
-assertEq(view[859], 255, "859th value should be 255");
-assertEq(view[860], 0, "860th value should be 0");
-assertEq(view[861], 0, "861th value should be 0");
-assertEq(view[862], 0, "862th value should be 0");
-assertEq(view[863], 255, "863th value should be 255");
-assertEq(view[864], 103, "864th value should be 103");
-assertEq(view[865], 255, "865th value should be 255");
-assertEq(view[866], 152, "866th value should be 152");
-assertEq(view[867], 255, "867th value should be 255");
-assertEq(view[868], 154, "868th value should be 154");
-assertEq(view[869], 255, "869th value should be 255");
-assertEq(view[870], 101, "870th value should be 101");
-assertEq(view[871], 255, "871th value should be 255");
-assertEq(view[872], 179, "872th value should be 179");
-assertEq(view[873], 127, "873th value should be 127");
-assertEq(view[874], 76, "874th value should be 76");
-assertEq(view[875], 255, "875th value should be 255");
-assertEq(view[876], 205, "876th value should be 205");
-assertEq(view[877], 255, "877th value should be 255");
-assertEq(view[878], 50, "878th value should be 50");
-assertEq(view[879], 255, "879th value should be 255");
-assertEq(view[880], 179, "880th value should be 179");
-assertEq(view[881], 127, "881th value should be 127");
-assertEq(view[882], 76, "882th value should be 76");
-assertEq(view[883], 255, "883th value should be 255");
-assertEq(view[884], 179, "884th value should be 179");
-assertEq(view[885], 127, "885th value should be 127");
-assertEq(view[886], 76, "886th value should be 76");
-assertEq(view[887], 255, "887th value should be 255");
-assertEq(view[888], 128, "888th value should be 128");
-assertEq(view[889], 127, "889th value should be 127");
-assertEq(view[890], 127, "890th value should be 127");
-assertEq(view[891], 255, "891th value should be 255");
-assertEq(view[892], 103, "892th value should be 103");
-assertEq(view[893], 255, "893th value should be 255");
-assertEq(view[894], 152, "894th value should be 152");
-assertEq(view[895], 255, "895th value should be 255");
-assertEq(view[896], 26, "896th value should be 26");
-assertEq(view[897], 127, "897th value should be 127");
-assertEq(view[898], 229, "898th value should be 229");
-assertEq(view[899], 255, "899th value should be 255");
-assertEq(view[900], 0, "900th value should be 0");
-assertEq(view[901], 0, "901th value should be 0");
-assertEq(view[902], 0, "902th value should be 0");
-assertEq(view[903], 255, "903th value should be 255");
-assertEq(view[904], 0, "904th value should be 0");
-assertEq(view[905], 0, "905th value should be 0");
-assertEq(view[906], 0, "906th value should be 0");
-assertEq(view[907], 255, "907th value should be 255");
-assertEq(view[908], 0, "908th value should be 0");
-assertEq(view[909], 0, "909th value should be 0");
-assertEq(view[910], 0, "910th value should be 0");
-assertEq(view[911], 255, "911th value should be 255");
-assertEq(view[912], 0, "912th value should be 0");
-assertEq(view[913], 0, "913th value should be 0");
-assertEq(view[914], 0, "914th value should be 0");
-assertEq(view[915], 255, "915th value should be 255");
-assertEq(view[916], 0, "916th value should be 0");
-assertEq(view[917], 0, "917th value should be 0");
-assertEq(view[918], 0, "918th value should be 0");
-assertEq(view[919], 255, "919th value should be 255");
-assertEq(view[920], 0, "920th value should be 0");
-assertEq(view[921], 0, "921th value should be 0");
-assertEq(view[922], 0, "922th value should be 0");
-assertEq(view[923], 255, "923th value should be 255");
-assertEq(view[924], 0, "924th value should be 0");
-assertEq(view[925], 0, "925th value should be 0");
-assertEq(view[926], 0, "926th value should be 0");
-assertEq(view[927], 255, "927th value should be 255");
-assertEq(view[928], 0, "928th value should be 0");
-assertEq(view[929], 0, "929th value should be 0");
-assertEq(view[930], 0, "930th value should be 0");
-assertEq(view[931], 255, "931th value should be 255");
-assertEq(view[932], 0, "932th value should be 0");
-assertEq(view[933], 0, "933th value should be 0");
-assertEq(view[934], 0, "934th value should be 0");
-assertEq(view[935], 255, "935th value should be 255");
-assertEq(view[936], 0, "936th value should be 0");
-assertEq(view[937], 0, "937th value should be 0");
-assertEq(view[938], 0, "938th value should be 0");
-assertEq(view[939], 255, "939th value should be 255");
-assertEq(view[940], 0, "940th value should be 0");
-assertEq(view[941], 0, "941th value should be 0");
-assertEq(view[942], 0, "942th value should be 0");
-assertEq(view[943], 255, "943th value should be 255");
-assertEq(view[944], 0, "944th value should be 0");
-assertEq(view[945], 0, "945th value should be 0");
-assertEq(view[946], 0, "946th value should be 0");
-assertEq(view[947], 255, "947th value should be 255");
-assertEq(view[948], 154, "948th value should be 154");
-assertEq(view[949], 255, "949th value should be 255");
-assertEq(view[950], 101, "950th value should be 101");
-assertEq(view[951], 255, "951th value should be 255");
-assertEq(view[952], 179, "952th value should be 179");
-assertEq(view[953], 127, "953th value should be 127");
-assertEq(view[954], 76, "954th value should be 76");
-assertEq(view[955], 255, "955th value should be 255");
-assertEq(view[956], 205, "956th value should be 205");
-assertEq(view[957], 255, "957th value should be 255");
-assertEq(view[958], 50, "958th value should be 50");
-assertEq(view[959], 255, "959th value should be 255");
-assertEq(view[960], 179, "960th value should be 179");
-assertEq(view[961], 127, "961th value should be 127");
-assertEq(view[962], 76, "962th value should be 76");
-assertEq(view[963], 255, "963th value should be 255");
-assertEq(view[964], 179, "964th value should be 179");
-assertEq(view[965], 127, "965th value should be 127");
-assertEq(view[966], 76, "966th value should be 76");
-assertEq(view[967], 255, "967th value should be 255");
-assertEq(view[968], 179, "968th value should be 179");
-assertEq(view[969], 127, "969th value should be 127");
-assertEq(view[970], 76, "970th value should be 76");
-assertEq(view[971], 255, "971th value should be 255");
-assertEq(view[972], 154, "972th value should be 154");
-assertEq(view[973], 255, "973th value should be 255");
-assertEq(view[974], 101, "974th value should be 101");
-assertEq(view[975], 255, "975th value should be 255");
-assertEq(view[976], 103, "976th value should be 103");
-assertEq(view[977], 255, "977th value should be 255");
-assertEq(view[978], 152, "978th value should be 152");
-assertEq(view[979], 255, "979th value should be 255");
-assertEq(view[980], 0, "980th value should be 0");
-assertEq(view[981], 0, "981th value should be 0");
-assertEq(view[982], 0, "982th value should be 0");
-assertEq(view[983], 255, "983th value should be 255");
-assertEq(view[984], 0, "984th value should be 0");
-assertEq(view[985], 0, "985th value should be 0");
-assertEq(view[986], 0, "986th value should be 0");
-assertEq(view[987], 255, "987th value should be 255");
-assertEq(view[988], 0, "988th value should be 0");
-assertEq(view[989], 0, "989th value should be 0");
-assertEq(view[990], 0, "990th value should be 0");
-assertEq(view[991], 255, "991th value should be 255");
-assertEq(view[992], 0, "992th value should be 0");
-assertEq(view[993], 0, "993th value should be 0");
-assertEq(view[994], 0, "994th value should be 0");
-assertEq(view[995], 255, "995th value should be 255");
-assertEq(view[996], 0, "996th value should be 0");
-assertEq(view[997], 0, "997th value should be 0");
-assertEq(view[998], 0, "998th value should be 0");
-assertEq(view[999], 255, "999th value should be 255");
-assertEq(view[1000], 0, "1000th value should be 0");
-assertEq(view[1001], 0, "1001th value should be 0");
-assertEq(view[1002], 0, "1002th value should be 0");
-assertEq(view[1003], 255, "1003th value should be 255");
-assertEq(view[1004], 0, "1004th value should be 0");
-assertEq(view[1005], 0, "1005th value should be 0");
-assertEq(view[1006], 0, "1006th value should be 0");
-assertEq(view[1007], 255, "1007th value should be 255");
-assertEq(view[1008], 0, "1008th value should be 0");
-assertEq(view[1009], 0, "1009th value should be 0");
-assertEq(view[1010], 0, "1010th value should be 0");
-assertEq(view[1011], 255, "1011th value should be 255");
-assertEq(view[1012], 0, "1012th value should be 0");
-assertEq(view[1013], 0, "1013th value should be 0");
-assertEq(view[1014], 0, "1014th value should be 0");
-assertEq(view[1015], 255, "1015th value should be 255");
-assertEq(view[1016], 0, "1016th value should be 0");
-assertEq(view[1017], 0, "1017th value should be 0");
-assertEq(view[1018], 0, "1018th value should be 0");
-assertEq(view[1019], 255, "1019th value should be 255");
-assertEq(view[1020], 0, "1020th value should be 0");
-assertEq(view[1021], 0, "1021th value should be 0");
-assertEq(view[1022], 0, "1022th value should be 0");
-assertEq(view[1023], 255, "1023th value should be 255");
-assertEq(view[1024], 0, "1024th value should be 0");
-assertEq(view[1025], 0, "1025th value should be 0");
-assertEq(view[1026], 0, "1026th value should be 0");
-assertEq(view[1027], 255, "1027th value should be 255");
-assertEq(view[1028], 154, "1028th value should be 154");
-assertEq(view[1029], 255, "1029th value should be 255");
-assertEq(view[1030], 101, "1030th value should be 101");
-assertEq(view[1031], 255, "1031th value should be 255");
-assertEq(view[1032], 205, "1032th value should be 205");
-assertEq(view[1033], 255, "1033th value should be 255");
-assertEq(view[1034], 50, "1034th value should be 50");
-assertEq(view[1035], 255, "1035th value should be 255");
-assertEq(view[1036], 205, "1036th value should be 205");
-assertEq(view[1037], 255, "1037th value should be 255");
-assertEq(view[1038], 50, "1038th value should be 50");
-assertEq(view[1039], 255, "1039th value should be 255");
-assertEq(view[1040], 205, "1040th value should be 205");
-assertEq(view[1041], 255, "1041th value should be 255");
-assertEq(view[1042], 50, "1042th value should be 50");
-assertEq(view[1043], 255, "1043th value should be 255");
-assertEq(view[1044], 179, "1044th value should be 179");
-assertEq(view[1045], 127, "1045th value should be 127");
-assertEq(view[1046], 76, "1046th value should be 76");
-assertEq(view[1047], 255, "1047th value should be 255");
-assertEq(view[1048], 179, "1048th value should be 179");
-assertEq(view[1049], 127, "1049th value should be 127");
-assertEq(view[1050], 76, "1050th value should be 76");
-assertEq(view[1051], 255, "1051th value should be 255");
-assertEq(view[1052], 154, "1052th value should be 154");
-assertEq(view[1053], 255, "1053th value should be 255");
-assertEq(view[1054], 101, "1054th value should be 101");
-assertEq(view[1055], 255, "1055th value should be 255");
-assertEq(view[1056], 128, "1056th value should be 128");
-assertEq(view[1057], 127, "1057th value should be 127");
-assertEq(view[1058], 127, "1058th value should be 127");
-assertEq(view[1059], 255, "1059th value should be 255");
-assertEq(view[1060], 0, "1060th value should be 0");
-assertEq(view[1061], 0, "1061th value should be 0");
-assertEq(view[1062], 0, "1062th value should be 0");
-assertEq(view[1063], 255, "1063th value should be 255");
-assertEq(view[1064], 0, "1064th value should be 0");
-assertEq(view[1065], 0, "1065th value should be 0");
-assertEq(view[1066], 0, "1066th value should be 0");
-assertEq(view[1067], 255, "1067th value should be 255");
-assertEq(view[1068], 26, "1068th value should be 26");
-assertEq(view[1069], 127, "1069th value should be 127");
-assertEq(view[1070], 229, "1070th value should be 229");
-assertEq(view[1071], 255, "1071th value should be 255");
-assertEq(view[1072], 26, "1072th value should be 26");
-assertEq(view[1073], 127, "1073th value should be 127");
-assertEq(view[1074], 229, "1074th value should be 229");
-assertEq(view[1075], 255, "1075th value should be 255");
-assertEq(view[1076], 0, "1076th value should be 0");
-assertEq(view[1077], 0, "1077th value should be 0");
-assertEq(view[1078], 0, "1078th value should be 0");
-assertEq(view[1079], 255, "1079th value should be 255");
-assertEq(view[1080], 0, "1080th value should be 0");
-assertEq(view[1081], 0, "1081th value should be 0");
-assertEq(view[1082], 0, "1082th value should be 0");
-assertEq(view[1083], 255, "1083th value should be 255");
-assertEq(view[1084], 0, "1084th value should be 0");
-assertEq(view[1085], 0, "1085th value should be 0");
-assertEq(view[1086], 0, "1086th value should be 0");
-assertEq(view[1087], 255, "1087th value should be 255");
-assertEq(view[1088], 0, "1088th value should be 0");
-assertEq(view[1089], 0, "1089th value should be 0");
-assertEq(view[1090], 0, "1090th value should be 0");
-assertEq(view[1091], 255, "1091th value should be 255");
-assertEq(view[1092], 0, "1092th value should be 0");
-assertEq(view[1093], 0, "1093th value should be 0");
-assertEq(view[1094], 0, "1094th value should be 0");
-assertEq(view[1095], 255, "1095th value should be 255");
-assertEq(view[1096], 0, "1096th value should be 0");
-assertEq(view[1097], 0, "1097th value should be 0");
-assertEq(view[1098], 0, "1098th value should be 0");
-assertEq(view[1099], 255, "1099th value should be 255");
-assertEq(view[1100], 0, "1100th value should be 0");
-assertEq(view[1101], 0, "1101th value should be 0");
-assertEq(view[1102], 0, "1102th value should be 0");
-assertEq(view[1103], 255, "1103th value should be 255");
-assertEq(view[1104], 0, "1104th value should be 0");
-assertEq(view[1105], 0, "1105th value should be 0");
-assertEq(view[1106], 0, "1106th value should be 0");
-assertEq(view[1107], 255, "1107th value should be 255");
-assertEq(view[1108], 154, "1108th value should be 154");
-assertEq(view[1109], 255, "1109th value should be 255");
-assertEq(view[1110], 101, "1110th value should be 101");
-assertEq(view[1111], 255, "1111th value should be 255");
-assertEq(view[1112], 205, "1112th value should be 205");
-assertEq(view[1113], 255, "1113th value should be 255");
-assertEq(view[1114], 50, "1114th value should be 50");
-assertEq(view[1115], 255, "1115th value should be 255");
-assertEq(view[1116], 205, "1116th value should be 205");
-assertEq(view[1117], 255, "1117th value should be 255");
-assertEq(view[1118], 50, "1118th value should be 50");
-assertEq(view[1119], 255, "1119th value should be 255");
-assertEq(view[1120], 205, "1120th value should be 205");
-assertEq(view[1121], 255, "1121th value should be 255");
-assertEq(view[1122], 50, "1122th value should be 50");
-assertEq(view[1123], 255, "1123th value should be 255");
-assertEq(view[1124], 205, "1124th value should be 205");
-assertEq(view[1125], 255, "1125th value should be 255");
-assertEq(view[1126], 50, "1126th value should be 50");
-assertEq(view[1127], 255, "1127th value should be 255");
-assertEq(view[1128], 205, "1128th value should be 205");
-assertEq(view[1129], 255, "1129th value should be 255");
-assertEq(view[1130], 50, "1130th value should be 50");
-assertEq(view[1131], 255, "1131th value should be 255");
-assertEq(view[1132], 179, "1132th value should be 179");
-assertEq(view[1133], 127, "1133th value should be 127");
-assertEq(view[1134], 76, "1134th value should be 76");
-assertEq(view[1135], 255, "1135th value should be 255");
-assertEq(view[1136], 154, "1136th value should be 154");
-assertEq(view[1137], 255, "1137th value should be 255");
-assertEq(view[1138], 101, "1138th value should be 101");
-assertEq(view[1139], 255, "1139th value should be 255");
-assertEq(view[1140], 128, "1140th value should be 128");
-assertEq(view[1141], 127, "1141th value should be 127");
-assertEq(view[1142], 127, "1142th value should be 127");
-assertEq(view[1143], 255, "1143th value should be 255");
-assertEq(view[1144], 128, "1144th value should be 128");
-assertEq(view[1145], 127, "1145th value should be 127");
-assertEq(view[1146], 127, "1146th value should be 127");
-assertEq(view[1147], 255, "1147th value should be 255");
-assertEq(view[1148], 103, "1148th value should be 103");
-assertEq(view[1149], 255, "1149th value should be 255");
-assertEq(view[1150], 152, "1150th value should be 152");
-assertEq(view[1151], 255, "1151th value should be 255");
-assertEq(view[1152], 78, "1152th value should be 78");
-assertEq(view[1153], 127, "1153th value should be 127");
-assertEq(view[1154], 178, "1154th value should be 178");
-assertEq(view[1155], 255, "1155th value should be 255");
-assertEq(view[1156], 0, "1156th value should be 0");
-assertEq(view[1157], 0, "1157th value should be 0");
-assertEq(view[1158], 0, "1158th value should be 0");
-assertEq(view[1159], 255, "1159th value should be 255");
-assertEq(view[1160], 0, "1160th value should be 0");
-assertEq(view[1161], 0, "1161th value should be 0");
-assertEq(view[1162], 0, "1162th value should be 0");
-assertEq(view[1163], 255, "1163th value should be 255");
-assertEq(view[1164], 0, "1164th value should be 0");
-assertEq(view[1165], 0, "1165th value should be 0");
-assertEq(view[1166], 0, "1166th value should be 0");
-assertEq(view[1167], 255, "1167th value should be 255");
-assertEq(view[1168], 0, "1168th value should be 0");
-assertEq(view[1169], 0, "1169th value should be 0");
-assertEq(view[1170], 0, "1170th value should be 0");
-assertEq(view[1171], 255, "1171th value should be 255");
-assertEq(view[1172], 0, "1172th value should be 0");
-assertEq(view[1173], 0, "1173th value should be 0");
-assertEq(view[1174], 0, "1174th value should be 0");
-assertEq(view[1175], 255, "1175th value should be 255");
-assertEq(view[1176], 0, "1176th value should be 0");
-assertEq(view[1177], 0, "1177th value should be 0");
-assertEq(view[1178], 0, "1178th value should be 0");
-assertEq(view[1179], 255, "1179th value should be 255");
-assertEq(view[1180], 0, "1180th value should be 0");
-assertEq(view[1181], 0, "1181th value should be 0");
-assertEq(view[1182], 0, "1182th value should be 0");
-assertEq(view[1183], 255, "1183th value should be 255");
-assertEq(view[1184], 26, "1184th value should be 26");
-assertEq(view[1185], 127, "1185th value should be 127");
-assertEq(view[1186], 229, "1186th value should be 229");
-assertEq(view[1187], 255, "1187th value should be 255");
-assertEq(view[1188], 154, "1188th value should be 154");
-assertEq(view[1189], 255, "1189th value should be 255");
-assertEq(view[1190], 101, "1190th value should be 101");
-assertEq(view[1191], 255, "1191th value should be 255");
-assertEq(view[1192], 205, "1192th value should be 205");
-assertEq(view[1193], 255, "1193th value should be 255");
-assertEq(view[1194], 50, "1194th value should be 50");
-assertEq(view[1195], 255, "1195th value should be 255");
-assertEq(view[1196], 205, "1196th value should be 205");
-assertEq(view[1197], 255, "1197th value should be 255");
-assertEq(view[1198], 50, "1198th value should be 50");
-assertEq(view[1199], 255, "1199th value should be 255");
-assertEq(view[1200], 230, "1200th value should be 230");
-assertEq(view[1201], 127, "1201th v