From 45c19ce1c59adf465be9764a1209c0c454859cbb Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 19 Sep 2023 16:53:12 +0200 Subject: [PATCH] Issue #2307 - Part 3b: Fix build bustage. --- js/src/jit/none/Lowering-none.h | 7 ------- js/src/wasm/AsmJS.cpp | 25 +++++-------------------- js/src/wasm/WasmInstance.cpp | 2 +- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/js/src/jit/none/Lowering-none.h b/js/src/jit/none/Lowering-none.h index 64f85e4573..5fe6c7268f 100644 --- a/js/src/jit/none/Lowering-none.h +++ b/js/src/jit/none/Lowering-none.h @@ -86,14 +86,7 @@ class LIRGeneratorNone : public LIRGeneratorShared LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) { MOZ_CRASH(); } LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); } - void visitSimdSelect(MSimdSelect* ins) { MOZ_CRASH(); } - void visitSimdSplat(MSimdSplat* ins) { MOZ_CRASH(); } - void visitSimdSwizzle(MSimdSwizzle* ins) { MOZ_CRASH(); } - void visitSimdShuffle(MSimdShuffle* ins) { MOZ_CRASH(); } - void visitSimdValueX4(MSimdValueX4* lir) { MOZ_CRASH(); } void visitSubstr(MSubstr*) { MOZ_CRASH(); } - void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) { MOZ_CRASH(); } - void visitSimdBinarySaturating(MSimdBinarySaturating* ins) { MOZ_CRASH(); } void visitRandom(js::jit::MRandom*) { MOZ_CRASH(); } void visitCopySign(js::jit::MCopySign*) { MOZ_CRASH(); } void visitWasmTruncateToInt64(MWasmTruncateToInt64*) { MOZ_CRASH(); } diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 26642d05b5..03c40ab268 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -813,7 +813,6 @@ class NumLit NumLit(Which w, const Value& v) : which_(w) { u.scalar_ = v; - MOZ_ASSERT(!isSimd()); } Which which() const { @@ -2117,7 +2116,7 @@ IsFloatLiteral(ModuleValidator& m, ParseNode* pn) } static bool -IsNumericLiteral(ModuleValidator& m, ParseNode* pn, bool* isSimd = nullptr); +IsNumericLiteral(ModuleValidator& m, ParseNode* pn); static NumLit ExtractNumericLiteral(ModuleValidator& m, ParseNode* pn); @@ -2126,7 +2125,7 @@ static inline bool IsLiteralInt(ModuleValidator& m, ParseNode* pn, uint32_t* u32); static bool -IsNumericLiteral(ModuleValidator& m, ParseNode* pn, bool* isSimd) +IsNumericLiteral(ModuleValidator& m, ParseNode* pn) { if (IsNumericNonFloatLiteral(pn) || IsFloatLiteral(m, pn)) return true; @@ -2319,10 +2318,6 @@ class MOZ_STACK_CLASS FunctionValidator /***************************************************** Attributes */ - void setUsesSimd() { - fg_.setUsesSimd(); - } - void setUsesAtomics() { fg_.setUsesAtomics(); } @@ -3051,13 +3046,9 @@ IsLiteralOrConst(FunctionValidator& f, ParseNode* pn, NumLit* lit) return true; } - bool isSimd = false; - if (!IsNumericLiteral(f.m(), pn, &isSimd)) + if (!IsNumericLiteral(f.m(), pn)) return false; - if (isSimd) - f.setUsesSimd(); - *lit = ExtractNumericLiteral(f.m(), pn); return true; } @@ -4318,10 +4309,7 @@ CheckCoercedCall(FunctionValidator& f, ParseNode* call, Type ret, Type* type) JS_CHECK_RECURSION_DONT_REPORT(f.cx(), return f.m().failOverRecursed()); - bool isSimd = false; - if (IsNumericLiteral(f.m(), call, &isSimd)) { - if (isSimd) - f.setUsesSimd(); + if (IsNumericLiteral(f.m(), call)) { NumLit lit = ExtractNumericLiteral(f.m(), call); if (!f.writeConstExpr(lit)) return false; @@ -4852,10 +4840,7 @@ CheckExpr(FunctionValidator& f, ParseNode* expr, Type* type) { JS_CHECK_RECURSION_DONT_REPORT(f.cx(), return f.m().failOverRecursed()); - bool isSimd = false; - if (IsNumericLiteral(f.m(), expr, &isSimd)) { - if (isSimd) - f.setUsesSimd(); + if (IsNumericLiteral(f.m(), expr)) { return CheckNumericLiteral(f, expr, type); } diff --git a/js/src/wasm/WasmInstance.cpp b/js/src/wasm/WasmInstance.cpp index 40197c6ed1..888919523d 100644 --- a/js/src/wasm/WasmInstance.cpp +++ b/js/src/wasm/WasmInstance.cpp @@ -160,7 +160,7 @@ Instance::callImport(JSContext* cx, uint32_t funcImportIndex, unsigned argc, con break; } default: { - MOZ_ASSERT("unhandled type in callImport"); + MOZ_CRASH("unhandled type in callImport"); return false; } }