Bug 1488162 - Remove suppressGC hacks from wasm code. r=lth.
authorJulian Seward <jseward@acm.org>
Fri, 14 Dec 2018 13:02:35 +0100
changeset 450709 d9e2ee18925b37da06bb63c956acc165ab303837
parent 450708 5ca49059949b3c73db196be7280cfd9472631492
child 450710 4666c210aa93dec761ee8893b0b31fa32283ad3b
push id110526
push userjseward@mozilla.com
push dateFri, 14 Dec 2018 17:58:25 +0000
treeherdermozilla-inbound@d9e2ee18925b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1488162
milestone66.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 1488162 - Remove suppressGC hacks from wasm code. r=lth. This patch removes GCRuntime::temporaryAbortIfWasmGc() and SuppressGC (in WasmStubs.cpp) and also all the bits of C++ that they guard. It also removes the seven associated test cases. I verified that each of the seven tests corresponds to one or more of the removed C++ fragments, so it is safe to remove them.
js/src/builtin/TestingFunctions.cpp
js/src/gc/GC.cpp
js/src/gc/GCRuntime.h
js/src/gc/Verifier.cpp
js/src/jit-test/tests/wasm/gc/block-addmarkobservers.js
js/src/jit-test/tests/wasm/gc/block-debugger-findscripts.js
js/src/jit-test/tests/wasm/gc/block-debuggermemory-takecensus.js
js/src/jit-test/tests/wasm/gc/block-gczeal.js
js/src/jit-test/tests/wasm/gc/block-selectforgc.js
js/src/jit-test/tests/wasm/gc/block-verifyprebarriers-2.js
js/src/jit-test/tests/wasm/gc/block-verifyprebarriers.js
js/src/jit/CodeGenerator.cpp
js/src/shell/js.cpp
js/src/vm/Debugger.cpp
js/src/vm/DebuggerMemory.cpp
js/src/wasm/WasmStubs.cpp
js/src/wasm/WasmStubs.h
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -1059,21 +1059,16 @@ static bool ScheduleGC(JSContext* cx, un
   JS_GetGCZealBits(cx, &zealBits, &freq, &next);
   args.rval().setInt32(next);
   return true;
 }
 
 static bool SelectForGC(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
 
-  if (gc::GCRuntime::temporaryAbortIfWasmGc(cx)) {
-    JS_ReportErrorASCII(cx, "API temporarily unavailable under wasm gc");
-    return false;
-  }
-
   /*
    * The selectedForMarking set is intended to be manually marked at slice
    * start to detect missing pre-barriers. It is invalid for nursery things
    * to be in the set, so evict the nursery before adding items.
    */
   cx->runtime()->gc.evictNursery();
 
   for (unsigned i = 0; i < args.length(); i++) {
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -1036,20 +1036,16 @@ static const mozilla::EnumSet<ZealMode> 
     ZealMode::YieldBeforeSweepingTypes,
     ZealMode::YieldBeforeSweepingObjects,
     ZealMode::YieldBeforeSweepingNonObjects,
     ZealMode::YieldBeforeSweepingShapeTrees};
 
 void GCRuntime::setZeal(uint8_t zeal, uint32_t frequency) {
   MOZ_ASSERT(zeal <= unsigned(ZealMode::Limit));
 
-  if (temporaryAbortIfWasmGc(rt->mainContextFromOwnThread())) {
-    return;
-  }
-
   if (verifyPreData) {
     VerifyBarriers(rt, PreBarrierVerifier);
   }
 
   if (zeal == 0) {
     if (hasZealMode(ZealMode::GenerationalGC)) {
       evictNursery(JS::gcreason::DEBUG_GC);
       nursery().leaveZealMode();
@@ -1082,20 +1078,16 @@ void GCRuntime::setZeal(uint8_t zeal, ui
   zealFrequency = frequency;
   nextScheduled = schedule ? frequency : 0;
 }
 
 void GCRuntime::unsetZeal(uint8_t zeal) {
   MOZ_ASSERT(zeal <= unsigned(ZealMode::Limit));
   ZealMode zealMode = ZealMode(zeal);
 
-  if (temporaryAbortIfWasmGc(rt->mainContextFromOwnThread())) {
-    return;
-  }
-
   if (!hasZealMode(zealMode)) {
     return;
   }
 
   if (verifyPreData) {
     VerifyBarriers(rt, PreBarrierVerifier);
   }
 
@@ -8196,22 +8188,16 @@ void GCRuntime::clearSelectedForMarking(
 }
 
 void GCRuntime::setDeterministic(bool enabled) {
   MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting());
   deterministicOnly = enabled;
 }
 #endif
 
-#ifdef ENABLE_WASM_GC
-/* static */ bool GCRuntime::temporaryAbortIfWasmGc(JSContext* cx) {
-  return cx->options().wasmGc() && cx->suppressGC;
-}
-#endif
-
 #ifdef DEBUG
 
 /* Should only be called manually under gdb */
 void PreventGCDuringInteractiveDebug() { TlsContext.get()->suppressGC++; }
 
 #endif
 
 void js::ReleaseAllJITCode(FreeOp* fop) {
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -293,26 +293,16 @@ class GCRuntime {
   void setNextScheduled(uint32_t count);
   void verifyPreBarriers();
   void maybeVerifyPreBarriers(bool always);
   bool selectForMarking(JSObject* object);
   void clearSelectedForMarking();
   void setDeterministic(bool enable);
 #endif
 
-#ifdef ENABLE_WASM_GC
-  // If we run with wasm-gc enabled and there's wasm frames on the stack,
-  // then GCs are suppressed and many APIs should not be available.
-  // TODO (bug 1456824) This is temporary and should be removed once proper
-  // GC support is implemented.
-  static bool temporaryAbortIfWasmGc(JSContext* cx);
-#else
-  static bool temporaryAbortIfWasmGc(JSContext* cx) { return false; }
-#endif
-
   uint64_t nextCellUniqueId() {
     MOZ_ASSERT(nextCellUniqueId_ > 0);
     uint64_t uid = ++nextCellUniqueId_;
     return uid;
   }
 
 #ifdef DEBUG
   bool shutdownCollectedEverything() const { return arenasEmptyAtShutdown; }
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -175,19 +175,16 @@ static VerifyNode* NextNode(VerifyNode* 
 }
 
 void gc::GCRuntime::startVerifyPreBarriers() {
   if (verifyPreData || isIncrementalGCInProgress()) {
     return;
   }
 
   JSContext* cx = rt->mainContextFromOwnThread();
-  if (temporaryAbortIfWasmGc(cx)) {
-    return;
-  }
 
   if (IsIncrementalGCUnsafe(rt) != AbortReason::None ||
       rt->hasHelperThreadZones()) {
     return;
   }
 
   number++;
 
@@ -403,19 +400,16 @@ void gc::GCRuntime::verifyPreBarriers() 
   if (verifyPreData) {
     endVerifyPreBarriers();
   } else {
     startVerifyPreBarriers();
   }
 }
 
 void gc::VerifyBarriers(JSRuntime* rt, VerifierType type) {
-  if (GCRuntime::temporaryAbortIfWasmGc(rt->mainContextFromOwnThread())) {
-    return;
-  }
   if (type == PreBarrierVerifier) {
     rt->gc.verifyPreBarriers();
   }
 }
 
 void gc::GCRuntime::maybeVerifyPreBarriers(bool always) {
   if (!hasZealMode(ZealMode::VerifierPre)) {
     return;
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-addmarkobservers.js
+++ /dev/null
@@ -1,23 +0,0 @@
-grayRoot().x = Object.create(null);
-
-try {
-    wasmEvalText(`
-        (module
-            (import "global" "func" (result i32))
-            (func (export "func_0") (result i32)
-             call 0 ;; calls the import, which is func #0
-            )
-        )
-    `, {
-        global: {
-            func: function() {
-                addMarkObservers([grayRoot().x]);
-                getMarks();
-            }
-        }
-    }).exports.func_0();
-} catch(e) {
-    // If there's an error, it must be that the addMarkObservers API is
-    // temporarily disabled because of wasm gc.
-    assertEq(/temporarily unavailable/.test(e.message), true);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-debugger-findscripts.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// |jit-test| skip-if: !wasmGcEnabled()
-
-wasmEvalText(`
-    (module
-        (import "global" "func" (result i32))
-        (func (export "func_0") (result i32)
-         call 0 ;; calls the import, which is func #0
-        )
-    )
-`, {
-    global: {
-        func() {
-          var g = newGlobal();
-          var dbg = new Debugger(g);
-          var caught = false;
-          try {
-            dbg.findScripts().filter(isWasm(g, isValidWasmURL, 2));
-          } catch(e) {
-              caught = true;
-              assertEq(/temporarily unavailable/.test(e.toString()), true);
-          }
-          // When this assertion fails, it's time to remove the restriction in
-          // Debugger.findScripts.
-          assertEq(caught, true);
-        }
-    }
-}).exports.func_0();;
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-debuggermemory-takecensus.js
+++ /dev/null
@@ -1,25 +0,0 @@
-let g = newGlobal();
-
-let { exports } = wasmEvalText(`
-    (module
-        (import "global" "func" (result i32))
-        (func (export "func_0") (result i32)
-         call 0 ;; calls the import, which is func #0
-        )
-    )
-`, {
-    global: {
-        func() {
-            let dbg = new Debugger(g);
-            dbg.memory.takeCensus({ breakdown: { by: 'objectClass' } });
-        }
-    }
-});
-
-try {
-    exports.func_0();
-} catch(e) {
-    // If there's an error, it must be that the addMarkObservers API is
-    // temporarily disabled because of wasm gc.
-    assertEq(/temporarily unavailable/.test(e.message), true);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-gczeal.js
+++ /dev/null
@@ -1,11 +0,0 @@
-wasmEvalText(`(module
-    (import "global" "func" (result i32))
-    (func (export "func_0") (result i32)
-     call 0 ;; calls the import, which is func #0
-    )
-)`, { global: {
-    func() {
-        gczeal(7,6);
-        gczeal();
-    }
-} }).exports.func_0();
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-selectforgc.js
+++ /dev/null
@@ -1,22 +0,0 @@
-let { exports } = wasmEvalText(`
-    (module
-        (import "global" "func" (result i32))
-        (func (export "func_0") (result i32)
-         call 0 ;; calls the import, which is func #0
-        )
-    )
-`, {
-    global: {
-        func() {
-            selectforgc();
-        }
-    }
-});
-
-try {
-    exports.func_0();
-} catch(e) {
-    // If there's an error, it must be that the addMarkObservers API is
-    // temporarily disabled because of wasm gc.
-    assertEq(/temporarily unavailable/.test(e.message), true);
-}
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-verifyprebarriers-2.js
+++ /dev/null
@@ -1,16 +0,0 @@
-verifyprebarriers();
-
-wasmEvalText(`
-    (module
-        (import "global" "func" (result i32))
-        (func (export "func_0") (result i32)
-         call 0
-        )
-    )
-`, {
-    global: {
-        func() {
-            verifyprebarriers();
-        }
-    }
-}).exports.func_0();
deleted file mode 100644
--- a/js/src/jit-test/tests/wasm/gc/block-verifyprebarriers.js
+++ /dev/null
@@ -1,14 +0,0 @@
-wasmEvalText(`
-    (module
-        (import "global" "func" (result i32))
-        (func (export "func_0") (result i32)
-         call 0
-        )
-    )
-`, {
-    global: {
-        func() {
-            verifyprebarriers();
-        }
-    }
-}).exports.func_0();
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -13614,27 +13614,21 @@ void CodeGenerator::emitIonToWasmCallBas
       MOZ_CRASH("NullRef not expressible");
     case wasm::ExprType::Limit:
       MOZ_CRASH("Limit");
   }
 
   bool profilingEnabled = isProfilerInstrumentationEnabled();
   WasmInstanceObject* instObj = lir->mir()->instanceObject();
 
-  bool wasmGcEnabled = false;
-#ifdef ENABLE_WASM_GC
-  wasmGcEnabled = gen->options.wasmGcEnabled();
-#endif
-
   Register scratch = ToRegister(lir->temp());
 
   uint32_t callOffset;
   GenerateDirectCallFromJit(masm, funcExport, instObj->instance(), stackArgs,
-                            profilingEnabled, wasmGcEnabled, scratch,
-                            &callOffset);
+                            profilingEnabled, scratch, &callOffset);
 
   // Add the instance object to the constant pool, so it is transferred to
   // the owning IonScript and so that it gets traced as long as the IonScript
   // lives.
 
   uint32_t unused;
   masm.propagateOOM(graph.addConstantToPool(ObjectValue(*instObj), &unused));
 
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -7669,23 +7669,16 @@ static bool AddMarkObservers(JSContext* 
     return false;
   }
 
   if (!args.get(0).isObject()) {
     JS_ReportErrorASCII(cx, "argument must be an Array of objects");
     return false;
   }
 
-#ifdef ENABLE_WASM_GC
-  if (gc::GCRuntime::temporaryAbortIfWasmGc(cx)) {
-    JS_ReportErrorASCII(cx, "API temporarily unavailable under wasm gc");
-    return false;
-  }
-#endif
-
   // WeakCaches are not swept during a minor GC. To prevent nursery-allocated
   // contents from having the mark bits be deceptively black until the second
   // GC, they would need to be marked weakly (cf NurseryAwareHashMap). It is
   // simpler to evict the nursery to prevent nursery objects from being
   // observed.
   cx->runtime()->gc.evictNursery();
 
   RootedObject observersArg(cx, &args[0].toObject());
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -4861,21 +4861,16 @@ class MOZ_STACK_CLASS Debugger::ScriptQu
     }
   }
 };
 
 /* static */ bool Debugger::findScripts(JSContext* cx, unsigned argc,
                                         Value* vp) {
   THIS_DEBUGGER(cx, argc, vp, "findScripts", args, dbg);
 
-  if (gc::GCRuntime::temporaryAbortIfWasmGc(cx)) {
-    JS_ReportErrorASCII(cx, "API temporarily unavailable under wasm gc");
-    return false;
-  }
-
   ScriptQuery query(cx, dbg);
 
   if (args.length() >= 1) {
     RootedObject queryObject(cx, NonNullObject(cx, args[0]));
     if (!queryObject || !query.parseQuery(queryObject)) {
       return false;
     }
   } else {
@@ -5053,21 +5048,16 @@ static inline DebuggerSourceReferent AsS
   }
   return AsVariant(&obj->as<WasmInstanceObject>());
 }
 
 /* static */ bool Debugger::findSources(JSContext* cx, unsigned argc,
                                         Value* vp) {
   THIS_DEBUGGER(cx, argc, vp, "findSources", args, dbg);
 
-  if (gc::GCRuntime::temporaryAbortIfWasmGc(cx)) {
-    JS_ReportErrorASCII(cx, "API temporarily unavailable under wasm gc");
-    return false;
-  }
-
   SourceQuery query(cx, dbg);
   if (!query.findSources()) {
     return false;
   }
 
   Handle<SourceQuery::SourceSet> sources(query.foundSources());
 
   size_t resultLength = sources.count();
--- a/js/src/vm/DebuggerMemory.cpp
+++ b/js/src/vm/DebuggerMemory.cpp
@@ -394,23 +394,16 @@ using JS::ubi::CountTypePtr;
 //    go.
 //
 // 3) We walk the tree of counts and produce JavaScript objects reporting the
 //    accumulated results.
 bool DebuggerMemory::takeCensus(JSContext* cx, unsigned argc, Value* vp) {
   THIS_DEBUGGER_MEMORY(cx, argc, vp, "Debugger.Memory.prototype.census", args,
                        memory);
 
-#ifdef ENABLE_WASM_GC
-  if (gc::GCRuntime::temporaryAbortIfWasmGc(cx)) {
-    JS_ReportErrorASCII(cx, "API temporarily unavailable under wasm gc");
-    return false;
-  }
-#endif
-
   Census census(cx);
   CountTypePtr rootType;
 
   RootedObject options(cx);
   if (args.get(0).isObject()) {
     options = &args[0].toObject();
   }
 
--- a/js/src/wasm/WasmStubs.cpp
+++ b/js/src/wasm/WasmStubs.cpp
@@ -266,26 +266,16 @@ static void WasmPop(MacroAssembler& masm
 }
 
 static void MoveSPForJitABI(MacroAssembler& masm) {
 #ifdef JS_CODEGEN_ARM64
   masm.moveStackPtrTo(PseudoStackPointer);
 #endif
 }
 
-#ifdef ENABLE_WASM_GC
-static void SuppressGC(MacroAssembler& masm, int32_t increment,
-                       Register scratch) {
-  // masm.loadPtr(Address(WasmTlsReg, offsetof(TlsData, cx)), scratch);
-  // masm.add32(Imm32(increment),
-  //           Address(scratch, offsetof(JSContext, suppressGC) +
-  //                                js::ThreadData<int32_t>::offsetOfValue()));
-}
-#endif
-
 static void CallFuncExport(MacroAssembler& masm, const FuncExport& fe,
                            const Maybe<ImmPtr>& funcPtr) {
   MOZ_ASSERT(fe.hasEagerStubs() == !funcPtr);
   if (funcPtr) {
     masm.call(*funcPtr);
   } else {
     masm.call(CallSiteDesc(CallSiteDesc::Func), fe.funcIndex());
   }
@@ -353,19 +343,16 @@ static bool GenerateInterpEntry(MacroAss
   } else {
     masm.loadPtr(
         Address(masm.getStackPointer(), argBase + arg.offsetFromArgBase()),
         WasmTlsReg);
   }
 
 #ifdef ENABLE_WASM_GC
   WasmPush(masm, WasmTlsReg);
-  if (gcTypesConfigured == HasGcTypes::True) {
-    SuppressGC(masm, 1, scratch);
-  }
 #endif
 
   // Save 'argv' on the stack so that we can recover it after the call.
   WasmPush(masm, argv);
 
   // Since we're about to dynamically align the stack, reset the frame depth
   // so we can still assert static stack depth balancing.
   MOZ_ASSERT(masm.framePushed() == FramePushedBeforeAlign);
@@ -413,19 +400,16 @@ static bool GenerateInterpEntry(MacroAss
   MOZ_ASSERT(masm.framePushed() == 0);
   masm.setFramePushed(FramePushedBeforeAlign);
 
   // Recover the 'argv' pointer which was saved before aligning the stack.
   WasmPop(masm, argv);
 
 #ifdef ENABLE_WASM_GC
   WasmPop(masm, WasmTlsReg);
-  if (gcTypesConfigured == HasGcTypes::True) {
-    SuppressGC(masm, -1, WasmTlsReg);
-  }
 #endif
 
   // Store the return value in argv[0].
   StoreABIReturn(masm, fe, argv);
 
   // After the ReturnReg is stored into argv[0] but before fp is clobbered by
   // the PopRegsInMask(NonVolatileRegs) below, set the return value based on
   // whether fp is null (which is the case for successful returns) or the
@@ -534,44 +518,31 @@ static bool GenerateJitEntry(MacroAssemb
   RegisterOrSP sp = masm.getStackPointer();
 
   GenerateJitEntryPrologue(masm, offsets);
 
   // The jit caller has set up the following stack layout (sp grows to the
   // left):
   // <-- retAddr | descriptor | callee | argc | this | arg1..N
 
-#ifdef ENABLE_WASM_GC
-  // Save WasmTlsReg in the uppermost part of the reserved area, because we
-  // need it directly after the call.
-  unsigned savedTlsSize = AlignBytes(sizeof(void*), WasmStackAlignment);
-#else
-  unsigned savedTlsSize = 0;
-#endif
-
-  unsigned normalBytesNeeded =
-      StackArgBytes(fe.funcType().args()) + savedTlsSize;
+  unsigned normalBytesNeeded = StackArgBytes(fe.funcType().args());
 
   MIRTypeVector coerceArgTypes;
   MOZ_ALWAYS_TRUE(coerceArgTypes.append(MIRType::Int32));
   MOZ_ALWAYS_TRUE(coerceArgTypes.append(MIRType::Pointer));
   MOZ_ALWAYS_TRUE(coerceArgTypes.append(MIRType::Pointer));
   unsigned oolBytesNeeded = StackArgBytes(coerceArgTypes);
 
   unsigned bytesNeeded = Max(normalBytesNeeded, oolBytesNeeded);
 
   // Note the jit caller ensures the stack is aligned *after* the call
   // instruction.
   unsigned frameSize = StackDecrementForCall(WasmStackAlignment,
                                              masm.framePushed(), bytesNeeded);
 
-#ifdef ENABLE_WASM_GC
-  unsigned savedTlsOffset = frameSize - sizeof(void*);
-#endif
-
   // Reserve stack space for wasm ABI arguments, set up like this:
   // <-- ABI args | padding
   masm.reserveStack(frameSize);
 
   GenerateJitEntryLoadTls(masm, frameSize);
 
   if (fe.funcType().hasI64ArgOrRet()) {
     CallSymbolicAddress(masm, !fe.hasEagerStubs(),
@@ -737,36 +708,22 @@ static bool GenerateJitEntry(MacroAssemb
       }
       default: { MOZ_CRASH("unexpected input argument when calling from jit"); }
     }
   }
 
   // Setup wasm register state.
   masm.loadWasmPinnedRegsFromTls();
 
-#ifdef ENABLE_WASM_GC
-  if (gcTypesConfigured == HasGcTypes::True) {
-    masm.storePtr(WasmTlsReg, Address(sp, savedTlsOffset));
-    SuppressGC(masm, 1, ScratchIonEntry);
-  }
-#endif
-
   // Call into the real function. Note that, due to the throw stub, fp, tls
   // and pinned registers may be clobbered.
   masm.assertStackAlignment(WasmStackAlignment);
   CallFuncExport(masm, fe, funcPtr);
   masm.assertStackAlignment(WasmStackAlignment);
 
-#ifdef ENABLE_WASM_GC
-  if (gcTypesConfigured == HasGcTypes::True) {
-    masm.loadPtr(Address(sp, savedTlsOffset), WasmTlsReg);
-    SuppressGC(masm, -1, WasmTlsReg);
-  }
-#endif
-
   // If fp is equal to the FailFP magic value (set by the throw stub), then
   // report the exception to the JIT caller by jumping into the exception
   // stub; otherwise the FP value is still set to the parent ion frame value.
   Label exception;
   masm.branchPtr(Assembler::Equal, FramePointer, Imm32(FailFP), &exception);
 
   // Pop arguments.
   masm.freeStack(frameSize);
@@ -863,18 +820,18 @@ static bool GenerateJitEntry(MacroAssemb
   GenerateJitEntryThrow(masm, frameSize);
 
   return FinishOffsets(masm, offsets);
 }
 
 void wasm::GenerateDirectCallFromJit(MacroAssembler& masm, const FuncExport& fe,
                                      const Instance& inst,
                                      const JitCallStackArgVector& stackArgs,
-                                     bool profilingEnabled, bool wasmGcEnabled,
-                                     Register scratch, uint32_t* callOffset) {
+                                     bool profilingEnabled, Register scratch,
+                                     uint32_t* callOffset) {
   MOZ_ASSERT(!IsCompilingWasm());
 
   size_t framePushedAtStart = masm.framePushed();
 
   if (profilingEnabled) {
     // FramePointer isn't volatile, manually preserve it because it will be
     // clobbered below.
     masm.Push(FramePointer);
@@ -965,38 +922,26 @@ void wasm::GenerateDirectCallFromJit(Mac
       }
     }
   }
 
   // Load tls; from now on, WasmTlsReg is live.
   masm.movePtr(ImmPtr(inst.tlsData()), WasmTlsReg);
   masm.loadWasmPinnedRegsFromTls();
 
-#ifdef ENABLE_WASM_GC
-  if (wasmGcEnabled) {
-    SuppressGC(masm, 1, ABINonArgReg0);
-  }
-#endif
-
   // Actual call.
   const CodeTier& codeTier = inst.code().codeTier(inst.code().bestTier());
   const MetadataTier& metadata = codeTier.metadata();
   const CodeRange& codeRange = metadata.codeRange(fe);
   void* callee = codeTier.segment().base() + codeRange.funcNormalEntry();
 
   masm.assertStackAlignment(WasmStackAlignment);
   masm.callJit(ImmPtr(callee));
   masm.assertStackAlignment(WasmStackAlignment);
 
-#ifdef ENABLE_WASM_GC
-  if (wasmGcEnabled) {
-    SuppressGC(masm, -1, WasmTlsReg);
-  }
-#endif
-
   masm.branchPtr(Assembler::Equal, FramePointer, Imm32(wasm::FailFP),
                  masm.exceptionLabel());
 
   // Store the return value in the appropriate place.
   switch (fe.funcType().ret().code()) {
     case wasm::ExprType::Void:
       masm.moveValue(UndefinedValue(), JSReturnOperand);
       break;
--- a/js/src/wasm/WasmStubs.h
+++ b/js/src/wasm/WasmStubs.h
@@ -131,14 +131,14 @@ using JitCallStackArgVector = Vector<Jit
 // - all arguments passed in registers have been set up at the expected
 //   locations,
 // - all arguments passed on stack slot are alive as defined by a corresponding
 //   JitCallStackArg.
 
 extern void GenerateDirectCallFromJit(
     jit::MacroAssembler& masm, const FuncExport& fe, const Instance& inst,
     const JitCallStackArgVector& stackArgs, bool profilingEnabled,
-    bool wasmGcEnabled, jit::Register scratch, uint32_t* callOffset);
+    jit::Register scratch, uint32_t* callOffset);
 
 }  // namespace wasm
 }  // namespace js
 
 #endif  // wasm_stubs_h