mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036781 - Part 12: Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/src/jit. r=jandem
This commit is contained in:
parent
90dee2447d
commit
a59b2cc2f6
@ -1597,7 +1597,7 @@ CodeGenerator::visitMoveGroup(LMoveGroup *group)
|
||||
case LDefinition::DOUBLE: moveType = MoveOp::DOUBLE; break;
|
||||
case LDefinition::INT32X4: moveType = MoveOp::INT32X4; break;
|
||||
case LDefinition::FLOAT32X4: moveType = MoveOp::FLOAT32X4; break;
|
||||
default: MOZ_ASSUME_UNREACHABLE("Unexpected move type");
|
||||
default: MOZ_CRASH("Unexpected move type");
|
||||
}
|
||||
|
||||
if (!resolver.addMove(toMoveOperand(from), toMoveOperand(to), moveType))
|
||||
@ -2209,7 +2209,7 @@ CodeGenerator::visitCallNative(LCallNative *call)
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
// Test for failure.
|
||||
@ -2455,7 +2455,7 @@ CodeGenerator::visitCallGeneric(LCallGeneric *call)
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
masm.bind(&end);
|
||||
@ -2555,7 +2555,7 @@ CodeGenerator::visitCallKnown(LCallKnown *call)
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
masm.bind(&end);
|
||||
@ -3779,7 +3779,7 @@ ShouldInitFixedSlots(LInstruction *lir, JSObject *templateObj)
|
||||
iter = block->begin();
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Shouldn't get here");
|
||||
MOZ_CRASH("Shouldn't get here");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -4664,7 +4664,7 @@ CodeGenerator::visitMathFunctionD(LMathFunctionD *ins)
|
||||
funptr = JS_FUNC_TO_DATA_PTR(void *, js::math_round_impl);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown math function");
|
||||
MOZ_CRASH("Unknown math function");
|
||||
}
|
||||
|
||||
# undef MAYBE_CACHED
|
||||
@ -4689,7 +4689,7 @@ CodeGenerator::visitMathFunctionF(LMathFunctionF *ins)
|
||||
case MMathFunction::Round: funptr = JS_FUNC_TO_DATA_PTR(void *, math_roundf_impl); break;
|
||||
case MMathFunction::Ceil: funptr = JS_FUNC_TO_DATA_PTR(void *, ceilf); break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown or unsupported float32 math function");
|
||||
MOZ_CRASH("Unknown or unsupported float32 math function");
|
||||
}
|
||||
|
||||
masm.callWithABI(funptr, MoveOp::FLOAT32);
|
||||
@ -4754,7 +4754,7 @@ CodeGenerator::visitBinaryV(LBinaryV *lir)
|
||||
return callVM(UrshInfo, lir);
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected binary op");
|
||||
MOZ_CRASH("Unexpected binary op");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4887,7 +4887,7 @@ CodeGenerator::visitCompareVM(LCompareVM *lir)
|
||||
return callVM(GeInfo, lir);
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected compare op");
|
||||
MOZ_CRASH("Unexpected compare op");
|
||||
}
|
||||
}
|
||||
|
||||
@ -5254,7 +5254,7 @@ ConcatFatInlineString(MacroAssembler &masm, Register lhs, Register rhs, Register
|
||||
masm.pop(temp1);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
// Store length and flags.
|
||||
@ -5375,7 +5375,7 @@ JitCompartment::generateStringConcatStub(JSContext *cx, ExecutionMode mode)
|
||||
masm.pop(temp1);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
// Store rope length and flags. temp1 still holds the result of AND'ing the
|
||||
@ -7020,7 +7020,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints)
|
||||
// turn on barriers.
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
// Attach any generated script counts to the script.
|
||||
@ -7301,7 +7301,7 @@ CodeGenerator::addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Regi
|
||||
return addCache(ins, allocateCache(cache));
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
|
||||
MOZ_CRASH("Bad execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7322,7 +7322,7 @@ CodeGenerator::addSetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Regi
|
||||
return addCache(ins, allocateCache(cache));
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
|
||||
MOZ_CRASH("Bad execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7347,7 +7347,7 @@ CodeGenerator::addSetElementCache(LInstruction *ins, Register obj, Register unbo
|
||||
return addCache(ins, allocateCache(cache));
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
|
||||
MOZ_CRASH("Bad execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7445,7 +7445,7 @@ CodeGenerator::addGetElementCache(LInstruction *ins, Register obj, ConstantOrReg
|
||||
return addCache(ins, allocateCache(cache));
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -7824,7 +7824,7 @@ CodeGenerator::visitBitOpV(LBitOpV *lir)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected bitop");
|
||||
MOZ_CRASH("unexpected bitop");
|
||||
}
|
||||
|
||||
class OutOfLineTypeOfV : public OutOfLineCodeBase<CodeGenerator>
|
||||
@ -8725,7 +8725,7 @@ CodeGenerator::visitProfilerStackOp(LProfilerStackOp *lir)
|
||||
return true;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("invalid LProfilerStackOp type");
|
||||
MOZ_CRASH("invalid LProfilerStackOp type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,6 @@ class CompactBufferReader
|
||||
if (!(byte & 1))
|
||||
return val;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unreachable");
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -22,7 +22,7 @@ HasIonScript(JSScript *script, ExecutionMode cmode)
|
||||
case ParallelExecution: return script->hasParallelIonScript();
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline IonScript *
|
||||
@ -33,7 +33,7 @@ GetIonScript(JSScript *script, ExecutionMode cmode)
|
||||
case ParallelExecution: return script->maybeParallelIonScript();
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline void
|
||||
@ -44,7 +44,7 @@ SetIonScript(JSScript *script, ExecutionMode cmode, IonScript *ionScript)
|
||||
case ParallelExecution: script->setParallelIonScript(ionScript); return;
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
@ -55,7 +55,7 @@ OffsetOfIonInJSScript(ExecutionMode cmode)
|
||||
case ParallelExecution: return JSScript::offsetOfParallelIonScript();
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
@ -68,8 +68,7 @@ CanIonCompile(JSScript *script, ExecutionMode cmode)
|
||||
case ArgumentsUsageAnalysis: return true;
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
return false;
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
@ -80,7 +79,7 @@ CompilingOffThread(JSScript *script, ExecutionMode cmode)
|
||||
case ParallelExecution: return script->isParallelIonCompilingOffThread();
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
static inline bool
|
||||
@ -91,7 +90,7 @@ CompilingOffThread(HandleScript script, ExecutionMode cmode)
|
||||
case ParallelExecution: return script->isParallelIonCompilingOffThread();
|
||||
default:;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
} // namespace jit
|
||||
|
@ -314,7 +314,7 @@ class JitRuntime
|
||||
switch (mode) {
|
||||
case SequentialExecution: return bailoutHandler_;
|
||||
case ParallelExecution: return parallelBailoutHandler_;
|
||||
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
default: MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ class JitRuntime
|
||||
switch (mode) {
|
||||
case SequentialExecution: return argumentsRectifier_;
|
||||
case ParallelExecution: return parallelArgumentsRectifier_;
|
||||
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
default: MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ class JitCompartment
|
||||
switch (mode) {
|
||||
case SequentialExecution: return stringConcatStub_;
|
||||
case ParallelExecution: return parallelStringConcatStub_;
|
||||
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
default: MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -351,7 +351,7 @@ class JitcodeGlobalEntry
|
||||
queryEntry().destroy();
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid JitcodeGlobalEntry kind.");
|
||||
MOZ_CRASH("Invalid JitcodeGlobalEntry kind.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ class JitcodeGlobalEntry
|
||||
case IonCache:
|
||||
return ionCacheEntry().callStackAtAddr(rt, ptr, results, depth);
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid JitcodeGlobalEntry kind.");
|
||||
MOZ_CRASH("Invalid JitcodeGlobalEntry kind.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -6022,19 +6022,19 @@ class LPhi MOZ_FINAL : public LInstruction
|
||||
return 0;
|
||||
}
|
||||
LDefinition *getTemp(size_t index) {
|
||||
MOZ_ASSUME_UNREACHABLE("no temps");
|
||||
MOZ_CRASH("no temps");
|
||||
}
|
||||
void setTemp(size_t index, const LDefinition &temp) {
|
||||
MOZ_ASSUME_UNREACHABLE("no temps");
|
||||
MOZ_CRASH("no temps");
|
||||
}
|
||||
size_t numSuccessors() const {
|
||||
return 0;
|
||||
}
|
||||
MBasicBlock *getSuccessor(size_t i) const {
|
||||
MOZ_ASSUME_UNREACHABLE("no successors");
|
||||
MOZ_CRASH("no successors");
|
||||
}
|
||||
void setSuccessor(size_t i, MBasicBlock *) {
|
||||
MOZ_ASSUME_UNREACHABLE("no successors");
|
||||
MOZ_CRASH("no successors");
|
||||
}
|
||||
|
||||
virtual void printInfo(FILE *fp) {
|
||||
@ -6355,19 +6355,19 @@ class LAsmJSCall MOZ_FINAL : public LInstruction
|
||||
return 0;
|
||||
}
|
||||
LDefinition *getTemp(size_t index) {
|
||||
MOZ_ASSUME_UNREACHABLE("no temps");
|
||||
MOZ_CRASH("no temps");
|
||||
}
|
||||
void setTemp(size_t index, const LDefinition &a) {
|
||||
MOZ_ASSUME_UNREACHABLE("no temps");
|
||||
MOZ_CRASH("no temps");
|
||||
}
|
||||
size_t numSuccessors() const {
|
||||
return 0;
|
||||
}
|
||||
MBasicBlock *getSuccessor(size_t i) const {
|
||||
MOZ_ASSUME_UNREACHABLE("no successors");
|
||||
MOZ_CRASH("no successors");
|
||||
}
|
||||
void setSuccessor(size_t i, MBasicBlock *) {
|
||||
MOZ_ASSUME_UNREACHABLE("no successors");
|
||||
MOZ_CRASH("no successors");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -408,7 +408,7 @@ PrintUse(char *buf, size_t size, const LUse *use)
|
||||
JS_snprintf(buf, size, "v%d:**", use->virtualRegister());
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("invalid use policy");
|
||||
MOZ_CRASH("invalid use policy");
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ LAllocation::toString() const
|
||||
PrintUse(buf, sizeof(buf), toUse());
|
||||
return buf;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("what?");
|
||||
MOZ_CRASH("what?");
|
||||
}
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
@ -574,7 +574,7 @@ class LDefinition
|
||||
case MIRType_Float32x4:
|
||||
return LDefinition::FLOAT32X4;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -754,7 +754,7 @@ class LInstructionVisitor
|
||||
{}
|
||||
|
||||
public:
|
||||
#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); }
|
||||
#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_CRASH("NYI: " #op); }
|
||||
LIR_OPCODE_LIST(VISIT_INS)
|
||||
#undef VISIT_INS
|
||||
};
|
||||
|
@ -1042,7 +1042,7 @@ LIRGenerator::visitCompare(MCompare *comp)
|
||||
return define(lir, comp);
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Unrecognized compare type.");
|
||||
MOZ_CRASH("Unrecognized compare type.");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -1789,7 +1789,7 @@ LIRGenerator::visitToDouble(MToDouble *convert)
|
||||
default:
|
||||
// Objects might be effectful. Symbols will throw.
|
||||
// Strings are complicated - we don't handle them yet.
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1839,7 +1839,7 @@ LIRGenerator::visitToFloat32(MToFloat32 *convert)
|
||||
default:
|
||||
// Objects might be effectful. Symbols will throw.
|
||||
// Strings are complicated - we don't handle them yet.
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1890,11 +1890,11 @@ LIRGenerator::visitToInt32(MToInt32 *convert)
|
||||
case MIRType_Object:
|
||||
case MIRType_Undefined:
|
||||
// Objects might be effectful. Symbols throw. Undefined coerces to NaN, not int32.
|
||||
MOZ_ASSUME_UNREACHABLE("ToInt32 invalid input type");
|
||||
MOZ_CRASH("ToInt32 invalid input type");
|
||||
return false;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1932,7 +1932,7 @@ LIRGenerator::visitTruncateToInt32(MTruncateToInt32 *truncate)
|
||||
default:
|
||||
// Objects might be effectful. Symbols throw.
|
||||
// Strings are complicated - we don't handle them yet.
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1991,7 +1991,7 @@ LIRGenerator::visitToString(MToString *ins)
|
||||
|
||||
default:
|
||||
// Float32, symbols, and objects are not supported.
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2210,7 +2210,7 @@ LIRGenerator::visitLoadSlot(MLoadSlot *ins)
|
||||
|
||||
case MIRType_Undefined:
|
||||
case MIRType_Null:
|
||||
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
|
||||
MOZ_CRASH("typed load must have a payload");
|
||||
|
||||
default:
|
||||
return define(new(alloc()) LLoadSlotT(useRegister(ins->slots())), ins);
|
||||
@ -2316,7 +2316,7 @@ LIRGenerator::visitStoreSlot(MStoreSlot *ins)
|
||||
return add(new(alloc()) LStoreSlotT(useRegister(ins->slots()), useRegister(ins->value())), ins);
|
||||
|
||||
case MIRType_Float32:
|
||||
MOZ_ASSUME_UNREACHABLE("Float32 shouldn't be stored in a slot.");
|
||||
MOZ_CRASH("Float32 shouldn't be stored in a slot.");
|
||||
|
||||
default:
|
||||
return add(new(alloc()) LStoreSlotT(useRegister(ins->slots()), useRegisterOrConstant(ins->value())),
|
||||
@ -2559,7 +2559,7 @@ LIRGenerator::visitNot(MNot *ins)
|
||||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected MIRType.");
|
||||
MOZ_CRASH("Unexpected MIRType.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2635,7 +2635,7 @@ LIRGenerator::visitLoadElement(MLoadElement *ins)
|
||||
}
|
||||
case MIRType_Undefined:
|
||||
case MIRType_Null:
|
||||
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
|
||||
MOZ_CRASH("typed load must have a payload");
|
||||
|
||||
default:
|
||||
{
|
||||
@ -2743,7 +2743,7 @@ LIRGenerator::visitArrayPopShift(MArrayPopShift *ins)
|
||||
}
|
||||
case MIRType_Undefined:
|
||||
case MIRType_Null:
|
||||
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
|
||||
MOZ_CRASH("typed load must have a payload");
|
||||
|
||||
default:
|
||||
{
|
||||
@ -2864,7 +2864,7 @@ LIRGenerator::visitClampToUint8(MClampToUint8 *ins)
|
||||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3171,7 +3171,7 @@ LIRGenerator::visitAssertRange(MAssertRange *ins)
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected Range for MIRType");
|
||||
MOZ_CRASH("Unexpected Range for MIRType");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3577,7 +3577,7 @@ LIRGenerator::visitAsmJSReturn(MAsmJSReturn *ins)
|
||||
else if (rval->type() == MIRType_Int32)
|
||||
lir->setOperand(0, useFixed(rval, ReturnReg));
|
||||
else
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected asm.js return type");
|
||||
MOZ_CRASH("Unexpected asm.js return type");
|
||||
return add(lir);
|
||||
}
|
||||
|
||||
@ -3707,8 +3707,7 @@ LIRGenerator::visitSimdConstant(MSimdConstant *ins)
|
||||
if (ins->type() == MIRType_Float32x4)
|
||||
return define(new(alloc()) LFloat32x4(), ins);
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown SIMD kind when generating constant");
|
||||
return false;
|
||||
MOZ_CRASH("Unknown SIMD kind when generating constant");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3729,8 +3728,7 @@ LIRGenerator::visitSimdExtractElement(MSimdExtractElement *ins)
|
||||
return define(new(alloc()) LSimdExtractElementF(use, ins->lane()), ins);
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown SIMD kind when extracting element");
|
||||
return false;
|
||||
MOZ_CRASH("Unknown SIMD kind when extracting element");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3786,8 +3784,7 @@ LIRGenerator::visitSimdBinaryArith(MSimdBinaryArith *ins)
|
||||
return lowerForFPU(add, ins, ins->lhs(), ins->rhs());
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown SIMD kind when adding values");
|
||||
return false;
|
||||
MOZ_CRASH("Unknown SIMD kind when adding values");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3978,7 +3975,7 @@ bool
|
||||
LIRGenerator::visitPhi(MPhi *phi)
|
||||
{
|
||||
// Phi nodes are not lowered because they are only meaningful for the register allocator.
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected Phi node during Lowering.");
|
||||
MOZ_CRASH("Unexpected Phi node during Lowering.");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3986,19 +3983,19 @@ LIRGenerator::visitBeta(MBeta *beta)
|
||||
{
|
||||
// Beta nodes are supposed to be removed before because they are
|
||||
// only used to carry the range information for Range analysis
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected Beta node during Lowering.");
|
||||
MOZ_CRASH("Unexpected Beta node during Lowering.");
|
||||
}
|
||||
|
||||
bool
|
||||
LIRGenerator::visitObjectState(MObjectState *objState)
|
||||
{
|
||||
// ObjectState nodes are always recovered on bailouts
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected ObjectState node during Lowering.");
|
||||
MOZ_CRASH("Unexpected ObjectState node during Lowering.");
|
||||
}
|
||||
|
||||
bool
|
||||
LIRGenerator::visitArrayState(MArrayState *objState)
|
||||
{
|
||||
// ArrayState nodes are always recovered on bailouts
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected ArrayState node during Lowering.");
|
||||
MOZ_CRASH("Unexpected ArrayState node during Lowering.");
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ Range::Range(const MDefinition *def)
|
||||
wrapAroundToBoolean();
|
||||
break;
|
||||
case MIRType_None:
|
||||
MOZ_ASSUME_UNREACHABLE("Asking for the range of an instruction with no value");
|
||||
MOZ_CRASH("Asking for the range of an instruction with no value");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -514,7 +514,7 @@ Range::Range(const MDefinition *def)
|
||||
setInt32(0, 1);
|
||||
break;
|
||||
case MIRType_None:
|
||||
MOZ_ASSUME_UNREACHABLE("Asking for the range of an instruction with no value");
|
||||
MOZ_CRASH("Asking for the range of an instruction with no value");
|
||||
default:
|
||||
setUnknown();
|
||||
break;
|
||||
|
@ -29,8 +29,7 @@ using namespace js::jit;
|
||||
bool
|
||||
MNode::writeRecoverData(CompactBufferWriter &writer) const
|
||||
{
|
||||
MOZ_ASSUME_UNREACHABLE("This instruction is not serializable");
|
||||
return false;
|
||||
MOZ_CRASH("This instruction is not serializable");
|
||||
}
|
||||
|
||||
void
|
||||
@ -50,8 +49,7 @@ RInstruction::readRecoverData(CompactBufferReader &reader, RInstructionStorage *
|
||||
|
||||
case Recover_Invalid:
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad decoding of the previous instruction?");
|
||||
break;
|
||||
MOZ_CRASH("Bad decoding of the previous instruction?");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +136,7 @@ RResumePoint::RResumePoint(CompactBufferReader &reader)
|
||||
bool
|
||||
RResumePoint::recover(JSContext *cx, SnapshotIterator &iter) const
|
||||
{
|
||||
MOZ_ASSUME_UNREACHABLE("This instruction is not recoverable.");
|
||||
MOZ_CRASH("This instruction is not recoverable.");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -852,8 +850,7 @@ MMathFunction::writeRecoverData(CompactBufferWriter &writer) const
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_Round));
|
||||
return true;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown math function.");
|
||||
return false;
|
||||
MOZ_CRASH("Unknown math function.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ RValueAllocation::layoutFromMode(Mode mode)
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Wrong mode type?");
|
||||
MOZ_CRASH("Wrong mode type?");
|
||||
}
|
||||
|
||||
// Pad serialized RValueAllocations by a multiple of X bytes in the allocation
|
||||
@ -401,7 +401,7 @@ ValTypeToString(JSValueType type)
|
||||
case JSVAL_TYPE_MAGIC:
|
||||
return "magic";
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("no payload");
|
||||
MOZ_CRASH("no payload");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ ComparePolicy::adjustInputs(TempAllocator &alloc, MInstruction *def)
|
||||
replace = MUnbox::New(alloc, in, MIRType_String, MUnbox::Infallible);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown compare specialization");
|
||||
MOZ_CRASH("Unknown compare specialization");
|
||||
}
|
||||
|
||||
def->block()->insertBefore(def, replace);
|
||||
@ -726,7 +726,7 @@ StoreTypedArrayPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
|
||||
value = boxAt(alloc, ins, value);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected type");
|
||||
MOZ_CRASH("Unexpected type");
|
||||
}
|
||||
|
||||
if (value != curValue) {
|
||||
@ -769,7 +769,7 @@ StoreTypedArrayPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid array type");
|
||||
MOZ_CRASH("Invalid array type");
|
||||
}
|
||||
|
||||
if (value != curValue)
|
||||
|
@ -98,7 +98,7 @@ TypedObjectPrediction::addProto(const TypedProto &proto)
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad predictionKind");
|
||||
MOZ_CRASH("Bad predictionKind");
|
||||
}
|
||||
|
||||
type::Kind
|
||||
@ -119,7 +119,7 @@ TypedObjectPrediction::kind() const
|
||||
return prefix().descr->kind();
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -137,7 +137,7 @@ TypedObjectPrediction::ofArrayKind() const
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad kind");
|
||||
MOZ_CRASH("Bad kind");
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -172,7 +172,7 @@ TypedObjectPrediction::hasKnownSize(int32_t *out) const
|
||||
// The prototype does not track the precise dimensions of arrays.
|
||||
return false;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown kind");
|
||||
MOZ_CRASH("Unknown kind");
|
||||
|
||||
case TypedObjectPrediction::Descr:
|
||||
return DescrHasKnownSize(descr(), out);
|
||||
@ -183,7 +183,7 @@ TypedObjectPrediction::hasKnownSize(int32_t *out) const
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
const TypedProto *
|
||||
@ -206,7 +206,7 @@ TypedObjectPrediction::getKnownPrototype() const
|
||||
case type::UnsizedArray:
|
||||
return &proto();
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid proto().kind()");
|
||||
MOZ_CRASH("Invalid proto().kind()");
|
||||
|
||||
case TypedObjectPrediction::Descr:
|
||||
if (descr().is<ComplexTypeDescr>())
|
||||
@ -219,7 +219,7 @@ TypedObjectPrediction::getKnownPrototype() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -242,7 +242,7 @@ TypedObjectPrediction::extractType() const
|
||||
break; // Prefixes are always structs, never scalars etc
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
ScalarTypeDescr::Type
|
||||
@ -288,7 +288,7 @@ TypedObjectPrediction::hasKnownArrayLength(int32_t *length) const
|
||||
case TypedObjectPrediction::Prefix:
|
||||
break; // Prefixes are always structs, never arrays
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
static TypeDescr &
|
||||
@ -316,7 +316,7 @@ TypedObjectPrediction::arrayElementType() const
|
||||
case TypedObjectPrediction::Prefix:
|
||||
break; // Prefixes are always structs, never arrays
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -369,5 +369,5 @@ TypedObjectPrediction::hasFieldNamed(jsid id,
|
||||
*prefix().descr, prefix().fields,
|
||||
id, fieldOffset, fieldType, fieldIndex);
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
|
||||
MOZ_CRASH("Bad prediction kind");
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ ScaleFromElemWidth(int shift)
|
||||
return TimesEight;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid scale");
|
||||
MOZ_CRASH("Invalid scale");
|
||||
}
|
||||
|
||||
// Used for 32-bit immediates which do not require relocation.
|
||||
@ -93,7 +93,7 @@ struct Imm32
|
||||
case TimesEight:
|
||||
return Imm32(3);
|
||||
};
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid scale");
|
||||
MOZ_CRASH("Invalid scale");
|
||||
}
|
||||
|
||||
static inline Imm32 FactorOf(enum Scale s) {
|
||||
|
@ -19,7 +19,7 @@ ToInt32(const LAllocation *a)
|
||||
return a->toConstant()->toInt32();
|
||||
if (a->isConstantIndex())
|
||||
return a->toConstantIndex()->index();
|
||||
MOZ_ASSUME_UNREACHABLE("this is not a constant!");
|
||||
MOZ_CRASH("this is not a constant!");
|
||||
}
|
||||
|
||||
static inline double
|
||||
|
@ -479,7 +479,7 @@ CodeGeneratorShared::assignBailoutId(LSnapshot *snapshot)
|
||||
switch (gen->info().executionMode()) {
|
||||
case SequentialExecution: break;
|
||||
case ParallelExecution: return false;
|
||||
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
default: MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
JS_ASSERT(frameClass_ != FrameSizeClass::None());
|
||||
|
@ -2265,7 +2265,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *ins)
|
||||
// These operations are not part of the spec. so are not implemented.
|
||||
break;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected SIMD op");
|
||||
MOZ_CRASH("unexpected SIMD op");
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2296,7 +2296,7 @@ CodeGeneratorX86Shared::visitSimdBinaryCompFx4(LSimdBinaryCompFx4 *ins)
|
||||
masm.cmpps(rhs, lhs, 0x6);
|
||||
return true;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected SIMD op");
|
||||
MOZ_CRASH("unexpected SIMD op");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -240,7 +240,7 @@ struct AssemblerBuffer
|
||||
return BufferOffset(bufferSize);
|
||||
}
|
||||
BufferOffset prevOffset() const {
|
||||
MOZ_ASSUME_UNREACHABLE("Don't current record lastInstSize");
|
||||
MOZ_CRASH("Don't current record lastInstSize");
|
||||
}
|
||||
|
||||
// Break the instruction stream so we can go back and edit it at this point
|
||||
|
@ -859,7 +859,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
|
||||
return pi->finalPos - pi->size + headerSize_ * InstSize + offset;
|
||||
offset -= size;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Entry is not in a pool");
|
||||
MOZ_CRASH("Entry is not in a pool");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -372,7 +372,7 @@ CodeGeneratorX64::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
||||
label = masm.loadRipRelativeFloat32x4(ToFloatRegister(ins->output()));
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
@ -407,7 +407,7 @@ CodeGeneratorX64::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
||||
label = masm.storeRipRelativeFloat32x4(ToFloatRegister(ins->value()));
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
}
|
||||
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
|
@ -484,7 +484,7 @@ CodeGeneratorX86::visitAsmJSLoadGlobalVar(LAsmJSLoadGlobalVar *ins)
|
||||
label = masm.movapsWithPatch(PatchedAbsoluteAddress(), ToFloatRegister(ins->output()));
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitAsmJSLoadGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
@ -518,7 +518,7 @@ CodeGeneratorX86::visitAsmJSStoreGlobalVar(LAsmJSStoreGlobalVar *ins)
|
||||
label = masm.movapsWithPatch(ToFloatRegister(ins->value()), PatchedAbsoluteAddress());
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
MOZ_CRASH("unexpected type in visitAsmJSStoreGlobalVar");
|
||||
}
|
||||
masm.append(AsmJSGlobalAccess(label, mir->globalDataOffset()));
|
||||
return true;
|
||||
|
@ -291,7 +291,7 @@ GetGCKindSlots(AllocKind thingKind)
|
||||
case FINALIZE_OBJECT16_BACKGROUND:
|
||||
return 16;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad object finalize kind");
|
||||
MOZ_CRASH("Bad object finalize kind");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ types::TypeString(Type type)
|
||||
case JSVAL_TYPE_MAGIC:
|
||||
return "lazyargs";
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad type");
|
||||
MOZ_CRASH("Bad type");
|
||||
}
|
||||
}
|
||||
if (type.isUnknown())
|
||||
@ -357,7 +357,7 @@ TypeSet::mightBeMIRType(jit::MIRType type)
|
||||
// same join point in GuessPhiType.
|
||||
return false;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad MIR type");
|
||||
MOZ_CRASH("Bad MIR type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ PrimitiveTypeFlag(JSValueType type)
|
||||
case JSVAL_TYPE_MAGIC:
|
||||
return TYPE_FLAG_LAZYARGS;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad type");
|
||||
MOZ_CRASH("Bad JSValueType");
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ TypeFlagPrimitive(TypeFlags flags)
|
||||
case TYPE_FLAG_LAZYARGS:
|
||||
return JSVAL_TYPE_MAGIC;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad type");
|
||||
MOZ_CRASH("Bad TypeFlags");
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ GetClassForProtoKey(JSProtoKey key)
|
||||
return &DataViewObject::class_;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad proto key");
|
||||
MOZ_CRASH("Bad proto key");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user