Bug 1562602 part 4 - Move jitSupportsFloatingPoint and jitSupportsUnalignedAccesses flags from JSRuntime to JitOptions. r=tcampbell
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 08 Jul 2019 08:19:45 +0000
changeset 481623 8cbfd166cb6173c48dc3994399892046c983409e
parent 481622 8f67dc480b58f84b1783a24a1be452dfeb5a1d4d
child 481624 44bdb6882218741af78e5bd5e7a892fa984c40bf
push id113632
push usernbeleuzu@mozilla.com
push dateTue, 09 Jul 2019 03:54:50 +0000
treeherdermozilla-inbound@d178951a5dcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1562602
milestone69.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 1562602 part 4 - Move jitSupportsFloatingPoint and jitSupportsUnalignedAccesses flags from JSRuntime to JitOptions. r=tcampbell This is process-wide state and storing it in JSContext/JSRuntime requires callers to pass a context/runtime for no good reason. This simplifies the next patch. Storing this in JitOptions seemed nicer than adding new globals for this and maybe in the future we will have a testing function/flag to toggle these flags. Differential Revision: https://phabricator.services.mozilla.com/D36471
js/src/jit/BaselineJIT.h
js/src/jit/CompileWrappers.cpp
js/src/jit/CompileWrappers.h
js/src/jit/Ion.cpp
js/src/jit/Ion.h
js/src/jit/JitOptions.cpp
js/src/jit/JitOptions.h
js/src/jit/arm/Trampoline-arm.cpp
js/src/jit/arm64/Trampoline-arm64.cpp
js/src/jit/mips32/Trampoline-mips32.cpp
js/src/jit/mips64/Trampoline-mips64.cpp
js/src/jit/x64/Trampoline-x64.cpp
js/src/jit/x86/Trampoline-x86.cpp
js/src/vm/Initialization.cpp
js/src/vm/JSContext.h
js/src/vm/Runtime.cpp
js/src/vm/Runtime.h
js/src/wasm/WasmJS.cpp
--- a/js/src/jit/BaselineJIT.h
+++ b/js/src/jit/BaselineJIT.h
@@ -531,17 +531,17 @@ struct BaselineScript final {
 static_assert(
     sizeof(BaselineScript) % sizeof(uintptr_t) == 0,
     "The data attached to the script must be aligned for fast JIT access.");
 
 inline bool IsBaselineEnabled(JSContext* cx) {
 #ifdef JS_CODEGEN_NONE
   return false;
 #else
-  return cx->options().baseline() && cx->runtime()->jitSupportsFloatingPoint;
+  return cx->options().baseline() && JitOptions.supportsFloatingPoint;
 #endif
 }
 
 inline bool IsBaselineInterpreterOrJitEnabled(JSContext* cx) {
   return IsBaselineEnabled(cx) || JitOptions.baselineInterpreter;
 }
 
 enum class BaselineTier { Interpreter, Compiler };
--- a/js/src/jit/CompileWrappers.cpp
+++ b/js/src/jit/CompileWrappers.cpp
@@ -33,20 +33,16 @@ const uint32_t* CompileRuntime::addressO
 const JitRuntime* CompileRuntime::jitRuntime() {
   return runtime()->jitRuntime();
 }
 
 GeckoProfilerRuntime& CompileRuntime::geckoProfiler() {
   return runtime()->geckoProfiler();
 }
 
-bool CompileRuntime::jitSupportsFloatingPoint() {
-  return runtime()->jitSupportsFloatingPoint;
-}
-
 bool CompileRuntime::hadOutOfMemory() { return runtime()->hadOutOfMemory; }
 
 bool CompileRuntime::profilingScripts() { return runtime()->profilingScripts; }
 
 const JSAtomState& CompileRuntime::names() { return *runtime()->commonNames; }
 
 const PropertyName* CompileRuntime::emptyString() {
   return runtime()->emptyString;
--- a/js/src/jit/CompileWrappers.h
+++ b/js/src/jit/CompileWrappers.h
@@ -30,17 +30,16 @@ class CompileRuntime {
   const uint32_t* addressOfGCZealModeBits();
 #endif
 
   const JitRuntime* jitRuntime();
 
   // Compilation does not occur off thread when the Gecko Profiler is enabled.
   GeckoProfilerRuntime& geckoProfiler();
 
-  bool jitSupportsFloatingPoint();
   bool hadOutOfMemory();
   bool profilingScripts();
 
   const JSAtomState& names();
   const PropertyName* emptyString();
   const StaticStrings& staticStrings();
   const WellKnownSymbols& wellKnownSymbols();
 
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -124,33 +124,39 @@ JitContext::JitContext(JSContext* cx, Te
 
 JitContext::JitContext(TempAllocator* temp)
     : JitContext(nullptr, nullptr, temp) {}
 
 JitContext::JitContext() : JitContext(nullptr, nullptr, nullptr) {}
 
 JitContext::~JitContext() { SetJitContext(prev_); }
 
-bool jit::InitializeIon() {
+bool jit::InitializeJit() {
   if (!TlsJitContext.init()) {
     return false;
   }
 
   CheckLogging();
 
 #ifdef JS_CACHEIR_SPEW
   const char* env = getenv("CACHEIR_LOGS");
   if (env && env[0] && env[0] != '0') {
     CacheIRSpewer::singleton().init(env);
   }
 #endif
 
 #if defined(JS_CODEGEN_ARM)
   InitARMFlags();
 #endif
+
+  // Note: these flags need to be initialized after the InitARMFlags call above.
+  JitOptions.supportsFloatingPoint = MacroAssembler::SupportsFloatingPoint();
+  JitOptions.supportsUnalignedAccesses =
+      MacroAssembler::SupportsUnalignedAccesses();
+
   CheckPerf();
   return true;
 }
 
 JitRuntime::JitRuntime()
     : execAlloc_(),
       nextCompilationId_(0),
       exceptionTailOffset_(0),
@@ -223,17 +229,17 @@ bool JitRuntime::initialize(JSContext* c
 
 bool JitRuntime::generateTrampolines(JSContext* cx) {
   StackMacroAssembler masm;
 
   Label bailoutTail;
   JitSpew(JitSpew_Codegen, "# Emitting bailout tail stub");
   generateBailoutTailStub(masm, &bailoutTail);
 
-  if (cx->runtime()->jitSupportsFloatingPoint) {
+  if (JitOptions.supportsFloatingPoint) {
     JitSpew(JitSpew_Codegen, "# Emitting bailout tables");
 
     // Initialize some Ion-only stubs that require floating-point support.
     BailoutTableVector& bailoutTables = bailoutTables_.writeRef();
     if (!bailoutTables.reserve(FrameSizeClass::ClassLimit().classId())) {
       return false;
     }
 
@@ -3031,24 +3037,16 @@ void jit::TraceJitScripts(JSTracer* trc,
     jit::BaselineScript::Trace(trc, script->baselineScript());
   }
 
   if (script->hasJitScript()) {
     script->jitScript()->trace(trc);
   }
 }
 
-bool jit::JitSupportsFloatingPoint() {
-  return js::jit::MacroAssembler::SupportsFloatingPoint();
-}
-
-bool jit::JitSupportsUnalignedAccesses() {
-  return js::jit::MacroAssembler::SupportsUnalignedAccesses();
-}
-
 bool jit::JitSupportsSimd() { return js::jit::MacroAssembler::SupportsSimd(); }
 
 bool jit::JitSupportsAtomics() {
 #if defined(JS_CODEGEN_ARM)
   // Bug 1146902, bug 1077318: Enable Ion inlining of Atomics
   // operations on ARM only when the CPU has byte, halfword, and
   // doubleword load-exclusive and store-exclusive instructions,
   // until we can add support for systems that don't have those.
--- a/js/src/jit/Ion.h
+++ b/js/src/jit/Ion.h
@@ -90,18 +90,18 @@ class JitContext {
   CompileRealm* realm_;
 #ifdef DEBUG
   bool isCompilingWasm_;
   bool oom_;
 #endif
   int assemblerCount_;
 };
 
-// Initialize Ion statically for all JSRuntimes.
-MOZ_MUST_USE bool InitializeIon();
+// Process-wide initialization of JIT data structures.
+MOZ_MUST_USE bool InitializeJit();
 
 // Get and set the current JIT context.
 JitContext* GetJitContext();
 JitContext* MaybeGetJitContext();
 
 void SetJitContext(JitContext* ctx);
 
 bool CanIonCompileScript(JSContext* cx, JSScript* script);
@@ -163,17 +163,17 @@ void FreeIonBuilder(IonBuilder* builder)
 void LinkIonScript(JSContext* cx, HandleScript calleescript);
 uint8_t* LazyLinkTopActivation(JSContext* cx, LazyLinkExitFrameLayout* frame);
 
 static inline bool IsIonEnabled(JSContext* cx) {
 #if defined(JS_CODEGEN_NONE)
   return false;
 #else
   return cx->options().ion() && cx->options().baseline() &&
-         cx->runtime()->jitSupportsFloatingPoint;
+         JitOptions.supportsFloatingPoint;
 #endif
 }
 
 inline bool IsIonInlinableGetterOrSetterPC(jsbytecode* pc) {
   // GETPROP, CALLPROP, LENGTH, GETELEM, and JSOP_CALLELEM. (Inlined Getters)
   // SETPROP, SETNAME, SETGNAME (Inlined Setters)
   return IsGetPropPC(pc) || IsGetElemPC(pc) || IsSetPropPC(pc);
 }
@@ -204,17 +204,15 @@ inline size_t NumLocalsAndArgs(JSScript*
 bool OffThreadCompilationAvailable(JSContext* cx);
 
 void ForbidCompilation(JSContext* cx, JSScript* script);
 
 size_t SizeOfIonData(JSScript* script, mozilla::MallocSizeOf mallocSizeOf);
 void DestroyJitScripts(FreeOp* fop, JSScript* script);
 void TraceJitScripts(JSTracer* trc, JSScript* script);
 
-bool JitSupportsFloatingPoint();
-bool JitSupportsUnalignedAccesses();
 bool JitSupportsSimd();
 bool JitSupportsAtomics();
 
 }  // namespace jit
 }  // namespace js
 
 #endif /* jit_Ion_h */
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -230,16 +230,20 @@ DefaultJitOptions::DefaultJitOptions() {
   SET_DEFAULT(spectreIndexMasking, true);
   SET_DEFAULT(spectreObjectMitigationsBarriers, true);
   SET_DEFAULT(spectreObjectMitigationsMisc, true);
   SET_DEFAULT(spectreStringMitigations, true);
   SET_DEFAULT(spectreValueMasking, true);
   SET_DEFAULT(spectreJitToCxxCalls, true);
 #endif
 
+  // These are set to their actual values in InitializeJit.
+  SET_DEFAULT(supportsFloatingPoint, false);
+  SET_DEFAULT(supportsUnalignedAccesses, false);
+
   // Toggles the optimization whereby offsets are folded into loads and not
   // included in the bounds check.
   SET_DEFAULT(wasmFoldOffsets, true);
 
   // Controls whether two-tiered compilation should be requested when
   // compiling a new wasm module, independently of other heuristics, and
   // should be delayed to test both baseline and ion paths in compiled code,
   // as well as the transition from one tier to the other.
--- a/js/src/jit/JitOptions.h
+++ b/js/src/jit/JitOptions.h
@@ -104,16 +104,19 @@ struct DefaultJitOptions {
   // concept.
   bool spectreIndexMasking;
   bool spectreObjectMitigationsBarriers;
   bool spectreObjectMitigationsMisc;
   bool spectreStringMitigations;
   bool spectreValueMasking;
   bool spectreJitToCxxCalls;
 
+  bool supportsFloatingPoint;
+  bool supportsUnalignedAccesses;
+
   DefaultJitOptions();
   bool isSmallFunction(JSScript* script) const;
   void setEagerIonCompilation();
   void setNormalIonWarmUpThreshold(uint32_t warmUpThreshold);
   void setFullIonWarmUpThreshold(uint32_t warmUpThreshold);
   void resetNormalIonWarmUpThreshold();
   void resetFullIonWarmUpThreshold();
   void enableGvn(bool val);
--- a/js/src/jit/arm/Trampoline-arm.cpp
+++ b/js/src/jit/arm/Trampoline-arm.cpp
@@ -861,17 +861,17 @@ bool JitRuntime::generateVMWrapper(JSCon
       break;
 
     case Type_Bool:
       masm.load8ZeroExtend(Address(sp, 0), ReturnReg);
       masm.freeStack(sizeof(int32_t));
       break;
 
     case Type_Double:
-      if (cx->runtime()->jitSupportsFloatingPoint) {
+      if (JitOptions.supportsFloatingPoint) {
         masm.loadDouble(Address(sp, 0), ReturnDoubleReg);
       } else {
         masm.assumeUnreachable(
             "Unable to load into float reg, with no FP support.");
       }
       masm.freeStack(sizeof(double));
       break;
 
@@ -913,17 +913,17 @@ uint32_t JitRuntime::generatePreBarrier(
                               &noBarrier);
 
   // Call into C++ to mark this GC thing.
   masm.pop(temp3);
   masm.pop(temp2);
   masm.pop(temp1);
 
   LiveRegisterSet save;
-  if (cx->runtime()->jitSupportsFloatingPoint) {
+  if (JitOptions.supportsFloatingPoint) {
     save.set() =
         RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                     FloatRegisterSet(FloatRegisters::VolatileDoubleMask));
   } else {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet());
   }
   masm.PushRegsInMask(save);
--- a/js/src/jit/arm64/Trampoline-arm64.cpp
+++ b/js/src/jit/arm64/Trampoline-arm64.cpp
@@ -698,17 +698,17 @@ bool JitRuntime::generateVMWrapper(JSCon
 
     case Type_Bool:
       masm.Ldrb(ARMRegister(ReturnReg, 32),
                 MemOperand(masm.GetStackPointer64()));
       masm.freeStack(sizeof(int64_t));
       break;
 
     case Type_Double:
-      MOZ_ASSERT(cx->runtime()->jitSupportsFloatingPoint);
+      MOZ_ASSERT(JitOptions.supportsFloatingPoint);
       masm.Ldr(ARMFPRegister(ReturnDoubleReg, 64),
                MemOperand(masm.GetStackPointer64()));
       masm.freeStack(sizeof(double));
       break;
 
     case Type_Pointer:
       masm.Ldr(ARMRegister(ReturnReg, 64),
                MemOperand(masm.GetStackPointer64()));
--- a/js/src/jit/mips32/Trampoline-mips32.cpp
+++ b/js/src/jit/mips32/Trampoline-mips32.cpp
@@ -851,17 +851,17 @@ bool JitRuntime::generateVMWrapper(JSCon
       break;
 
     case Type_Bool:
       masm.load8ZeroExtend(Address(StackPointer, 0), ReturnReg);
       masm.freeStack(sizeof(uintptr_t));
       break;
 
     case Type_Double:
-      if (cx->runtime()->jitSupportsFloatingPoint) {
+      if (JitOptions.supportsFloatingPoint) {
         masm.as_ldc1(ReturnDoubleReg, StackPointer, 0);
       } else {
         masm.assumeUnreachable(
             "Unable to load into float reg, with no FP support.");
       }
       masm.freeStack(sizeof(double));
       break;
 
@@ -898,17 +898,17 @@ uint32_t JitRuntime::generatePreBarrier(
                               &noBarrier);
 
   // Call into C++ to mark this GC thing.
   masm.pop(temp3);
   masm.pop(temp2);
   masm.pop(temp1);
 
   LiveRegisterSet save;
-  if (cx->runtime()->jitSupportsFloatingPoint) {
+  if (JitOptions.supportsFloatingPoint) {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet(FloatRegisters::VolatileMask));
   } else {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet());
   }
   save.add(ra);
   masm.PushRegsInMask(save);
--- a/js/src/jit/mips64/Trampoline-mips64.cpp
+++ b/js/src/jit/mips64/Trampoline-mips64.cpp
@@ -804,17 +804,17 @@ bool JitRuntime::generateVMWrapper(JSCon
       break;
 
     case Type_Bool:
       masm.load8ZeroExtend(Address(StackPointer, 0), ReturnReg);
       masm.freeStack(2 * sizeof(int32_t));
       break;
 
     case Type_Double:
-      if (cx->runtime()->jitSupportsFloatingPoint) {
+      if (JitOptions.supportsFloatingPoint) {
         masm.as_ldc1(ReturnDoubleReg, StackPointer, 0);
       } else {
         masm.assumeUnreachable(
             "Unable to load into float reg, with no FP support.");
       }
       masm.freeStack(sizeof(double));
       break;
 
@@ -848,17 +848,17 @@ uint32_t JitRuntime::generatePreBarrier(
                               &noBarrier);
 
   // Call into C++ to mark this GC thing.
   masm.pop(temp3);
   masm.pop(temp2);
   masm.pop(temp1);
 
   LiveRegisterSet save;
-  if (cx->runtime()->jitSupportsFloatingPoint) {
+  if (JitOptions.supportsFloatingPoint) {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet(FloatRegisters::VolatileMask));
   } else {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet());
   }
   save.add(ra);
   masm.PushRegsInMask(save);
--- a/js/src/jit/x64/Trampoline-x64.cpp
+++ b/js/src/jit/x64/Trampoline-x64.cpp
@@ -739,17 +739,17 @@ bool JitRuntime::generateVMWrapper(JSCon
       break;
 
     case Type_Bool:
       masm.load8ZeroExtend(Address(esp, 0), ReturnReg);
       masm.freeStack(sizeof(int32_t));
       break;
 
     case Type_Double:
-      MOZ_ASSERT(cx->runtime()->jitSupportsFloatingPoint);
+      MOZ_ASSERT(JitOptions.supportsFloatingPoint);
       masm.loadDouble(Address(esp, 0), ReturnDoubleReg);
       masm.freeStack(sizeof(double));
       break;
 
     case Type_Pointer:
       masm.loadPtr(Address(esp, 0), ReturnReg);
       masm.freeStack(sizeof(uintptr_t));
       break;
--- a/js/src/jit/x86/Trampoline-x86.cpp
+++ b/js/src/jit/x86/Trampoline-x86.cpp
@@ -755,17 +755,17 @@ bool JitRuntime::generateVMWrapper(JSCon
       break;
 
     case Type_Bool:
       masm.Pop(ReturnReg);
       masm.movzbl(ReturnReg, ReturnReg);
       break;
 
     case Type_Double:
-      if (cx->runtime()->jitSupportsFloatingPoint) {
+      if (JitOptions.supportsFloatingPoint) {
         masm.Pop(ReturnDoubleReg);
       } else {
         masm.assumeUnreachable(
             "Unable to pop to float reg, with no FP support.");
       }
       break;
 
     default:
@@ -804,17 +804,17 @@ uint32_t JitRuntime::generatePreBarrier(
                               &noBarrier);
 
   // Call into C++ to mark this GC thing.
   masm.pop(temp3);
   masm.pop(temp2);
   masm.pop(temp1);
 
   LiveRegisterSet save;
-  if (cx->runtime()->jitSupportsFloatingPoint) {
+  if (JitOptions.supportsFloatingPoint) {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet(FloatRegisters::VolatileMask));
   } else {
     save.set() = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
                              FloatRegisterSet());
   }
   masm.PushRegsInMask(save);
 
--- a/js/src/vm/Initialization.cpp
+++ b/js/src/vm/Initialization.cpp
@@ -142,17 +142,17 @@ JS_PUBLIC_API const char* JS::detail::In
   js::gc::InitMemorySubsystem();  // Ensure gc::SystemPageSize() works.
 
   js::coverage::InitLCov();
 
   RETURN_IF_FAIL(js::jit::InitProcessExecutableMemory());
 
   RETURN_IF_FAIL(js::MemoryProtectionExceptionHandler::install());
 
-  RETURN_IF_FAIL(js::jit::InitializeIon());
+  RETURN_IF_FAIL(js::jit::InitializeJit());
 
   RETURN_IF_FAIL(js::InitDateTimeState());
 
 #ifdef MOZ_VTUNE
   RETURN_IF_FAIL(js::vtune::Initialize());
 #endif
 
   RETURN_IF_FAIL(js::jit::AtomicOperations::Initialize());
--- a/js/src/vm/JSContext.h
+++ b/js/src/vm/JSContext.h
@@ -280,22 +280,16 @@ struct JSContext : public JS::RootingCon
   js::FreeOp* defaultFreeOp() { return &defaultFreeOp_.ref(); }
   void* stackLimitAddress(JS::StackKind kind) {
     return &nativeStackLimit[kind];
   }
   void* stackLimitAddressForJitCode(JS::StackKind kind);
   uintptr_t stackLimit(JS::StackKind kind) { return nativeStackLimit[kind]; }
   uintptr_t stackLimitForJitCode(JS::StackKind kind);
   size_t gcSystemPageSize() { return js::gc::SystemPageSize(); }
-  bool jitSupportsFloatingPoint() const {
-    return runtime_->jitSupportsFloatingPoint;
-  }
-  bool jitSupportsUnalignedAccesses() const {
-    return runtime_->jitSupportsUnalignedAccesses;
-  }
 
   /*
    * "Entering" a realm changes cx->realm (which changes cx->global). Note
    * that this does not push an Activation so it's possible for the caller's
    * realm to be != cx->realm(). This is not a problem since, in general, most
    * places in the VM cannot know that they were called from script (e.g.,
    * they may have been called through the JSAPI via JS_CallFunction) and thus
    * cannot expect there is a scripted caller.
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -144,18 +144,16 @@ JSRuntime::JSRuntime(JSRuntime* parentRu
       beingDestroyed_(false),
       allowContentJS_(true),
       atoms_(nullptr),
       permanentAtomsDuringInit_(nullptr),
       permanentAtoms_(nullptr),
       staticStrings(nullptr),
       commonNames(nullptr),
       wellKnownSymbols(nullptr),
-      jitSupportsFloatingPoint(false),
-      jitSupportsUnalignedAccesses(false),
       offthreadIonCompilationEnabled_(true),
       parallelParsingEnabled_(true),
 #ifdef DEBUG
       offThreadParsesRunning_(0),
       offThreadParsingBlocked_(false),
 #endif
       autoWritableJitCodeActive_(false),
       oomCallback(nullptr),
@@ -223,19 +221,16 @@ bool JSRuntime::init(JSContext* cx, uint
   gcInitialized = true;
 
   if (!InitRuntimeNumberState(this)) {
     return false;
   }
 
   js::ResetTimeZoneInternal(ResetTimeZoneMode::DontResetIfOffsetUnchanged);
 
-  jitSupportsFloatingPoint = js::jit::JitSupportsFloatingPoint();
-  jitSupportsUnalignedAccesses = js::jit::JitSupportsUnalignedAccesses();
-
   if (!parentRuntime) {
     sharedImmutableStrings_ = js::SharedImmutableStringsCache::Create();
     if (!sharedImmutableStrings_) {
       return false;
     }
   }
 
   return true;
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -807,19 +807,16 @@ struct JSRuntime : public js::MallocProv
  private:
   js::ScriptDataLockData<js::ScriptDataTable> scriptDataTable_;
 
  public:
   js::ScriptDataTable& scriptDataTable(const js::AutoLockScriptData& lock) {
     return scriptDataTable_.ref();
   }
 
-  js::WriteOnceData<bool> jitSupportsFloatingPoint;
-  js::WriteOnceData<bool> jitSupportsUnalignedAccesses;
-
  private:
   static mozilla::Atomic<size_t> liveRuntimesCount;
 
  public:
   static bool hasLiveRuntimes() { return liveRuntimesCount > 0; }
 
   explicit JSRuntime(JSRuntime* parentRuntime);
   ~JSRuntime();
--- a/js/src/wasm/WasmJS.cpp
+++ b/js/src/wasm/WasmJS.cpp
@@ -88,21 +88,21 @@ bool wasm::HasCompilerSupport(JSContext*
 #if !MOZ_LITTLE_ENDIAN || defined(JS_CODEGEN_NONE)
   return false;
 #endif
 
   if (gc::SystemPageSize() > wasm::PageSize) {
     return false;
   }
 
-  if (!cx->jitSupportsFloatingPoint()) {
+  if (!JitOptions.supportsFloatingPoint) {
     return false;
   }
 
-  if (!cx->jitSupportsUnalignedAccesses()) {
+  if (!JitOptions.supportsUnalignedAccesses) {
     return false;
   }
 
   if (!wasm::EnsureFullSignalHandlers(cx)) {
     return false;
   }
 
   // Wasm threads require 8-byte lock-free atomics.
@@ -1228,17 +1228,18 @@ bool WasmInstanceObject::isNewborn() con
   return getReservedSlot(INSTANCE_SLOT).isUndefined();
 }
 
 /* static */
 void WasmInstanceObject::finalize(FreeOp* fop, JSObject* obj) {
   WasmInstanceObject& instance = obj->as<WasmInstanceObject>();
   fop->delete_(obj, &instance.exports(), MemoryUse::WasmInstanceExports);
   fop->delete_(obj, &instance.scopes(), MemoryUse::WasmInstanceScopes);
-  fop->delete_(obj, &instance.indirectGlobals(), MemoryUse::WasmInstanceGlobals);
+  fop->delete_(obj, &instance.indirectGlobals(),
+               MemoryUse::WasmInstanceGlobals);
   if (!instance.isNewborn()) {
     fop->delete_(obj, &instance.instance(), MemoryUse::WasmInstanceInstance);
   }
 }
 
 /* static */
 void WasmInstanceObject::trace(JSTracer* trc, JSObject* obj) {
   WasmInstanceObject& instanceObj = obj->as<WasmInstanceObject>();