From 90c8728cc9e4dddb3ae02df9cdcbe0874f90a1e2 Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Fri, 9 Apr 2021 20:03:51 +0000 Subject: [PATCH] Bug 1677204 - wasm: Remove multi-value flag. r=lth Multi-value has shipped and can remove its feature flag. Differential Revision: https://phabricator.services.mozilla.com/D110819 --- dom/workers/RuntimeService.cpp | 3 -- js/moz.configure | 27 ++---------- js/public/ContextOptions.h | 6 --- js/src/builtin/TestingFunctions.cpp | 10 ----- js/src/jit-test/tests/wasm/binary.js | 8 +--- js/src/jit-test/tests/wasm/features.js | 1 - .../tests/wasm/multi-value/directives.txt | 2 +- js/src/jsapi.cpp | 7 --- js/src/shell/js.cpp | 19 -------- js/src/wasm/WasmCompile.cpp | 1 - js/src/wasm/WasmConstants.h | 2 - js/src/wasm/WasmJS.cpp | 16 +------ js/src/wasm/WasmJS.h | 3 -- js/src/wasm/WasmOpIter.h | 8 ---- js/src/wasm/WasmTypes.h | 43 ------------------- js/src/wasm/WasmValidate.cpp | 2 +- js/src/wasm/WasmValidate.h | 4 -- js/xpconnect/src/XPCJSContext.cpp | 7 --- modules/libpref/init/all.js | 3 -- 19 files changed, 8 insertions(+), 164 deletions(-) diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 4fe98bbc83bf..6cef8ac8f154 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -283,9 +283,6 @@ void LoadContextOptions(const char* aPrefName, void* /* aClosure */) { #ifdef ENABLE_WASM_GC .setWasmGc(GetWorkerPref("wasm_gc"_ns)) #endif -#ifdef ENABLE_WASM_MULTI_VALUE - .setWasmMultiValue(GetWorkerPref("wasm_multi_value"_ns)) -#endif #ifdef ENABLE_WASM_SIMD .setWasmSimd(GetWorkerPref("wasm_simd"_ns)) #endif diff --git a/js/moz.configure b/js/moz.configure index a040621040fa..1b39c54a57b2 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -715,27 +715,6 @@ set_define( depends_if("--enable-wasm-private-reftypes")(lambda x: True), ) - -# Support for the WebAssembly multi-value proposal. -# Do not remove until Cranelift supports multi-value. -# ===================================================== - -option( - "--disable-wasm-multi-value", - help="Disable WebAssembly multi-value blocks and function calls", -) - - -@depends("--disable-wasm-multi-value") -def enable_wasm_multi_value(value): - if value: - return True - - -set_config("ENABLE_WASM_MULTI_VALUE", enable_wasm_multi_value) -set_define("ENABLE_WASM_MULTI_VALUE", enable_wasm_multi_value) - - # Support for WebAssembly shared memory and atomics. # # This affects the JS shell only and here to allow the use of @@ -994,9 +973,9 @@ set_define( # ================================== -@depends(milestone.is_nightly, "--enable-wasm-multi-value") -def default_wasm_exceptions(is_nightly, multi_value): - if multi_value and is_nightly: +@depends(milestone.is_nightly) +def default_wasm_exceptions(is_nightly): + if is_nightly: return True diff --git a/js/public/ContextOptions.h b/js/public/ContextOptions.h index 37992ac909bb..f62ec33c99bb 100644 --- a/js/public/ContextOptions.h +++ b/js/public/ContextOptions.h @@ -28,7 +28,6 @@ class JS_PUBLIC_API ContextOptions { wasmReftypes_(true), wasmFunctionReferences_(false), wasmGc_(false), - wasmMultiValue_(false), wasmSimd_(false), wasmSimdWormhole_(false), wasmExceptions_(false), @@ -120,10 +119,6 @@ class JS_PUBLIC_API ContextOptions { // Defined out-of-line because it depends on a compile-time option ContextOptions& setWasmGc(bool flag); - bool wasmMultiValue() const { return wasmMultiValue_; } - // Defined out-of-line because it depends on a compile-time option - ContextOptions& setWasmMultiValue(bool flag); - bool wasmSimd() const { return wasmSimd_; } // Defined out-of-line because it depends on a compile-time option ContextOptions& setWasmSimd(bool flag); @@ -266,7 +261,6 @@ class JS_PUBLIC_API ContextOptions { bool wasmReftypes_ : 1; bool wasmFunctionReferences_ : 1; bool wasmGc_ : 1; - bool wasmMultiValue_ : 1; bool wasmSimd_ : 1; bool wasmSimdWormhole_ : 1; bool wasmExceptions_ : 1; diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index d4feeaecf53f..aa6cda896bd9 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -855,12 +855,6 @@ static bool WasmExceptionsEnabled(JSContext* cx, unsigned argc, Value* vp) { return true; } -static bool WasmMultiValueEnabled(JSContext* cx, unsigned argc, Value* vp) { - CallArgs args = CallArgsFromVp(argc, vp); - args.rval().setBoolean(wasm::MultiValuesAvailable(cx)); - return true; -} - static bool WasmSimdEnabled(JSContext* cx, unsigned argc, Value* vp) { CallArgs args = CallArgsFromVp(argc, vp); args.rval().setBoolean(wasm::SimdAvailable(cx)); @@ -6953,10 +6947,6 @@ gc::ZealModeHelpText), "wasmGcEnabled()", " Returns a boolean indicating whether the WebAssembly GC types proposal is enabled."), - JS_FN_HELP("wasmMultiValueEnabled", WasmMultiValueEnabled, 1, 0, -"wasmMultiValueEnabled()", -" Returns a boolean indicating whether the WebAssembly multi-value proposal is enabled."), - JS_FN_HELP("wasmExceptionsEnabled", WasmExceptionsEnabled, 1, 0, "wasmExceptionsEnabled()", " Returns a boolean indicating whether the WebAssembly exceptions proposal is enabled."), diff --git a/js/src/jit-test/tests/wasm/binary.js b/js/src/jit-test/tests/wasm/binary.js index 33bd6dc5ecc6..1629236c3d77 100644 --- a/js/src/jit-test/tests/wasm/binary.js +++ b/js/src/jit-test/tests/wasm/binary.js @@ -220,12 +220,8 @@ for (var bad of [0xff, 1, 0x3f]) assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, bad, EndCode]})])])), CompileError, /(invalid .*block type)|(unknown type)/); const multiValueModule = moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, 0, EndCode]})])]); -if (wasmMultiValueEnabled()) { - // In this test module, 0 denotes a void-to-void block type. - assertEq(WebAssembly.validate(multiValueModule), true); -} else { - assertErrorMessage(() => wasmEval(multiValueModule), CompileError, /(invalid .*block type)|(unknown type)/); -} +// In this test module, 0 denotes a void-to-void block type. +assertEq(WebAssembly.validate(multiValueModule), true); // Ensure all invalid opcodes rejected for (let op of undefinedOpcodes) { diff --git a/js/src/jit-test/tests/wasm/features.js b/js/src/jit-test/tests/wasm/features.js index 52ee25cb9269..4581252a63cf 100644 --- a/js/src/jit-test/tests/wasm/features.js +++ b/js/src/jit-test/tests/wasm/features.js @@ -57,7 +57,6 @@ for (let [name, enabled, test] of releasedFeaturesMaybeDisabledAnyway) { } let releasedFeatures = [ - ['multi-value', wasmMultiValueEnabled(), `(module (func (result i32 i32) i32.const 0 i32.const 0))`], ['threads', wasmThreadsEnabled(), `(module (memory 1 1 shared))`], ['reference-types', wasmReftypesEnabled(), `(module (func (param externref)))`], ]; diff --git a/js/src/jit-test/tests/wasm/multi-value/directives.txt b/js/src/jit-test/tests/wasm/multi-value/directives.txt index 882853596403..5ff6359a2c35 100644 --- a/js/src/jit-test/tests/wasm/multi-value/directives.txt +++ b/js/src/jit-test/tests/wasm/multi-value/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=ion; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js; skip-if: !wasmMultiValueEnabled() +|jit-test| test-also=--wasm-compiler=ion; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index c650f986ebe5..0067b401b0e0 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -446,13 +446,6 @@ JS::ContextOptions& JS::ContextOptions::setWasmGc(bool flag) { return *this; } -JS::ContextOptions& JS::ContextOptions::setWasmMultiValue(bool flag) { -#ifdef ENABLE_WASM_MULTI_VALUE - wasmMultiValue_ = flag; -#endif - return *this; -} - JS::ContextOptions& JS::ContextOptions::setWasmSimd(bool flag) { #ifdef ENABLE_WASM_SIMD wasmSimd_ = flag; diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index a04ae981d1af..ab341d1c2ab8 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -602,9 +602,6 @@ bool shell::enableWasmFunctionReferences = false; #ifdef ENABLE_WASM_GC bool shell::enableWasmGc = false; #endif -#ifdef ENABLE_WASM_MULTI_VALUE -bool shell::enableWasmMultiValue = true; -#endif #ifdef ENABLE_WASM_SIMD bool shell::enableWasmSimd = true; #endif @@ -10926,9 +10923,6 @@ static bool SetContextOptions(JSContext* cx, const OptionParser& op) { #ifdef ENABLE_WASM_GC enableWasmGc = op.getBoolOption("wasm-gc"); #endif -#ifdef ENABLE_WASM_MULTI_VALUE - enableWasmMultiValue = !op.getBoolOption("no-wasm-multi-value"); -#endif #ifdef ENABLE_WASM_SIMD enableWasmSimd = !op.getBoolOption("no-wasm-simd"); #endif @@ -10999,9 +10993,6 @@ static bool SetContextOptions(JSContext* cx, const OptionParser& op) { #ifdef ENABLE_WASM_GC .setWasmGc(enableWasmGc) #endif -#ifdef ENABLE_WASM_MULTI_VALUE - .setWasmMultiValue(enableWasmMultiValue) -#endif #ifdef ENABLE_WASM_SIMD .setWasmSimd(enableWasmSimd) #endif @@ -11403,9 +11394,6 @@ static void SetWorkerContextOptions(JSContext* cx) { #ifdef ENABLE_WASM_GC .setWasmGc(enableWasmGc) #endif -#ifdef ENABLE_WASM_MULTI_VALUE - .setWasmMultiValue(enableWasmMultiValue) -#endif #ifdef ENABLE_WASM_SIMD .setWasmSimd(enableWasmSimd) #endif @@ -11925,12 +11913,6 @@ int main(int argc, char** argv, char** envp) { #else !op.addBoolOption('\0', "wasm-gc", "No-op") || #endif -#ifdef ENABLE_WASM_MULTI_VALUE - !op.addBoolOption('\0', "no-wasm-multi-value", - "Disable wasm multi-value features") || -#else - !op.addBoolOption('\0', "no-wasm-multi-value", "No-op") || -#endif #ifdef ENABLE_WASM_SIMD !op.addBoolOption('\0', "no-wasm-simd", "Disable experimental wasm SIMD features") || @@ -12564,7 +12546,6 @@ int main(int argc, char** argv, char** envp) { // Feature selection options "--wasm-gc", "--wasm-simd-wormhole", "--wasm-exceptions", "--wasm-function-references", "--no-wasm-simd", "--no-wasm-reftypes", - "--no-wasm-multi-value", // Compiler selection options "--test-wasm-await-tier2", #ifdef JS_CODEGEN_ARM64 diff --git a/js/src/wasm/WasmCompile.cpp b/js/src/wasm/WasmCompile.cpp index ebcac758236f..a37df7a8cf76 100644 --- a/js/src/wasm/WasmCompile.cpp +++ b/js/src/wasm/WasmCompile.cpp @@ -89,7 +89,6 @@ FeatureArgs FeatureArgs::build(JSContext* cx, const FeatureOptions& options) { features.refTypes = wasm::ReftypesAvailable(cx); features.functionReferences = wasm::FunctionReferencesAvailable(cx); features.gcTypes = wasm::GcTypesAvailable(cx); - features.multiValue = wasm::MultiValuesAvailable(cx); features.v128 = wasm::SimdAvailable(cx) || wormholeOverride; features.hugeMemory = wasm::IsHugeMemoryEnabled(); features.simdWormhole = wormholeOverride; diff --git a/js/src/wasm/WasmConstants.h b/js/src/wasm/WasmConstants.h index b45a4c64dff0..dda7c6f43622 100644 --- a/js/src/wasm/WasmConstants.h +++ b/js/src/wasm/WasmConstants.h @@ -1021,8 +1021,6 @@ static const unsigned MaxTableLimitField = UINT32_MAX; static const unsigned MaxTableLength = 10000000; static const unsigned MaxLocals = 50000; static const unsigned MaxParams = 1000; -// The actual maximum results may be `1` if multi-value is not enabled. Check -// `env->funcMaxResults()` to get the correct value for a module. static const unsigned MaxResults = 1000; static const unsigned MaxStructFields = 1000; static const unsigned MaxMemory32LimitField = 65536; diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp index 825316838c41..8b14cc39639e 100644 --- a/js/src/wasm/WasmJS.cpp +++ b/js/src/wasm/WasmJS.cpp @@ -94,14 +94,6 @@ static inline bool IsFuzzingCranelift(JSContext* cx) { // These functions read flags and apply fuzzing intercession policies. Never go // directly to the flags in code below, always go via these accessors. -static inline bool WasmMultiValueFlag(JSContext* cx) { -#ifdef ENABLE_WASM_MULTI_VALUE - return cx->options().wasmMultiValue(); -#else - return false; -#endif -} - static inline bool WasmSimdFlag(JSContext* cx) { #ifdef ENABLE_WASM_SIMD if (IsFuzzingCranelift(cx)) { @@ -392,10 +384,6 @@ bool wasm::GcTypesAvailable(JSContext* cx) { return WasmGcFlag(cx) && BaselineAvailable(cx); } -bool wasm::MultiValuesAvailable(JSContext* cx) { - return WasmMultiValueFlag(cx) && AnyCompilerAvailable(cx); -} - bool wasm::SimdAvailable(JSContext* cx) { return WasmSimdFlag(cx) && (BaselineAvailable(cx) || IonAvailable(cx) || CraneliftAvailable(cx)); @@ -435,9 +423,7 @@ bool wasm::ThreadsAvailable(JSContext* cx) { bool wasm::ExceptionsAvailable(JSContext* cx) { // Ion & Cranelift do not support Exceptions (for now). - // Exceptions require multi-value. - return WasmExceptionsFlag(cx) && MultiValuesAvailable(cx) && - BaselineAvailable(cx); + return WasmExceptionsFlag(cx) && BaselineAvailable(cx); } bool wasm::HasPlatformSupport(JSContext* cx) { diff --git a/js/src/wasm/WasmJS.h b/js/src/wasm/WasmJS.h index 2fe97d717bb6..4b7979e88aa9 100644 --- a/js/src/wasm/WasmJS.h +++ b/js/src/wasm/WasmJS.h @@ -140,9 +140,6 @@ bool FunctionReferencesAvailable(JSContext* cx); // Experimental (ref T) types and structure types. bool GcTypesAvailable(JSContext* cx); -// Multi-value block and function returns. -bool MultiValuesAvailable(JSContext* cx); - // Shared memory and atomics. bool ThreadsAvailable(JSContext* cx); diff --git a/js/src/wasm/WasmOpIter.h b/js/src/wasm/WasmOpIter.h index 7ed10d8a4706..0e3b2af1fa84 100644 --- a/js/src/wasm/WasmOpIter.h +++ b/js/src/wasm/WasmOpIter.h @@ -1067,11 +1067,6 @@ inline bool OpIter::readBlockType(BlockType* type) { return true; } -#ifdef ENABLE_WASM_MULTI_VALUE - if (!env_.multiValueEnabled()) { - return fail("invalid block type reference"); - } - int32_t x; if (!d_.readVarS32(&x) || x < 0 || uint32_t(x) >= env_.types.length()) { return fail("invalid block type type index"); @@ -1084,9 +1079,6 @@ inline bool OpIter::readBlockType(BlockType* type) { *type = BlockType::Func(env_.types.funcType(x)); return true; -#else - return fail("invalid block type reference"); -#endif } template diff --git a/js/src/wasm/WasmTypes.h b/js/src/wasm/WasmTypes.h index 25ef5b64bfa2..d547b4e61a0d 100644 --- a/js/src/wasm/WasmTypes.h +++ b/js/src/wasm/WasmTypes.h @@ -1272,7 +1272,6 @@ struct FeatureArgs { refTypes(false), functionReferences(false), gcTypes(false), - multiValue(false), v128(false), hugeMemory(false), simdWormhole(false), @@ -1293,7 +1292,6 @@ struct FeatureArgs { bool refTypes; bool functionReferences; bool gcTypes; - bool multiValue; bool v128; bool hugeMemory; bool simdWormhole; @@ -1851,17 +1849,13 @@ class ResultType { enum Kind { EmptyKind = Tagged::ImmediateKind1, SingleKind = Tagged::ImmediateKind2, -#ifdef ENABLE_WASM_MULTI_VALUE VectorKind = Tagged::PointerKind1, -#endif InvalidKind = Tagged::PointerKind2, }; ResultType(Kind kind, uint32_t imm) : tagged_(Tagged::Kind(kind), imm) {} -#ifdef ENABLE_WASM_MULTI_VALUE explicit ResultType(const ValTypeVector* ptr) : tagged_(Tagged::Kind(VectorKind), ptr) {} -#endif Kind kind() const { return Kind(tagged_.kind()); } @@ -1870,12 +1864,10 @@ class ResultType { return ValType(PackedTypeCode::fromBits(tagged_.immediate())); } -#ifdef ENABLE_WASM_MULTI_VALUE const ValTypeVector& values() const { MOZ_ASSERT(kind() == VectorKind); return *tagged_.pointer(); } -#endif public: ResultType() : tagged_(Tagged::Kind(InvalidKind), nullptr) {} @@ -1891,11 +1883,7 @@ class ResultType { case 1: return Single(vals[0]); default: -#ifdef ENABLE_WASM_MULTI_VALUE return ResultType(&vals); -#else - MOZ_CRASH("multi-value returns not supported"); -#endif } } @@ -1906,10 +1894,8 @@ class ResultType { return true; case SingleKind: return out->append(singleValType()); -#ifdef ENABLE_WASM_MULTI_VALUE case VectorKind: return out->appendAll(values()); -#endif default: MOZ_CRASH("bad resulttype"); } @@ -1923,10 +1909,8 @@ class ResultType { return 0; case SingleKind: return 1; -#ifdef ENABLE_WASM_MULTI_VALUE case VectorKind: return values().length(); -#endif default: MOZ_CRASH("bad resulttype"); } @@ -1937,10 +1921,8 @@ class ResultType { case SingleKind: MOZ_ASSERT(i == 0); return singleValType(); -#ifdef ENABLE_WASM_MULTI_VALUE case VectorKind: return values()[i]; -#endif default: MOZ_CRASH("bad resulttype"); } @@ -1952,14 +1934,12 @@ class ResultType { case SingleKind: case InvalidKind: return tagged_.bits() == rhs.tagged_.bits(); -#ifdef ENABLE_WASM_MULTI_VALUE case VectorKind: { if (rhs.kind() != VectorKind) { return false; } return EqualContainers(values(), rhs.values()); } -#endif default: MOZ_CRASH("bad resulttype"); } @@ -1982,17 +1962,13 @@ class BlockType { enum Kind { VoidToVoidKind = Tagged::ImmediateKind1, VoidToSingleKind = Tagged::ImmediateKind2, -#ifdef ENABLE_WASM_MULTI_VALUE FuncKind = Tagged::PointerKind1, FuncResultsKind = Tagged::PointerKind2 -#endif }; BlockType(Kind kind, uint32_t imm) : tagged_(Tagged::Kind(kind), imm) {} -#ifdef ENABLE_WASM_MULTI_VALUE BlockType(Kind kind, const FuncType& type) : tagged_(Tagged::Kind(kind), &type) {} -#endif Kind kind() const { return Kind(tagged_.kind()); } ValType singleValType() const { @@ -2000,9 +1976,7 @@ class BlockType { return ValType(PackedTypeCode::fromBits(tagged_.immediate())); } -#ifdef ENABLE_WASM_MULTI_VALUE const FuncType& funcType() const { return *tagged_.pointer(); } -#endif public: BlockType() @@ -2016,15 +1990,10 @@ class BlockType { return BlockType(VoidToSingleKind, vt.bitsUnsafe()); } static BlockType Func(const FuncType& type) { -#ifdef ENABLE_WASM_MULTI_VALUE if (type.args().length() == 0) { return FuncResults(type); } return BlockType(FuncKind, type); -#else - MOZ_ASSERT(type.args().length() == 0); - return FuncResults(type); -#endif } static BlockType FuncResults(const FuncType& type) { switch (type.results().length()) { @@ -2033,11 +2002,7 @@ class BlockType { case 1: return VoidToSingle(type.results()[0]); default: -#ifdef ENABLE_WASM_MULTI_VALUE return BlockType(FuncResultsKind, type); -#else - MOZ_CRASH("multi-value returns not supported"); -#endif } } @@ -2045,14 +2010,10 @@ class BlockType { switch (kind()) { case VoidToVoidKind: case VoidToSingleKind: -#ifdef ENABLE_WASM_MULTI_VALUE case FuncResultsKind: -#endif return ResultType::Empty(); -#ifdef ENABLE_WASM_MULTI_VALUE case FuncKind: return ResultType::Vector(funcType().args()); -#endif default: MOZ_CRASH("unexpected kind"); } @@ -2064,11 +2025,9 @@ class BlockType { return ResultType::Empty(); case VoidToSingleKind: return ResultType::Single(singleValType()); -#ifdef ENABLE_WASM_MULTI_VALUE case FuncKind: case FuncResultsKind: return ResultType::Vector(funcType().results()); -#endif default: MOZ_CRASH("unexpected kind"); } @@ -2082,12 +2041,10 @@ class BlockType { case VoidToVoidKind: case VoidToSingleKind: return tagged_.bits() == rhs.tagged_.bits(); -#ifdef ENABLE_WASM_MULTI_VALUE case FuncKind: return funcType() == rhs.funcType(); case FuncResultsKind: return EqualContainers(funcType().results(), rhs.funcType().results()); -#endif default: MOZ_CRASH("unexpected kind"); } diff --git a/js/src/wasm/WasmValidate.cpp b/js/src/wasm/WasmValidate.cpp index 12abe9a6f3df..1154432a4e0b 100644 --- a/js/src/wasm/WasmValidate.cpp +++ b/js/src/wasm/WasmValidate.cpp @@ -1836,7 +1836,7 @@ static bool DecodeFuncType(Decoder& d, ModuleEnvironment* env, if (!d.readVarU32(&numResults)) { return d.fail("bad number of function returns"); } - if (numResults > env->funcMaxResults()) { + if (numResults > MaxResults) { return d.fail("too many returns in signature"); } ValTypeVector results; diff --git a/js/src/wasm/WasmValidate.h b/js/src/wasm/WasmValidate.h index 7b0665aef9b7..316f99787fc0 100644 --- a/js/src/wasm/WasmValidate.h +++ b/js/src/wasm/WasmValidate.h @@ -181,7 +181,6 @@ struct ModuleEnvironment { bool refTypesEnabled() const { return features.refTypes; } bool functionReferencesEnabled() const { return features.functionReferences; } bool gcTypesEnabled() const { return features.gcTypes; } - bool multiValueEnabled() const { return features.multiValue; } bool v128Enabled() const { return features.v128; } bool simdWormholeEnabled() const { return features.simdWormhole; } bool hugeMemoryEnabled() const { return !isAsmJS() && features.hugeMemory; } @@ -190,9 +189,6 @@ struct ModuleEnvironment { bool usesSharedMemory() const { return memoryUsage == MemoryUsage::Shared; } bool isAsmJS() const { return kind == ModuleKind::AsmJS; } - uint32_t funcMaxResults() const { - return multiValueEnabled() ? MaxResults : 1; - } bool funcIsImport(uint32_t funcIndex) const { return funcIndex < funcImportGlobalDataOffsets.length(); } diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index c71b19de4ac5..dac291a50d8a 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -928,10 +928,6 @@ static void ReloadPrefsCallback(const char* pref, void* aXpccx) { #ifdef ENABLE_WASM_GC bool useWasmGc = Preferences::GetBool(JS_OPTIONS_DOT_STR "wasm_gc"); #endif -#ifdef ENABLE_WASM_MULTI_VALUE - bool useWasmMultiValue = - Preferences::GetBool(JS_OPTIONS_DOT_STR "wasm_multi_value"); -#endif #ifdef ENABLE_WASM_SIMD bool useWasmSimd = Preferences::GetBool(JS_OPTIONS_DOT_STR "wasm_simd"); #endif @@ -1025,9 +1021,6 @@ static void ReloadPrefsCallback(const char* pref, void* aXpccx) { #ifdef ENABLE_WASM_GC .setWasmGc(useWasmGc) #endif -#ifdef ENABLE_WASM_MULTI_VALUE - .setWasmMultiValue(useWasmMultiValue) -#endif #ifdef ENABLE_WASM_SIMD .setWasmSimd(useWasmSimd) #endif diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index fdfe9d1727b1..9fc3650ff087 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1110,9 +1110,6 @@ pref("javascript.options.wasm_baselinejit", true); pref("javascript.options.wasm_reftypes", true); pref("javascript.options.wasm_gc", false); #endif -#ifdef ENABLE_WASM_MULTI_VALUE - pref("javascript.options.wasm_multi_value", true); -#endif pref("javascript.options.parallel_parsing", true); pref("javascript.options.source_pragmas", true);