Back out 805ac89b5924 (Bug 1036781) for 52% regression on AWFY's asmjs-ubench-skinning.

This commit is contained in:
Chris Peterson 2014-07-11 16:01:11 -07:00
parent cde5832a37
commit 660b24439f
98 changed files with 524 additions and 494 deletions

View File

@ -145,7 +145,7 @@ public:
MOZ_ASSERT(m_otherCodeBytes < m_allocation.size);
break;
default:
MOZ_CRASH("bad code kind");
MOZ_ASSUME_UNREACHABLE("bad code kind");
}
release();
@ -180,7 +180,7 @@ private:
case BASELINE_CODE: m_baselineCodeBytes += n; break;
case REGEXP_CODE: m_regexpCodeBytes += n; break;
case OTHER_CODE: m_otherCodeBytes += n; break;
default: MOZ_CRASH("bad code kind");
default: MOZ_ASSUME_UNREACHABLE("bad code kind");
}
return result;
}

View File

@ -44,8 +44,8 @@
(void)variable; \
ASSERT(assertion); \
} while (0)
#define ASSERT_NOT_REACHED() MOZ_CRASH("WTF: ASSERT_NOT_REACHED")
#define CRASH() MOZ_CRASH("WTF: CRASH")
#define ASSERT_NOT_REACHED() MOZ_ASSUME_UNREACHABLE("wtf/Assertions.h")
#define CRASH() MOZ_CRASH()
#define COMPILE_ASSERT(exp, name) static_assert(exp, #name)
#endif /* assembler_wtf_Assertions_h */

View File

@ -457,7 +457,7 @@ class Type
case Void:
return MIRType_None;
}
MOZ_CRASH("Invalid Type");
MOZ_ASSUME_UNREACHABLE("Invalid Type");
}
const char *toChars() const {
@ -474,7 +474,7 @@ class Type
case Intish: return "intish";
case Void: return "void";
}
MOZ_CRASH("Invalid Type");
MOZ_ASSUME_UNREACHABLE("Invalid Type");
}
};
@ -518,7 +518,7 @@ class RetType
case Float: // will be converted to a Double
case Double: return AsmJSModule::Return_Double;
}
MOZ_CRASH("Unexpected return type");
MOZ_ASSUME_UNREACHABLE("Unexpected return type");
}
MIRType toMIRType() const {
switch (which_) {
@ -527,7 +527,7 @@ class RetType
case Double: return MIRType_Double;
case Float: return MIRType_Float32;
}
MOZ_CRASH("Unexpected return type");
MOZ_ASSUME_UNREACHABLE("Unexpected return type");
}
bool operator==(RetType rhs) const { return which_ == rhs.which_; }
bool operator!=(RetType rhs) const { return which_ != rhs.which_; }
@ -592,7 +592,7 @@ class VarType
case Double: return MIRType_Double;
case Float: return MIRType_Float32;
}
MOZ_CRASH("VarType can only be Int, Double or Float");
MOZ_ASSUME_UNREACHABLE("VarType can only be Int, Double or Float");
}
AsmJSCoercion toCoercion() const {
switch(which_) {
@ -600,7 +600,7 @@ class VarType
case Double: return AsmJS_ToNumber;
case Float: return AsmJS_FRound;
}
MOZ_CRASH("VarType can only be Int, Double or Float");
MOZ_ASSUME_UNREACHABLE("VarType can only be Int, Double or Float");
}
static VarType FromCheckedType(Type type) {
JS_ASSERT(type.isInt() || type.isMaybeDouble() || type.isFloatish());
@ -626,7 +626,7 @@ operator<=(Type lhs, VarType rhs)
case VarType::Double: return lhs.isDouble();
case VarType::Float: return lhs.isFloat();
}
MOZ_CRASH("Unexpected rhs type");
MOZ_ASSUME_UNREACHABLE("Unexpected rhs type");
}
/*****************************************************************************/
@ -738,7 +738,7 @@ TypedArrayLoadType(Scalar::Type viewType)
return Type::MaybeDouble;
default:;
}
MOZ_CRASH("Unexpected array type");
MOZ_ASSUME_UNREACHABLE("Unexpected array type");
}
enum NeedsBoundsCheck {
@ -1634,7 +1634,7 @@ class NumLit
return VarType::Float;
case NumLit::OutOfRangeInt:;
}
MOZ_CRASH("Unexpected NumLit type");
MOZ_ASSUME_UNREACHABLE("Unexpected NumLit type");
}
};
@ -1773,7 +1773,7 @@ IsLiteralInt(ModuleCompiler &m, ParseNode *pn, uint32_t *u32)
return false;
}
MOZ_CRASH("Bad literal type");
MOZ_ASSUME_UNREACHABLE("Bad literal type");
}
/*****************************************************************************/
@ -3041,7 +3041,7 @@ CheckGlobalDotImport(ModuleCompiler &m, PropertyName *varName, ParseNode *initNo
default:
break;
}
MOZ_CRASH("unexpected or uninitialized math builtin type");
MOZ_ASSUME_UNREACHABLE("unexpected or uninitialized math builtin type");
}
if (IsUseOfName(base, m.module().globalArgumentName())) {
@ -3509,7 +3509,7 @@ CheckStoreArray(FunctionCompiler &f, ParseNode *lhs, ParseNode *rhs, MDefinition
return f.failf(lhs, "%s is not a subtype of float? or double?", rhsType.toChars());
break;
default:
MOZ_CRASH("Unexpected view type");
MOZ_ASSUME_UNREACHABLE("Unexpected view type");
}
f.storeHeap(viewType, pointerDef, rhsDef, needsBoundsCheck);
@ -3979,7 +3979,7 @@ CheckMathFRound(FunctionCompiler &f, ParseNode *callNode, RetType retType, MDefi
return true;
}
MOZ_CRASH("return value of fround is ignored");
MOZ_ASSUME_UNREACHABLE("return value of fround is ignored");
}
static bool
@ -4023,7 +4023,7 @@ CheckMathBuiltinCall(FunctionCompiler &f, ParseNode *callNode, AsmJSMathBuiltinF
case AsmJSMathBuiltin_log: arity = 1; doubleCallee = AsmJSImm_LogD; floatCallee = AsmJSImm_Invalid; break;
case AsmJSMathBuiltin_pow: arity = 2; doubleCallee = AsmJSImm_PowD; floatCallee = AsmJSImm_Invalid; break;
case AsmJSMathBuiltin_atan2: arity = 2; doubleCallee = AsmJSImm_ATan2D; floatCallee = AsmJSImm_Invalid; break;
default: MOZ_CRASH("unexpected mathBuiltin function");
default: MOZ_ASSUME_UNREACHABLE("unexpected mathBuiltin function");
}
if (retType == RetType::Float && floatCallee == AsmJSImm_Invalid)
@ -4311,7 +4311,7 @@ IsValidIntMultiplyConstant(ModuleCompiler &m, ParseNode *expr)
return false;
}
MOZ_CRASH("Bad literal");
MOZ_ASSUME_UNREACHABLE("Bad literal");
}
static bool
@ -4527,7 +4527,7 @@ CheckBitwise(FunctionCompiler &f, ParseNode *bitwise, MDefinition **def, Type *t
case PNK_LSH: identityElement = 0; onlyOnRight = true; *type = Type::Signed; break;
case PNK_RSH: identityElement = 0; onlyOnRight = true; *type = Type::Signed; break;
case PNK_URSH: identityElement = 0; onlyOnRight = true; *type = Type::Unsigned; break;
default: MOZ_CRASH("not a bitwise op");
default: MOZ_ASSUME_UNREACHABLE("not a bitwise op");
}
uint32_t i;
@ -4574,7 +4574,7 @@ CheckBitwise(FunctionCompiler &f, ParseNode *bitwise, MDefinition **def, Type *t
case PNK_LSH: *def = f.bitwise<MLsh>(lhsDef, rhsDef); break;
case PNK_RSH: *def = f.bitwise<MRsh>(lhsDef, rhsDef); break;
case PNK_URSH: *def = f.bitwise<MUrsh>(lhsDef, rhsDef); break;
default: MOZ_CRASH("not a bitwise op");
default: MOZ_ASSUME_UNREACHABLE("not a bitwise op");
}
return true;
@ -6182,6 +6182,7 @@ FillArgumentArray(ModuleCompiler &m, const VarTypeVector &argTypes,
masm.canonicalizeDouble(ScratchDoubleReg);
masm.storeDouble(ScratchDoubleReg, dstAddr);
}
break;
}
}
}
@ -6284,7 +6285,8 @@ GenerateFFIInterpreterExit(ModuleCompiler &m, const ModuleCompiler::ExitDescript
masm.loadDouble(argv, ReturnDoubleReg);
break;
case RetType::Float:
MOZ_CRASH("Float32 shouldn't be returned from a FFI");
MOZ_ASSUME_UNREACHABLE("Float32 shouldn't be returned from a FFI");
break;
}
// Note: the caller is IonMonkey code which means there are no non-volatile
@ -6508,7 +6510,8 @@ GenerateFFIIonExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &exit
masm.convertValueToDouble(JSReturnOperand, ReturnDoubleReg, &oolConvert);
break;
case RetType::Float:
MOZ_CRASH("Float shouldn't be returned from a FFI");
MOZ_ASSUME_UNREACHABLE("Float shouldn't be returned from a FFI");
break;
}
Label done;
@ -6576,7 +6579,7 @@ GenerateFFIIonExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &exit
masm.loadDouble(Address(StackPointer, offsetToArgv), ReturnDoubleReg);
break;
default:
MOZ_CRASH("Unsupported convert type");
MOZ_ASSUME_UNREACHABLE("Unsupported convert type");
}
masm.jump(&done);

View File

@ -576,7 +576,8 @@ AddressOf(AsmJSImmKind kind, ExclusiveContext *cx)
break;
}
MOZ_CRASH("Bad AsmJSImmKind");
MOZ_ASSUME_UNREACHABLE("Bad AsmJSImmKind");
return nullptr;
}
void
@ -1272,10 +1273,10 @@ AsmJSModule::protectCode(JSRuntime *rt) const
#if defined(XP_WIN)
DWORD oldProtect;
if (!VirtualProtect(codeBase(), functionBytes(), PAGE_NOACCESS, &oldProtect))
MOZ_CRASH("PAGE_NOACESS failed");
MOZ_CRASH();
#else // assume Unix
if (mprotect(codeBase(), functionBytes(), PROT_NONE))
MOZ_CRASH("PROT_NONE");
MOZ_CRASH();
#endif
}
@ -1293,10 +1294,10 @@ AsmJSModule::unprotectCode(JSRuntime *rt) const
#if defined(XP_WIN)
DWORD oldProtect;
if (!VirtualProtect(codeBase(), functionBytes(), PAGE_EXECUTE_READWRITE, &oldProtect))
MOZ_CRASH("PAGE_EXECUTE_READWRITE failed");
MOZ_CRASH();
#else // assume Unix
if (mprotect(codeBase(), functionBytes(), PROT_READ | PROT_WRITE | PROT_EXEC))
MOZ_CRASH("PROT_READ | PROT_WRITE | PROT_EXEC failed");
MOZ_CRASH();
#endif
}

View File

@ -1267,7 +1267,7 @@ BacktrackingAllocator::populateSafepoints()
break;
#endif
default:
MOZ_CRASH("Bad register type");
MOZ_ASSUME_UNREACHABLE("Bad register type");
}
}
}
@ -1506,7 +1506,7 @@ BacktrackingAllocator::computeSpillWeight(const LiveInterval *interval)
default:
// Note: RECOVERED_INPUT will not appear in UsePositionIterator.
MOZ_CRASH("Bad use");
MOZ_ASSUME_UNREACHABLE("Bad use");
}
}

View File

@ -1724,7 +1724,7 @@ jit::FinishBailoutToBaseline(BaselineBailoutInfo *bailoutInfo)
// baseline frame.
return false;
default:
MOZ_CRASH("Unknown bailout kind!");
MOZ_ASSUME_UNREACHABLE("Unknown bailout kind!");
}
if (!CheckFrequentBailouts(cx, outerScript))

View File

@ -1361,7 +1361,7 @@ BaselineCompiler::storeValue(const StackValue *source, const Address &dest,
masm.storeValue(scratch, dest);
break;
default:
MOZ_CRASH("Invalid kind");
MOZ_ASSUME_UNREACHABLE("Invalid kind");
}
}

View File

@ -251,7 +251,7 @@ ICEntryKindToString(ICEntry::Kind kind)
case ICEntry::Kind_DebugEpilogue:
return "debug epilogue";
default:
MOZ_CRASH("bad ICEntry kind");
MOZ_ASSUME_UNREACHABLE("bad ICEntry kind");
}
}
@ -610,7 +610,7 @@ CloneOldBaselineStub(JSContext *cx, DebugModeOSREntryVector &entries, size_t ent
#undef CASE_KIND
default:
MOZ_CRASH("Bad stub kind");
MOZ_ASSUME_UNREACHABLE("Bad stub kind");
}
if (!entry.newStub)
@ -707,7 +707,7 @@ BaselineDebugModeOSRInfo::popValueInto(PCMappingSlotInfo::SlotLocation loc, Valu
case PCMappingSlotInfo::SlotIgnore:
break;
default:
MOZ_CRASH("Bad slot location");
MOZ_ASSUME_UNREACHABLE("Bad slot location");
}
stackAdjust++;

View File

@ -46,7 +46,7 @@ FrameInfo::sync(StackValue *val)
masm.pushValue(val->constant());
break;
default:
MOZ_CRASH("Invalid kind");
MOZ_ASSUME_UNREACHABLE("Invalid kind");
}
val->setStack();
@ -102,7 +102,7 @@ FrameInfo::popValue(ValueOperand dest)
masm.moveValue(val->reg(), dest);
break;
default:
MOZ_CRASH("Invalid kind");
MOZ_ASSUME_UNREACHABLE("Invalid kind");
}
// masm.popValue already adjusted the stack pointer, don't do it twice.
@ -138,7 +138,7 @@ FrameInfo::popRegsAndSync(uint32_t uses)
break;
}
default:
MOZ_CRASH("Invalid uses");
MOZ_ASSUME_UNREACHABLE("Invalid uses");
}
}
@ -175,7 +175,7 @@ FrameInfo::assertValidState(const BytecodeInfo &info)
JS_ASSERT(!usedR1);
usedR1 = true;
} else {
MOZ_CRASH("Invalid register");
MOZ_ASSUME_UNREACHABLE("Invalid register");
}
}
}

View File

@ -253,7 +253,7 @@ ICStub::trace(JSTracer *trc)
case 2: setElemStub->toImpl<2>()->traceShapes(trc); break;
case 3: setElemStub->toImpl<3>()->traceShapes(trc); break;
case 4: setElemStub->toImpl<4>()->traceShapes(trc); break;
default: MOZ_CRASH("Invalid proto stub.");
default: MOZ_ASSUME_UNREACHABLE("Invalid proto stub.");
}
break;
}
@ -348,7 +348,7 @@ ICStub::trace(JSTracer *trc)
case 6: propStub->toImpl<6>()->traceShapes(trc); break;
case 7: propStub->toImpl<7>()->traceShapes(trc); break;
case 8: propStub->toImpl<8>()->traceShapes(trc); break;
default: MOZ_CRASH("Invalid proto stub.");
default: MOZ_ASSUME_UNREACHABLE("Invalid proto stub.");
}
break;
}
@ -415,7 +415,7 @@ ICStub::trace(JSTracer *trc)
case 2: propStub->toImpl<2>()->traceShapes(trc); break;
case 3: propStub->toImpl<3>()->traceShapes(trc); break;
case 4: propStub->toImpl<4>()->traceShapes(trc); break;
default: MOZ_CRASH("Invalid proto stub.");
default: MOZ_ASSUME_UNREACHABLE("Invalid proto stub.");
}
break;
}
@ -827,7 +827,7 @@ EnsureCanEnterIon(JSContext *cx, ICUseCount_Fallback *stub, BaselineFrame *frame
else if (stat == Method_Compiled)
IonSpew(IonSpew_BaselineOSR, " Compiled with Ion!");
else
MOZ_CRASH("Invalid MethodStatus!");
MOZ_ASSUME_UNREACHABLE("Invalid MethodStatus!");
// Failed to compile. Reset use count and return.
if (stat != Method_Compiled) {
@ -1544,7 +1544,7 @@ DoTypeUpdateFallback(JSContext *cx, BaselineFrame *frame, ICUpdatedStub *stub, H
break;
}
default:
MOZ_CRASH("Invalid stub");
MOZ_ASSUME_UNREACHABLE("Invalid stub");
}
return stub->addUpdateStubForValue(cx, script, obj, id, value);
@ -2590,7 +2590,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
break;
}
default:
MOZ_CRASH("Unhandled baseline arith op");
MOZ_ASSUME_UNREACHABLE("Unhandled baseline arith op");
}
// Check if debug mode toggling made the stub invalid.
@ -2914,7 +2914,7 @@ ICBinaryArith_Double::Compiler::generateStubCode(MacroAssembler &masm)
JS_ASSERT(ReturnDoubleReg == FloatReg0);
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
}
masm.boxDouble(FloatReg0, R0);
@ -2992,7 +2992,7 @@ ICBinaryArith_BooleanWithInt32::Compiler::generateStubCode(MacroAssembler &masm)
break;
}
default:
MOZ_CRASH("Unhandled op for BinaryArith_BooleanWithInt32.");
MOZ_ASSUME_UNREACHABLE("Unhandled op for BinaryArith_BooleanWithInt32.");
}
// Failure case - jump to next stub
@ -3054,7 +3054,7 @@ ICBinaryArith_DoubleWithInt32::Compiler::generateStubCode(MacroAssembler &masm)
masm.andPtr(intReg, intReg2);
break;
default:
MOZ_CRASH("Unhandled op for BinaryArith_DoubleWithInt32.");
MOZ_ASSUME_UNREACHABLE("Unhandled op for BinaryArith_DoubleWithInt32.");
}
masm.tagValue(JSVAL_TYPE_INT32, intReg2, R0);
EmitReturnFromIC(masm);
@ -3098,7 +3098,7 @@ DoUnaryArithFallback(JSContext *cx, BaselineFrame *frame, ICUnaryArith_Fallback
return false;
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
}
// Check if debug mode toggling made the stub invalid.
@ -3736,7 +3736,7 @@ RemoveExistingGetElemNativeStubs(JSContext *cx, ICGetElem_Fallback *stub, Handle
// Should never get here, because this means a matching stub exists, and if
// a matching stub exists, this procedure should never have been called.
MOZ_CRASH("Procedure should never have been called.");
MOZ_ASSUME_UNREACHABLE("Procedure should never have been called.");
}
}
@ -5342,7 +5342,7 @@ ICSetElemDenseAddCompiler::getStub(ICStubSpace *space)
case 2: stub = getStubSpecific<2>(space, &shapes); break;
case 3: stub = getStubSpecific<3>(space, &shapes); break;
case 4: stub = getStubSpecific<4>(space, &shapes); break;
default: MOZ_CRASH("ProtoChainDepth too high.");
default: MOZ_ASSUME_UNREACHABLE("ProtoChainDepth too high.");
}
if (!stub || !stub->initUpdatingChain(cx, space))
return nullptr;
@ -6695,7 +6695,7 @@ ICGetProp_Primitive::Compiler::generateStubCode(MacroAssembler &masm)
masm.branchTestBoolean(Assembler::NotEqual, R0, &failure);
break;
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
GeneralRegisterSet regs(availableGeneralRegs(1));
@ -6850,7 +6850,7 @@ ICGetPropNativeDoesNotExistCompiler::getStub(ICStubSpace *space)
case 6: stub = getStubSpecific<6>(space, &shapes); break;
case 7: stub = getStubSpecific<7>(space, &shapes); break;
case 8: stub = getStubSpecific<8>(space, &shapes); break;
default: MOZ_CRASH("ProtoChainDepth too high.");
default: MOZ_ASSUME_UNREACHABLE("ProtoChainDepth too high.");
}
if (!stub)
return nullptr;
@ -7729,7 +7729,7 @@ ICSetPropNativeAddCompiler::getStub(ICStubSpace *space)
case 2: stub = getStubSpecific<2>(space, &shapes); break;
case 3: stub = getStubSpecific<3>(space, &shapes); break;
case 4: stub = getStubSpecific<4>(space, &shapes); break;
default: MOZ_CRASH("ProtoChainDepth too high.");
default: MOZ_ASSUME_UNREACHABLE("ProtoChainDepth too high.");
}
if (!stub || !stub->initUpdatingChain(cx, space))
return nullptr;
@ -10028,7 +10028,7 @@ ICTypeOf_Typed::Compiler::generateStubCode(MacroAssembler &masm)
break;
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
masm.movePtr(ImmGCPtr(typeString_), R0.scratchReg());

View File

@ -597,7 +597,7 @@ class ICStub
IC_STUB_KIND_LIST(DEF_KIND_STR)
#undef DEF_KIND_STR
default:
MOZ_CRASH("Invalid kind.");
MOZ_ASSUME_UNREACHABLE("Invalid kind.");
}
}
@ -1132,7 +1132,7 @@ class ICStubCompiler
regs.take(R1);
break;
default:
MOZ_CRASH("Invalid numInputs");
MOZ_ASSUME_UNREACHABLE("Invalid numInputs");
}
return regs;
@ -3308,7 +3308,8 @@ class ICGetElemNativeCompiler : public ICStubCompiler
getter_, pcOffset_, holder_, holderShape);
}
MOZ_CRASH("Invalid kind.");
MOZ_ASSUME_UNREACHABLE("Invalid kind.");
return nullptr;
}
};

View File

@ -552,7 +552,7 @@ BaselineScript::icEntryFromPCOffset(uint32_t pcOffset)
if (icEntry(i).isForOp())
return icEntry(i);
}
MOZ_CRASH("Invalid PC offset for IC entry.");
MOZ_ASSUME_UNREACHABLE("Invalid PC offset for IC entry.");
}
ICEntry &
@ -695,7 +695,7 @@ BaselineScript::nativeCodeForPC(JSScript *script, jsbytecode *pc, PCMappingSlotI
curPC += GetBytecodeLength(curPC);
}
MOZ_CRASH("Invalid pc");
MOZ_ASSUME_UNREACHABLE("Invalid pc");
}
jsbytecode *
@ -739,7 +739,7 @@ BaselineScript::pcForReturnOffset(JSScript *script, uint32_t nativeOffset)
curPC += GetBytecodeLength(curPC);
}
MOZ_CRASH("Invalid pc");
MOZ_ASSUME_UNREACHABLE("Invalid pc");
}
jsbytecode *

View File

@ -1552,7 +1552,7 @@ CodeGenerator::visitMoveGroup(LMoveGroup *group)
case LDefinition::INT32: moveType = MoveOp::INT32; break;
case LDefinition::FLOAT32: moveType = MoveOp::FLOAT32; break;
case LDefinition::DOUBLE: moveType = MoveOp::DOUBLE; break;
default: MOZ_CRASH("Unexpected move type");
default: MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
if (!resolver.addMove(toMoveOperand(from), toMoveOperand(to), moveType))
@ -2140,7 +2140,7 @@ CodeGenerator::visitCallNative(LCallNative *call)
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
// Test for failure.
@ -2386,7 +2386,7 @@ CodeGenerator::visitCallGeneric(LCallGeneric *call)
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
masm.bind(&end);
@ -2486,7 +2486,7 @@ CodeGenerator::visitCallKnown(LCallKnown *call)
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
masm.bind(&end);
@ -3669,7 +3669,7 @@ ShouldInitFixedSlots(LInstruction *lir, JSObject *templateObj)
iter = block->begin();
}
MOZ_CRASH("Shouldn't get here");
MOZ_ASSUME_UNREACHABLE("Shouldn't get here");
}
bool
@ -4551,7 +4551,7 @@ CodeGenerator::visitMathFunctionD(LMathFunctionD *ins)
funptr = JS_FUNC_TO_DATA_PTR(void *, js::math_round_impl);
break;
default:
MOZ_CRASH("Unknown math function");
MOZ_ASSUME_UNREACHABLE("Unknown math function");
}
# undef MAYBE_CACHED
@ -4576,7 +4576,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_CRASH("Unknown or unsupported float32 math function");
MOZ_ASSUME_UNREACHABLE("Unknown or unsupported float32 math function");
}
masm.callWithABI(funptr, MoveOp::FLOAT32);
@ -4641,7 +4641,7 @@ CodeGenerator::visitBinaryV(LBinaryV *lir)
return callVM(UrshInfo, lir);
default:
MOZ_CRASH("Unexpected binary op");
MOZ_ASSUME_UNREACHABLE("Unexpected binary op");
}
}
@ -4774,7 +4774,7 @@ CodeGenerator::visitCompareVM(LCompareVM *lir)
return callVM(GeInfo, lir);
default:
MOZ_CRASH("Unexpected compare op");
MOZ_ASSUME_UNREACHABLE("Unexpected compare op");
}
}
@ -5141,7 +5141,7 @@ ConcatFatInlineString(MacroAssembler &masm, Register lhs, Register rhs, Register
masm.pop(temp1);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
// Store length and flags.
@ -5262,7 +5262,7 @@ JitCompartment::generateStringConcatStub(JSContext *cx, ExecutionMode mode)
masm.pop(temp1);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
// Store rope length and flags. temp1 still holds the result of AND'ing the
@ -6809,7 +6809,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints)
// turn on barriers.
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
// Attach any generated script counts to the script.
@ -7087,7 +7087,7 @@ CodeGenerator::addGetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Regi
return addCache(ins, allocateCache(cache));
}
default:
MOZ_CRASH("Bad execution mode");
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
}
}
@ -7108,7 +7108,7 @@ CodeGenerator::addSetPropertyCache(LInstruction *ins, RegisterSet liveRegs, Regi
return addCache(ins, allocateCache(cache));
}
default:
MOZ_CRASH("Bad execution mode");
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
}
}
@ -7133,7 +7133,7 @@ CodeGenerator::addSetElementCache(LInstruction *ins, Register obj, Register unbo
return addCache(ins, allocateCache(cache));
}
default:
MOZ_CRASH("Bad execution mode");
MOZ_ASSUME_UNREACHABLE("Bad execution mode");
}
}
@ -7231,7 +7231,7 @@ CodeGenerator::addGetElementCache(LInstruction *ins, Register obj, ConstantOrReg
return addCache(ins, allocateCache(cache));
}
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -7610,7 +7610,7 @@ CodeGenerator::visitBitOpV(LBitOpV *lir)
default:
break;
}
MOZ_CRASH("unexpected bitop");
MOZ_ASSUME_UNREACHABLE("unexpected bitop");
}
class OutOfLineTypeOfV : public OutOfLineCodeBase<CodeGenerator>
@ -8458,7 +8458,7 @@ CodeGenerator::visitProfilerStackOp(LProfilerStackOp *lir)
return true;
default:
MOZ_CRASH("invalid LProfilerStackOp type");
MOZ_ASSUME_UNREACHABLE("invalid LProfilerStackOp type");
}
}

View File

@ -43,7 +43,7 @@ class CompactBufferReader
if (!(byte & 1))
return val;
}
MOZ_CRASH("unreachable");
MOZ_ASSUME_UNREACHABLE("unreachable");
}
public:

View File

@ -24,7 +24,7 @@ HasIonScript(JSScript *script, ExecutionMode cmode)
case ParallelExecution: return script->hasParallelIonScript();
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
static inline IonScript *
@ -35,7 +35,7 @@ GetIonScript(JSScript *script, ExecutionMode cmode)
case ParallelExecution: return script->maybeParallelIonScript();
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
static inline void
@ -46,7 +46,7 @@ SetIonScript(JSScript *script, ExecutionMode cmode, IonScript *ionScript)
case ParallelExecution: script->setParallelIonScript(ionScript); return;
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
static inline size_t
@ -57,7 +57,7 @@ OffsetOfIonInJSScript(ExecutionMode cmode)
case ParallelExecution: return JSScript::offsetOfParallelIonScript();
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
static inline bool
@ -70,7 +70,7 @@ CanIonCompile(JSScript *script, ExecutionMode cmode)
case ArgumentsUsageAnalysis: return true;
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
return false;
}
@ -82,7 +82,7 @@ CompilingOffThread(JSScript *script, ExecutionMode cmode)
case ParallelExecution: return script->isParallelIonCompilingOffThread();
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
static inline bool
@ -93,7 +93,7 @@ CompilingOffThread(HandleScript script, ExecutionMode cmode)
case ParallelExecution: return script->isParallelIonCompilingOffThread();
default:;
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
} // namespace jit

View File

@ -468,7 +468,7 @@ jit::RequestInterruptForIonCode(JSRuntime *rt, JSRuntime::InterruptMode mode)
break;
default:
MOZ_CRASH("Bad interrupt mode");
MOZ_ASSUME_UNREACHABLE("Bad interrupt mode");
}
}
@ -1136,7 +1136,7 @@ IonScript::getSafepointIndex(uint32_t disp) const
}
}
MOZ_CRASH("displacement not found.");
MOZ_ASSUME_UNREACHABLE("displacement not found.");
}
const OsiIndex *
@ -1150,7 +1150,7 @@ IonScript::getOsiIndex(uint32_t disp) const
return it;
}
MOZ_CRASH("Failed to find OSI point return address");
MOZ_ASSUME_UNREACHABLE("Failed to find OSI point return address");
}
const OsiIndex *
@ -1650,7 +1650,7 @@ GenerateLIR(MIRGenerator *mir)
}
default:
MOZ_CRASH("Bad regalloc");
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
}
if (mir->shouldCancel("Allocate Registers"))
@ -2541,7 +2541,7 @@ InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
break;
case JitFrame_Unwound_IonJS:
case JitFrame_Unwound_BaselineStub:
MOZ_CRASH("invalid");
MOZ_ASSUME_UNREACHABLE("invalid");
case JitFrame_Unwound_Rectifier:
IonSpew(IonSpew_Invalidate, "#%d unwound rectifier frame @ %p", frameno, it.fp());
break;
@ -2785,7 +2785,7 @@ jit::Invalidate(JSContext *cx, JSScript *script, ExecutionMode mode, bool resetU
return false;
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
Invalidate(cx, scripts, resetUses, cancelOffThread);
@ -2838,7 +2838,7 @@ jit::FinishInvalidation(FreeOp *fop, JSScript *script)
return;
default:
MOZ_CRASH("bad execution mode");
MOZ_ASSUME_UNREACHABLE("bad execution mode");
}
}
@ -2899,10 +2899,10 @@ jit::ForbidCompilation(JSContext *cx, JSScript *script, ExecutionMode mode)
return;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
AutoFlushICache *

View File

@ -726,7 +726,7 @@ TypeAnalyzer::replaceRedundantPhi(MPhi *phi)
v = MagicValue(JS_OPTIMIZED_OUT);
break;
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
MConstant *c = MConstant::New(alloc(), v);
// The instruction pass will insert the box

View File

@ -1374,7 +1374,7 @@ IonBuilder::snoopControlFlow(JSOp op)
default:
// Hard assert for now - make an error later.
MOZ_CRASH("unknown goto case");
MOZ_ASSUME_UNREACHABLE("unknown goto case");
}
break;
}
@ -1385,7 +1385,7 @@ IonBuilder::snoopControlFlow(JSOp op)
case JSOP_IFNE:
// We should never reach an IFNE, it's a stopAt point, which will
// trigger closing the loop.
MOZ_CRASH("we should never reach an ifne!");
MOZ_ASSUME_UNREACHABLE("we should never reach an ifne!");
default:
break;
@ -1662,7 +1662,7 @@ IonBuilder::inspectOpcode(JSOp op)
case JSOP_LOOPHEAD:
// JSOP_LOOPHEAD is handled when processing the loop header.
MOZ_CRASH("JSOP_LOOPHEAD outside loop");
MOZ_ASSUME_UNREACHABLE("JSOP_LOOPHEAD outside loop");
case JSOP_GETELEM:
case JSOP_CALLELEM:
@ -1871,7 +1871,7 @@ IonBuilder::processCfgEntry(CFGState &state)
return processTryEnd(state);
default:
MOZ_CRASH("unknown cfgstate");
MOZ_ASSUME_UNREACHABLE("unknown cfgstate");
}
}
@ -2579,7 +2579,7 @@ IonBuilder::processSwitchBreak(JSOp op)
breaks = &state.condswitch.breaks;
break;
default:
MOZ_CRASH("Unexpected switch state.");
MOZ_ASSUME_UNREACHABLE("Unexpected switch state.");
}
*breaks = new(alloc()) DeferredEdge(current, *breaks);
@ -2658,7 +2658,7 @@ IonBuilder::maybeLoop(JSOp op, jssrcnote *sn)
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return ControlStatus_None;
@ -2688,7 +2688,7 @@ IonBuilder::assertValidLoopHeadOp(jsbytecode *pc)
break;
default:
MOZ_CRASH("JSOP_LOOPHEAD unexpected source note");
MOZ_ASSUME_UNREACHABLE("JSOP_LOOPHEAD unexpected source note");
}
// Make sure this loop goes to the same ifne as the loop header's
@ -3585,7 +3585,7 @@ IonBuilder::jsop_ifeq(JSOp op)
}
default:
MOZ_CRASH("unexpected source note type");
MOZ_ASSUME_UNREACHABLE("unexpected source note type");
}
// Switch to parsing the true branch. Note that no PC update is needed,
@ -3706,7 +3706,8 @@ IonBuilder::processReturn(JSOp op)
break;
default:
MOZ_CRASH("unknown return op");
def = nullptr;
MOZ_ASSUME_UNREACHABLE("unknown return op");
}
if (instrumentedProfiling() && inliningDepth_ == 0) {
@ -3825,7 +3826,7 @@ IonBuilder::jsop_bitop(JSOp op)
break;
default:
MOZ_CRASH("unexpected bitop");
MOZ_ASSUME_UNREACHABLE("unexpected bitop");
}
current->add(ins);
@ -3882,7 +3883,7 @@ IonBuilder::jsop_binary(JSOp op, MDefinition *left, MDefinition *right)
break;
default:
MOZ_CRASH("unexpected binary opcode");
MOZ_ASSUME_UNREACHABLE("unexpected binary opcode");
}
current->add(ins);
@ -4228,7 +4229,7 @@ IonBuilder::selectInliningTargets(ObjectVector &targets, CallInfo &callInfo, Boo
inlineable = true;
break;
default:
MOZ_CRASH("Unhandled InliningDecision value!");
MOZ_ASSUME_UNREACHABLE("Unhandled InliningDecision value!");
}
// Enforce a maximum inlined bytecode limit at the callsite.
@ -6535,7 +6536,7 @@ jit::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *input
return types->unknown() || (inputTypes && inputTypes->isSubset(types));
default:
MOZ_CRASH("Bad input type");
MOZ_ASSUME_UNREACHABLE("Bad input type");
}
}
@ -6819,10 +6820,10 @@ IonBuilder::getElemTryTypedObject(bool *emitted, MDefinition *obj, MDefinition *
return true;
case type::UnsizedArray:
MOZ_CRASH("Unsized arrays cannot be element types");
MOZ_ASSUME_UNREACHABLE("Unsized arrays cannot be element types");
}
MOZ_CRASH("Bad kind");
MOZ_ASSUME_UNREACHABLE("Bad kind");
}
static MIRType
@ -7564,7 +7565,7 @@ MIRTypeForTypedArrayRead(Scalar::Type arrayType, bool observedDouble)
default:
break;
}
MOZ_CRASH("Unknown typed array type");
MOZ_ASSUME_UNREACHABLE("Unknown typed array type");
}
bool
@ -7632,7 +7633,7 @@ IonBuilder::jsop_getelem_typed(MDefinition *obj, MDefinition *index,
barrier = BarrierKind::NoBarrier;
break;
default:
MOZ_CRASH("Unknown typed array type");
MOZ_ASSUME_UNREACHABLE("Unknown typed array type");
}
// Assume we will read out-of-bound values. In this case the
@ -7730,7 +7731,7 @@ IonBuilder::setElemTryTypedObject(bool *emitted, MDefinition *obj,
elemSize);
}
MOZ_CRASH("Bad kind");
MOZ_ASSUME_UNREACHABLE("Bad kind");
}
bool
@ -7993,7 +7994,7 @@ IonBuilder::jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion convers
break;
default:
MOZ_CRASH("Unknown double conversion");
MOZ_ASSUME_UNREACHABLE("Unknown double conversion");
}
bool writeHole = false;
@ -8799,10 +8800,10 @@ IonBuilder::getPropTryTypedObject(bool *emitted,
resultTypes);
case type::UnsizedArray:
MOZ_CRASH("Field of unsized array type");
MOZ_ASSUME_UNREACHABLE("Field of unsized array type");
}
MOZ_CRASH("Bad kind");
MOZ_ASSUME_UNREACHABLE("Bad kind");
}
bool
@ -9436,7 +9437,7 @@ IonBuilder::setPropTryTypedObject(bool *emitted, MDefinition *obj,
value, fieldPrediction);
}
MOZ_CRASH("Unknown kind");
MOZ_ASSUME_UNREACHABLE("Unknown kind");
}
bool

View File

@ -1242,7 +1242,7 @@ GetPropertyIC::tryAttachNative(JSContext *cx, HandleScript outerScript, IonScrip
attachKind = "array length";
break;
default:
MOZ_CRASH("Bad NativeGetPropCacheability");
MOZ_ASSUME_UNREACHABLE("Bad NativeGetPropCacheability");
}
return linkAndAttachStub(cx, masm, attacher, ion, attachKind);
}
@ -4159,7 +4159,7 @@ IsCacheableNonGlobalScopeChain(JSObject *scopeChain, JSObject *holder)
}
}
MOZ_CRASH("Invalid scope chain");
MOZ_ASSUME_UNREACHABLE("Invalid scope chain");
}
JSObject *

View File

@ -47,7 +47,7 @@ class IonCacheVisitor
public:
#define VISIT_INS(op) \
virtual bool visit##op##IC(CodeGenerator *codegen) { \
MOZ_CRASH("NYI: " #op "IC"); \
MOZ_ASSUME_UNREACHABLE("NYI: " #op "IC"); \
}
IONCACHE_KIND_LIST(VISIT_INS)

View File

@ -283,7 +283,7 @@ SizeOfFramePrefix(FrameType type)
case JitFrame_Exit:
return IonExitFrameLayout::Size();
default:
MOZ_CRASH("unknown frame type");
MOZ_ASSUME_UNREACHABLE("unknown frame type");
}
}
@ -454,7 +454,7 @@ HandleExceptionIon(JSContext *cx, const InlineFrameIterator &frame, ResumeFromEx
break;
default:
MOZ_CRASH("Unexpected try note");
MOZ_ASSUME_UNREACHABLE("Unexpected try note");
}
}
}
@ -515,7 +515,7 @@ HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFrom
return;
default:
MOZ_CRASH("Invalid trap status");
MOZ_ASSUME_UNREACHABLE("Invalid trap status");
}
}
@ -594,7 +594,7 @@ HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFrom
break;
default:
MOZ_CRASH("Invalid try note");
MOZ_ASSUME_UNREACHABLE("Invalid try note");
}
}
@ -829,7 +829,7 @@ MarkCalleeToken(JSTracer *trc, CalleeToken token)
return CalleeToToken(script);
}
default:
MOZ_CRASH("unknown callee token type");
MOZ_ASSUME_UNREACHABLE("unknown callee token type");
}
}
@ -1033,7 +1033,7 @@ JitActivationIterator::jitStackRange(uintptr_t *&min, uintptr_t *&end)
if (exitFrame->isWrapperExit() && f->outParam == Type_Handle) {
switch (f->outParamRootType) {
case VMFunction::RootNone:
MOZ_CRASH("Handle outparam must have root type");
MOZ_ASSUME_UNREACHABLE("Handle outparam must have root type");
case VMFunction::RootObject:
case VMFunction::RootString:
case VMFunction::RootPropertyName:
@ -1221,7 +1221,7 @@ MarkJitExitFrame(JSTracer *trc, const JitFrameIterator &frame)
if (f->outParam == Type_Handle) {
switch (f->outParamRootType) {
case VMFunction::RootNone:
MOZ_CRASH("Handle outparam must have root type");
MOZ_ASSUME_UNREACHABLE("Handle outparam must have root type");
case VMFunction::RootObject:
gc::MarkObjectRoot(trc, footer->outParam<JSObject *>(), "ion-vm-out");
break;
@ -1286,14 +1286,14 @@ MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
MarkIonJSFrame(trc, frames);
break;
case JitFrame_Unwound_IonJS:
MOZ_CRASH("JitFrame_Unwound_IonJS");
MOZ_ASSUME_UNREACHABLE("invalid");
case JitFrame_Rectifier:
MarkRectifierFrame(trc, frames);
break;
case JitFrame_Unwound_Rectifier:
break;
default:
MOZ_CRASH("unexpected frame type");
MOZ_ASSUME_UNREACHABLE("unexpected frame type");
}
}
}
@ -1515,7 +1515,7 @@ FromTypedPayload(JSValueType type, uintptr_t payload)
case JSVAL_TYPE_OBJECT:
return FromObjectPayload(payload);
default:
MOZ_CRASH("unexpected type - needs payload");
MOZ_ASSUME_UNREACHABLE("unexpected type - needs payload");
}
}
@ -1603,7 +1603,7 @@ SnapshotIterator::allocationValue(const RValueAllocation &alloc)
case JSVAL_TYPE_OBJECT:
return FromObjectPayload(fromStack(alloc.stackOffset2()));
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
@ -1659,7 +1659,7 @@ SnapshotIterator::allocationValue(const RValueAllocation &alloc)
return fromInstructionResult(alloc.index());
default:
MOZ_CRASH("huh?");
MOZ_ASSUME_UNREACHABLE("huh?");
}
}
@ -1770,10 +1770,10 @@ JitFrameIterator::ionScriptFromCalleeToken() const
case ParallelExecution:
return script()->parallelIonScript();
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
default:
MOZ_CRASH("unknown callee token type");
MOZ_ASSUME_UNREACHABLE("unknown callee token type");
}
}

View File

@ -71,7 +71,7 @@ ScriptFromCalleeToken(CalleeToken token)
case CalleeToken_Function:
return CalleeTokenToFunction(token)->nonLazyScript();
}
MOZ_CRASH("invalid callee token tag");
MOZ_ASSUME_UNREACHABLE("invalid callee token tag");
}
// In between every two frames lies a small header describing both frames. This

View File

@ -297,7 +297,7 @@ StoreToTypedFloatArray(MacroAssembler &masm, int arrayType, const S &value, cons
masm.storeDouble(value, dest);
break;
default:
MOZ_CRASH("Invalid typed array type");
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
}
}
@ -363,7 +363,7 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T &src, AnyRegi
canonicalizeDouble(dest.fpu());
break;
default:
MOZ_CRASH("Invalid typed array type");
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
}
}
@ -424,7 +424,7 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T &src, const V
boxDouble(ScratchDoubleReg, dest);
break;
default:
MOZ_CRASH("Invalid typed array type");
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
}
}
@ -978,7 +978,7 @@ MacroAssembler::checkInterruptFlagPar(Register tempReg, Label *fail)
movePtr(ImmPtr(GetIonContext()->runtime->addressOfInterruptPar()), tempReg);
branch32(Assembler::NonZero, Address(tempReg, 0), Imm32(0), fail);
#else
MOZ_CRASH("JSRuntime::interruptPar doesn't exist on non-threadsafe builds.");
MOZ_ASSUME_UNREACHABLE("JSRuntime::interruptPar doesn't exist on non-threadsafe builds.");
#endif
}
@ -1236,7 +1236,7 @@ MacroAssembler::loadContext(Register cxReg, Register scratch, ExecutionMode exec
loadForkJoinContext(cxReg, scratch);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -1279,7 +1279,7 @@ MacroAssembler::enterExitFrameAndLoadContext(const VMFunction *f, Register cxReg
enterParallelExitFrameAndLoadContext(f, cxReg, scratch);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -1297,7 +1297,7 @@ MacroAssembler::enterFakeExitFrame(Register cxReg, Register scratch,
enterFakeParallelExitFrame(cxReg, scratch, codeVal);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -1319,7 +1319,7 @@ MacroAssembler::handleFailure(ExecutionMode executionMode)
handler = JS_FUNC_TO_DATA_PTR(void *, jit::HandleParallelFailure);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
MacroAssemblerSpecific::handleFailureWithHandler(handler);
@ -1612,7 +1612,7 @@ MacroAssembler::PushEmptyRooted(VMFunction::RootType rootType)
{
switch (rootType) {
case VMFunction::RootNone:
MOZ_CRASH("Handle must have root type");
MOZ_ASSUME_UNREACHABLE("Handle must have root type");
case VMFunction::RootObject:
case VMFunction::RootString:
case VMFunction::RootPropertyName:
@ -1632,7 +1632,7 @@ MacroAssembler::popRooted(VMFunction::RootType rootType, Register cellReg,
{
switch (rootType) {
case VMFunction::RootNone:
MOZ_CRASH("Handle must have root type");
MOZ_ASSUME_UNREACHABLE("Handle must have root type");
case VMFunction::RootObject:
case VMFunction::RootString:
case VMFunction::RootPropertyName:
@ -1703,7 +1703,7 @@ MacroAssembler::convertTypedOrValueToFloatingPoint(TypedOrValueRegister src, Flo
loadConstantFloatingPoint(GenericNaN(), float(GenericNaN()), output, outputType);
break;
default:
MOZ_CRASH("Bad MIRType");
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
}
}
@ -1918,7 +1918,7 @@ MacroAssembler::convertTypedOrValueToInt(TypedOrValueRegister src, FloatRegister
jump(fail);
break;
default:
MOZ_CRASH("Bad MIRType");
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
}
}
@ -2004,7 +2004,7 @@ MacroAssembler::branchEqualTypeIfNeeded(MIRType type, MDefinition *maybeDef, Reg
branchTestObject(Equal, tag, label);
break;
default:
MOZ_CRASH("Unsupported type");
MOZ_ASSUME_UNREACHABLE("Unsupported type");
}
}
}

View File

@ -139,7 +139,7 @@ class MacroAssembler : public MacroAssemblerSpecific
} else if (type_.isAnyObject()) {
mirType = MIRType_Object;
} else {
MOZ_CRASH("Unknown conversion to mirtype");
MOZ_ASSUME_UNREACHABLE("Unknown conversion to mirtype");
}
if (mirType == MIRType_Double)
@ -341,7 +341,7 @@ class MacroAssembler : public MacroAssemblerSpecific
case MIRType_MagicIsConstructing:
case MIRType_MagicHole: return branchTestMagic(cond, val, label);
default:
MOZ_CRASH("Bad MIRType");
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
}
}
@ -731,7 +731,7 @@ class MacroAssembler : public MacroAssemblerSpecific
store32(value, dest);
break;
default:
MOZ_CRASH("Invalid typed array type");
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
}
}
@ -1159,7 +1159,7 @@ class MacroAssembler : public MacroAssemblerSpecific
switch (executionMode) {
case SequentialExecution: return &sequentialFailureLabel_;
case ParallelExecution: return &parallelFailureLabel_;
default: MOZ_CRASH("Unexpected execution mode");
default: MOZ_ASSUME_UNREACHABLE("Unexpected execution mode");
}
}
@ -1446,7 +1446,7 @@ JSOpToDoubleCondition(JSOp op)
case JSOP_GE:
return Assembler::DoubleGreaterThanOrEqual;
default:
MOZ_CRASH("Unexpected comparison operation");
MOZ_ASSUME_UNREACHABLE("Unexpected comparison operation");
}
}
@ -1473,7 +1473,7 @@ JSOpToCondition(JSOp op, bool isSigned)
case JSOP_GE:
return Assembler::GreaterThanOrEqual;
default:
MOZ_CRASH("Unrecognized comparison operation");
MOZ_ASSUME_UNREACHABLE("Unrecognized comparison operation");
}
} else {
switch (op) {
@ -1492,7 +1492,7 @@ JSOpToCondition(JSOp op, bool isSigned)
case JSOP_GE:
return Assembler::AboveOrEqual;
default:
MOZ_CRASH("Unrecognized comparison operation");
MOZ_ASSUME_UNREACHABLE("Unrecognized comparison operation");
}
}
}

View File

@ -117,7 +117,7 @@ OptimizationInfos::nextLevel(OptimizationLevel level) const
case Optimization_DontCompile:
return Optimization_Normal;
default:
MOZ_CRASH("Unknown optimization level.");
MOZ_ASSUME_UNREACHABLE("Unknown optimization level.");
}
}

View File

@ -38,7 +38,7 @@ OptimizationLevelString(OptimizationLevel level)
case Optimization_AsmJS:
return "Optimization_AsmJS";
default:
MOZ_CRASH("Invalid OptimizationLevel");
MOZ_ASSUME_UNREACHABLE("Invalid OptimizationLevel");
}
}
#endif

View File

@ -221,7 +221,7 @@ BailoutKindString(BailoutKind kind)
case Bailout_IonExceptionDebugMode:
return "Bailout_IonExceptionDebugMode";
default:
MOZ_CRASH("Invalid BailoutKind");
MOZ_ASSUME_UNREACHABLE("Invalid BailoutKind");
}
}
@ -301,7 +301,7 @@ MIRTypeFromValueType(JSValueType type)
case JSVAL_TYPE_UNKNOWN:
return MIRType_Value;
default:
MOZ_CRASH("unexpected jsval type");
MOZ_ASSUME_UNREACHABLE("unexpected jsval type");
}
}
@ -384,7 +384,7 @@ StringFromMIRType(MIRType type)
case MIRType_ForkJoinContext:
return "ForkJoinContext";
default:
MOZ_CRASH("Unknown MIRType.");
MOZ_ASSUME_UNREACHABLE("Unknown MIRType.");
}
}

View File

@ -311,7 +311,7 @@ class JitRuntime
switch (mode) {
case SequentialExecution: return bailoutHandler_;
case ParallelExecution: return parallelBailoutHandler_;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -329,7 +329,7 @@ class JitRuntime
switch (mode) {
case SequentialExecution: return argumentsRectifier_;
case ParallelExecution: return parallelArgumentsRectifier_;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
@ -489,7 +489,7 @@ class JitCompartment
switch (mode) {
case SequentialExecution: return stringConcatStub_;
case ParallelExecution: return parallelStringConcatStub_;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
}
};

View File

@ -5655,19 +5655,19 @@ class LPhi MOZ_FINAL : public LInstruction
return 0;
}
LDefinition *getTemp(size_t index) {
MOZ_CRASH("no temps");
MOZ_ASSUME_UNREACHABLE("no temps");
}
void setTemp(size_t index, const LDefinition &temp) {
MOZ_CRASH("no temps");
MOZ_ASSUME_UNREACHABLE("no temps");
}
size_t numSuccessors() const {
return 0;
}
MBasicBlock *getSuccessor(size_t i) const {
MOZ_CRASH("no successors");
MOZ_ASSUME_UNREACHABLE("no successors");
}
void setSuccessor(size_t i, MBasicBlock *) {
MOZ_CRASH("no successors");
MOZ_ASSUME_UNREACHABLE("no successors");
}
virtual void printInfo(FILE *fp) {
@ -5988,19 +5988,19 @@ class LAsmJSCall MOZ_FINAL : public LInstruction
return 0;
}
LDefinition *getTemp(size_t index) {
MOZ_CRASH("no temps");
MOZ_ASSUME_UNREACHABLE("no temps");
}
void setTemp(size_t index, const LDefinition &a) {
MOZ_CRASH("no temps");
MOZ_ASSUME_UNREACHABLE("no temps");
}
size_t numSuccessors() const {
return 0;
}
MBasicBlock *getSuccessor(size_t i) const {
MOZ_CRASH("no successors");
MOZ_ASSUME_UNREACHABLE("no successors");
}
void setSuccessor(size_t i, MBasicBlock *) {
MOZ_CRASH("no successors");
MOZ_ASSUME_UNREACHABLE("no successors");
}
};

View File

@ -408,7 +408,7 @@ PrintUse(char *buf, size_t size, const LUse *use)
JS_snprintf(buf, size, "v%d:**", use->virtualRegister());
break;
default:
MOZ_CRASH("invalid use policy");
MOZ_ASSUME_UNREACHABLE("invalid use policy");
}
}
@ -438,7 +438,7 @@ LAllocation::toString() const
PrintUse(buf, sizeof(buf), toUse());
return buf;
default:
MOZ_CRASH("what?");
MOZ_ASSUME_UNREACHABLE("what?");
}
}
#endif // DEBUG

View File

@ -570,7 +570,7 @@ class LDefinition
case MIRType_ForkJoinContext:
return LDefinition::GENERAL;
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -750,7 +750,7 @@ class LInstructionVisitor
{}
public:
#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_CRASH("NYI: " #op); }
#define VISIT_INS(op) virtual bool visit##op(L##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); }
LIR_OPCODE_LIST(VISIT_INS)
#undef VISIT_INS
};

View File

@ -33,7 +33,7 @@ Requirement::priority() const
return 2;
default:
MOZ_CRASH("Unknown requirement kind.");
MOZ_ASSUME_UNREACHABLE("Unknown requirement kind.");
}
}

View File

@ -159,7 +159,7 @@ UseCompatibleWith(const LUse *use, LAllocation alloc)
// UsePosition is only used as hint.
return alloc.isRegister();
default:
MOZ_CRASH("Unknown use policy");
MOZ_ASSUME_UNREACHABLE("Unknown use policy");
}
}
@ -188,7 +188,7 @@ DefinitionCompatibleWith(LInstruction *ins, const LDefinition *def, LAllocation
case LDefinition::PASSTHROUGH:
return true;
default:
MOZ_CRASH("Unknown definition policy");
MOZ_ASSUME_UNREACHABLE("Unknown definition policy");
}
}

View File

@ -1032,7 +1032,7 @@ LIRGenerator::visitCompare(MCompare *comp)
return define(lir, comp);
}
MOZ_CRASH("Unrecognized compare type.");
MOZ_ASSUME_UNREACHABLE("Unrecognized compare type.");
}
bool
@ -1769,7 +1769,7 @@ LIRGenerator::visitToDouble(MToDouble *convert)
default:
// Objects might be effectful.
// Strings are complicated - we don't handle them yet.
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -1818,7 +1818,7 @@ LIRGenerator::visitToFloat32(MToFloat32 *convert)
default:
// Objects might be effectful.
// Strings are complicated - we don't handle them yet.
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
return false;
}
}
@ -1864,11 +1864,11 @@ LIRGenerator::visitToInt32(MToInt32 *convert)
case MIRType_Object:
case MIRType_Undefined:
// Objects might be effectful. Undefined and symbols coerce to NaN, not int32.
MOZ_CRASH("ToInt32 invalid input type");
MOZ_ASSUME_UNREACHABLE("ToInt32 invalid input type");
return false;
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -1907,7 +1907,7 @@ LIRGenerator::visitTruncateToInt32(MTruncateToInt32 *truncate)
default:
// Objects might be effectful.
// Strings are complicated - we don't handle them yet.
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -1966,7 +1966,7 @@ LIRGenerator::visitToString(MToString *ins)
default:
// Float32 and objects are not supported.
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -2178,7 +2178,7 @@ LIRGenerator::visitLoadSlot(MLoadSlot *ins)
case MIRType_Undefined:
case MIRType_Null:
MOZ_CRASH("typed load must have a payload");
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
default:
return define(new(alloc()) LLoadSlotT(useRegister(ins->slots())), ins);
@ -2277,7 +2277,7 @@ LIRGenerator::visitStoreSlot(MStoreSlot *ins)
return add(new(alloc()) LStoreSlotT(useRegister(ins->slots()), useRegister(ins->value())), ins);
case MIRType_Float32:
MOZ_CRASH("Float32 shouldn't be stored in a slot.");
MOZ_ASSUME_UNREACHABLE("Float32 shouldn't be stored in a slot.");
default:
return add(new(alloc()) LStoreSlotT(useRegister(ins->slots()), useRegisterOrConstant(ins->value())),
@ -2520,7 +2520,7 @@ LIRGenerator::visitNot(MNot *ins)
}
default:
MOZ_CRASH("Unexpected MIRType.");
MOZ_ASSUME_UNREACHABLE("Unexpected MIRType.");
}
}
@ -2596,10 +2596,9 @@ LIRGenerator::visitLoadElement(MLoadElement *ins)
return false;
return defineBox(lir, ins);
}
case MIRType_Undefined:
case MIRType_Null:
MOZ_CRASH("typed load must have a payload");
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
default:
{
@ -2707,7 +2706,7 @@ LIRGenerator::visitArrayPopShift(MArrayPopShift *ins)
}
case MIRType_Undefined:
case MIRType_Null:
MOZ_CRASH("typed load must have a payload");
MOZ_ASSUME_UNREACHABLE("typed load must have a payload");
default:
{
@ -2816,7 +2815,7 @@ LIRGenerator::visitClampToUint8(MClampToUint8 *ins)
}
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -3129,7 +3128,8 @@ LIRGenerator::visitAssertRange(MAssertRange *ins)
break;
default:
MOZ_CRASH("Unexpected Range for MIRType");
MOZ_ASSUME_UNREACHABLE("Unexpected Range for MIRType");
break;
}
lir->setMir(ins);
@ -3532,7 +3532,7 @@ LIRGenerator::visitAsmJSReturn(MAsmJSReturn *ins)
else if (rval->type() == MIRType_Int32)
lir->setOperand(0, useFixed(rval, ReturnReg));
else
MOZ_CRASH("Unexpected asm.js return type");
MOZ_ASSUME_UNREACHABLE("Unexpected asm.js return type");
return add(lir);
}

View File

@ -1435,7 +1435,7 @@ IonBuilder::inlineUnsafePutElements(CallInfo &callInfo)
continue;
}
MOZ_CRASH("Element access not dense array nor typed array");
MOZ_ASSUME_UNREACHABLE("Element access not dense array nor typed array");
}
return InliningStatus_Inlined;
@ -1550,7 +1550,7 @@ IonBuilder::inlineForceSequentialOrInParallelSection(CallInfo &callInfo)
return InliningStatus_NotInlined;
}
MOZ_CRASH("Invalid execution mode");
MOZ_ASSUME_UNREACHABLE("Invalid execution mode");
}
IonBuilder::InliningStatus
@ -1588,7 +1588,7 @@ IonBuilder::inlineForkJoinGetSlice(CallInfo &callInfo)
return InliningStatus_Inlined;
}
MOZ_CRASH("Invalid execution mode");
MOZ_ASSUME_UNREACHABLE("Invalid execution mode");
}
IonBuilder::InliningStatus
@ -1607,7 +1607,7 @@ IonBuilder::inlineNewDenseArray(CallInfo &callInfo)
return inlineNewDenseArrayForSequentialExecution(callInfo);
}
MOZ_CRASH("unknown ExecutionMode");
MOZ_ASSUME_UNREACHABLE("unknown ExecutionMode");
}
IonBuilder::InliningStatus

View File

@ -118,7 +118,7 @@ EvaluateConstantOperands(TempAllocator &alloc, MBinaryInstruction *ins, bool *pt
ret.setNumber(NumberMod(lhs.toNumber(), rhs.toNumber()));
break;
default:
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
// setNumber eagerly transforms a number to int32.
@ -565,7 +565,7 @@ MConstant::printOpcode(FILE *fp) const
fprintf(fp, "magic optimized-out");
break;
default:
MOZ_CRASH("unexpected type");
MOZ_ASSUME_UNREACHABLE("unexpected type");
}
}
@ -656,7 +656,7 @@ MMathFunction::FunctionName(Function function)
case Ceil: return "Ceil";
case Round: return "Round";
default:
MOZ_CRASH("Unknown math function");
MOZ_ASSUME_UNREACHABLE("Unknown math function");
}
}
@ -1950,7 +1950,7 @@ MCompare::inputType()
case Compare_Value:
return MIRType_Value;
default:
MOZ_CRASH("No known conversion");
MOZ_ASSUME_UNREACHABLE("No known conversion");
}
}
@ -2519,7 +2519,7 @@ MCompare::tryFold(bool *result)
*result = (op == JSOP_NE || op == JSOP_STRICTNE);
return true;
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
@ -2542,9 +2542,9 @@ MCompare::tryFold(bool *result)
return true;
case MIRType_Boolean:
// Int32 specialization should handle this.
MOZ_CRASH("Wrong specialization");
MOZ_ASSUME_UNREACHABLE("Wrong specialization");
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
@ -2567,9 +2567,9 @@ MCompare::tryFold(bool *result)
return true;
case MIRType_String:
// Compare_String specialization should handle this.
MOZ_CRASH("Wrong specialization");
MOZ_ASSUME_UNREACHABLE("Wrong specialization");
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
@ -2619,7 +2619,7 @@ MCompare::evaluateConstantOperands(bool *result)
*result = (comp != 0);
break;
default:
MOZ_CRASH("Unexpected op.");
MOZ_ASSUME_UNREACHABLE("Unexpected op.");
}
return true;
@ -2651,7 +2651,7 @@ MCompare::evaluateConstantOperands(bool *result)
*result = (lhsUint != rhsUint);
break;
default:
MOZ_CRASH("Unexpected op.");
MOZ_ASSUME_UNREACHABLE("Unexpected op.");
}
return true;

View File

@ -2731,7 +2731,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
kind = Bailout_NonObjectInput;
break;
default:
MOZ_CRASH("Given MIRType cannot be unboxed.");
MOZ_ASSUME_UNREACHABLE("Given MIRType cannot be unboxed.");
}
return new(alloc) MUnbox(ins, type, mode, kind);
@ -4569,7 +4569,7 @@ class MDiv : public MBinaryArithInstruction
void analyzeEdgeCasesBackward();
double getIdentity() {
MOZ_CRASH("not used");
MOZ_ASSUME_UNREACHABLE("not used");
}
bool canBeNegativeZero() const {
@ -4663,7 +4663,7 @@ class MMod : public MBinaryArithInstruction
MDefinition *foldsTo(TempAllocator &alloc);
double getIdentity() {
MOZ_CRASH("not used");
MOZ_ASSUME_UNREACHABLE("not used");
}
bool canBeNegativeDividend() const {

View File

@ -1076,7 +1076,7 @@ MBasicBlock::getSuccessorIndex(MBasicBlock *block) const
if (getSuccessor(i) == block)
return i;
}
MOZ_CRASH("Invalid successor");
MOZ_ASSUME_UNREACHABLE("Invalid successor");
}
void
@ -1108,7 +1108,7 @@ MBasicBlock::replacePredecessor(MBasicBlock *old, MBasicBlock *split)
}
}
MOZ_CRASH("predecessor was not found");
MOZ_ASSUME_UNREACHABLE("predecessor was not found");
}
void
@ -1148,7 +1148,7 @@ MBasicBlock::removePredecessor(MBasicBlock *pred)
return;
}
MOZ_CRASH("predecessor was not found");
MOZ_ASSUME_UNREACHABLE("predecessor was not found");
}
void

View File

@ -243,7 +243,7 @@ class MInstructionVisitor // interface i.e. pure abstract class
class MInstructionVisitorWithDefaults : public MInstructionVisitor
{
public:
#define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_CRASH("NYI: " #op); }
#define VISIT_INS(op) virtual bool visit##op(M##op *) { MOZ_ASSUME_UNREACHABLE("NYI: " #op); }
MIR_OPCODE_LIST(VISIT_INS)
#undef VISIT_INS
};

View File

@ -503,7 +503,7 @@ Range::Range(const MDefinition *def)
wrapAroundToBoolean();
break;
case MIRType_None:
MOZ_CRASH("Asking for the range of an instruction with no value");
MOZ_ASSUME_UNREACHABLE("Asking for the range of an instruction with no value");
default:
break;
}
@ -519,7 +519,7 @@ Range::Range(const MDefinition *def)
setInt32(0, 1);
break;
case MIRType_None:
MOZ_CRASH("Asking for the range of an instruction with no value");
MOZ_ASSUME_UNREACHABLE("Asking for the range of an instruction with no value");
default:
setUnknown();
break;

View File

@ -27,7 +27,8 @@ using namespace js::jit;
bool
MNode::writeRecoverData(CompactBufferWriter &writer) const
{
MOZ_CRASH("This instruction is not serializable");
MOZ_ASSUME_UNREACHABLE("This instruction is not serializable");
return false;
}
void
@ -47,7 +48,7 @@ RInstruction::readRecoverData(CompactBufferReader &reader, RInstructionStorage *
case Recover_Invalid:
default:
MOZ_CRASH("Bad decoding of the previous instruction?");
MOZ_ASSUME_UNREACHABLE("Bad decoding of the previous instruction?");
break;
}
}
@ -135,7 +136,7 @@ RResumePoint::RResumePoint(CompactBufferReader &reader)
bool
RResumePoint::recover(JSContext *cx, SnapshotIterator &iter) const
{
MOZ_CRASH("This instruction is not recoverable.");
MOZ_ASSUME_UNREACHABLE("This instruction is not recoverable.");
}
bool
@ -824,7 +825,8 @@ MMathFunction::writeRecoverData(CompactBufferWriter &writer) const
writer.writeUnsigned(uint32_t(RInstruction::Recover_Round));
return true;
default:
MOZ_CRASH("Unknown math function.");
MOZ_ASSUME_UNREACHABLE("Unknown math function.");
return false;
}
}

View File

@ -251,7 +251,7 @@ RValueAllocation::layoutFromMode(Mode mode)
}
}
MOZ_CRASH("Wrong mode type?");
MOZ_ASSUME_UNREACHABLE("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_CRASH("no payload");
MOZ_ASSUME_UNREACHABLE("no payload");
}
}

View File

@ -69,7 +69,7 @@ class StackSlotAllocator
case LDefinition::PAYLOAD:
#endif
case LDefinition::DOUBLE: return freeDoubleSlot(index);
default: MOZ_CRASH("Unknown slot type");
default: MOZ_ASSUME_UNREACHABLE("Unknown slot type");
}
}
@ -95,7 +95,7 @@ class StackSlotAllocator
case LDefinition::PAYLOAD:
#endif
case LDefinition::DOUBLE: return allocateDoubleSlot();
default: MOZ_CRASH("Unknown slot type");
default: MOZ_ASSUME_UNREACHABLE("Unknown slot type");
}
}

View File

@ -34,7 +34,7 @@ StupidAllocator::registerIndex(AnyRegister reg)
if (reg == registers[i].reg)
return i;
}
MOZ_CRASH("Bad register");
MOZ_ASSUME_UNREACHABLE("Bad register");
}
bool

View File

@ -261,7 +261,7 @@ ComparePolicy::adjustInputs(TempAllocator &alloc, MInstruction *def)
replace = MUnbox::New(alloc, in, MIRType_String, MUnbox::Infallible);
break;
default:
MOZ_CRASH("Unknown compare specialization");
MOZ_ASSUME_UNREACHABLE("Unknown compare specialization");
}
def->block()->insertBefore(def, replace);
@ -746,7 +746,7 @@ StoreTypedArrayPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
value = boxAt(alloc, ins, value);
break;
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
if (value != curValue) {
@ -793,7 +793,7 @@ StoreTypedArrayPolicy::adjustValueInput(TempAllocator &alloc, MInstruction *ins,
}
break;
default:
MOZ_CRASH("Invalid array type");
MOZ_ASSUME_UNREACHABLE("Invalid array type");
}
if (value != curValue)

View File

@ -98,7 +98,7 @@ TypedObjectPrediction::addProto(const TypedProto &proto)
return;
}
MOZ_CRASH("Bad predictionKind");
MOZ_ASSUME_UNREACHABLE("Bad predictionKind");
}
type::Kind
@ -119,7 +119,7 @@ TypedObjectPrediction::kind() const
return prefix().descr->kind();
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}
bool
@ -137,7 +137,7 @@ TypedObjectPrediction::ofArrayKind() const
return true;
}
MOZ_CRASH("Bad kind");
MOZ_ASSUME_UNREACHABLE("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_CRASH("Unknown kind");
MOZ_ASSUME_UNREACHABLE("Unknown kind");
case TypedObjectPrediction::Descr:
return DescrHasKnownSize(descr(), out);
@ -183,7 +183,7 @@ TypedObjectPrediction::hasKnownSize(int32_t *out) const
return false;
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}
const TypedProto *
@ -206,7 +206,7 @@ TypedObjectPrediction::getKnownPrototype() const
case type::UnsizedArray:
return &proto();
}
MOZ_CRASH("Invalid proto().kind()");
MOZ_ASSUME_UNREACHABLE("Invalid proto().kind()");
case TypedObjectPrediction::Descr:
if (descr().is<ComplexTypeDescr>())
@ -219,7 +219,7 @@ TypedObjectPrediction::getKnownPrototype() const
return nullptr;
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}
template<typename T>
@ -242,7 +242,7 @@ TypedObjectPrediction::extractType() const
break; // Prefixes are always structs, never scalars etc
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("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_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}
static TypeDescr &
@ -316,7 +316,7 @@ TypedObjectPrediction::arrayElementType() const
case TypedObjectPrediction::Prefix:
break; // Prefixes are always structs, never arrays
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}
bool
@ -369,5 +369,5 @@ TypedObjectPrediction::hasFieldNamed(jsid id,
*prefix().descr, prefix().fields,
id, fieldOffset, fieldType, fieldIndex);
}
MOZ_CRASH("Bad prediction kind");
MOZ_ASSUME_UNREACHABLE("Bad prediction kind");
}

View File

@ -760,7 +760,7 @@ DebugPrologue(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, bool *mustRet
return false;
default:
MOZ_CRASH("Invalid trap status");
MOZ_ASSUME_UNREACHABLE("Invalid trap status");
}
}
@ -917,7 +917,7 @@ HandleDebugTrap(JSContext *cx, BaselineFrame *frame, uint8_t *retAddr, bool *mus
return false;
default:
MOZ_CRASH("Invalid trap status");
MOZ_ASSUME_UNREACHABLE("Invalid trap status");
}
return true;
@ -955,7 +955,7 @@ OnDebuggerStatement(JSContext *cx, BaselineFrame *frame, jsbytecode *pc, bool *m
return false;
default:
MOZ_CRASH("Invalid trap status");
MOZ_ASSUME_UNREACHABLE("Invalid trap status");
}
}

View File

@ -352,7 +352,7 @@ VFPRegister::getRegisterDumpOffsetInBytes()
return id() * sizeof(float);
if (isDouble())
return id() * sizeof(double);
MOZ_CRASH("Unexpected register dump offset");
MOZ_ASSUME_UNREACHABLE();
}
} // namespace jit

View File

@ -58,7 +58,7 @@ ABIArgGenerator::next(MIRType type)
floatRegIndex_++;
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
return current_;
@ -699,7 +699,7 @@ Assembler::GetCF32Target(Iter *iter)
}
MOZ_CRASH("unsupported branch relocation");
MOZ_ASSUME_UNREACHABLE("unsupported branch relocation");
}
uintptr_t
@ -763,7 +763,7 @@ Assembler::GetPtr32Target(Iter *start, Register *dest, RelocStyle *style)
return *ptr;
}
MOZ_CRASH("unsupported relocation");
MOZ_ASSUME_UNREACHABLE("unsupported relocation");
}
static JitCode *
@ -1664,7 +1664,7 @@ Assembler::as_extdtr(LoadStore ls, int size, bool IsSigned, Index mode,
extra_bits1 = 0;
break;
default:
MOZ_CRASH("SAY WHAT?");
MOZ_ASSUME_UNREACHABLE("SAY WHAT?");
}
return writeInst(extra_bits2 << 5 | extra_bits1 << 20 | 0x90 |
addr.encode() | RT(rt) | mode | c, dest);
@ -1770,7 +1770,7 @@ Assembler::PatchConstantPoolLoad(void* loadAddr, void* constPoolAddr)
int offset = (char *)constPoolAddr - (char *)loadAddr;
switch(data.getLoadType()) {
case PoolHintData::PoolBOGUS:
MOZ_CRASH("bogus load type!");
MOZ_ASSUME_UNREACHABLE("bogus load type!");
case PoolHintData::PoolDTR:
Dummy->as_dtr(IsLoad, 32, Offset, data.getReg(),
DTRAddr(pc, DtrOffImm(offset+4*data.getIndex() - 8)), data.getCond(), instAddr);
@ -2000,20 +2000,22 @@ Assembler::as_vnmul(VFPRegister vd, VFPRegister vn, VFPRegister vm,
Condition c)
{
return as_vfp_float(vd, vn, vm, OpvMul, c);
MOZ_ASSUME_UNREACHABLE("Feature NYI");
}
BufferOffset
Assembler::as_vnmla(VFPRegister vd, VFPRegister vn, VFPRegister vm,
Condition c)
{
MOZ_CRASH("Feature NYI");
MOZ_ASSUME_UNREACHABLE("Feature NYI");
}
BufferOffset
Assembler::as_vnmls(VFPRegister vd, VFPRegister vn, VFPRegister vm,
Condition c)
{
MOZ_CRASH("Feature NYI");
MOZ_ASSUME_UNREACHABLE("Feature NYI");
return BufferOffset();
}
BufferOffset
@ -2247,7 +2249,7 @@ Assembler::bind(Label *label, BufferOffset boff)
else if (branch.is<InstBLImm>())
as_bl(dest.diffB<BOffImm>(b), c, b);
else
MOZ_CRASH("crazy fixup!");
MOZ_ASSUME_UNREACHABLE("crazy fixup!");
b = next;
} while (more);
}
@ -2304,7 +2306,7 @@ Assembler::retarget(Label *label, Label *target)
else if (branch.is<InstBLImm>())
as_bl(BOffImm(prev), c, labelBranchOffset);
else
MOZ_CRASH("crazy fixup!");
MOZ_ASSUME_UNREACHABLE("crazy fixup!");
} else {
// The target is unbound and unused. We can just take the head of
// the list hanging off of label, and dump that into target.

View File

@ -1584,7 +1584,7 @@ class Assembler : public AssemblerShared
JS_ASSERT(rn.code() > dtmLastReg);
dtmRegBitField |= 1 << rn.code();
if (dtmLoadStore == IsLoad && rn.code() == 13 && dtmBase.code() == 13) {
MOZ_CRASH("ARM Spec says this is invalid");
MOZ_ASSUME_UNREACHABLE("ARM Spec says this is invalid");
}
}
void finishDataTransfer() {
@ -1689,7 +1689,7 @@ class Assembler : public AssemblerShared
static void PatchWrite_Imm32(CodeLocationLabel label, Imm32 imm);
static void PatchInstructionImmediate(uint8_t *code, PatchedImmPtr imm) {
MOZ_CRASH("Unused.");
MOZ_ASSUME_UNREACHABLE("Unused.");
}
static uint32_t AlignDoubleArg(uint32_t offset) {

View File

@ -84,7 +84,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
switch (mode_) {
case SequentialExecution: topIonScript_ = script()->ionScript(); break;
case ParallelExecution: topIonScript_ = script()->parallelIonScript(); break;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
if (bailout->frameClass() == FrameSizeClass::None()) {

View File

@ -197,7 +197,7 @@ ICBinaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
}
break;
default:
MOZ_CRASH("Unhandled op for BinaryArith_Int32.");
MOZ_ASSUME_UNREACHABLE("Unhandled op for BinaryArith_Int32.");
}
EmitReturnFromIC(masm);
@ -248,7 +248,7 @@ ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
masm.ma_rsb(R0.payloadReg(), Imm32(0), R0.payloadReg());
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
}
EmitReturnFromIC(masm);

View File

@ -894,7 +894,7 @@ CodeGeneratorARM::visitBitOpI(LBitOpI *ins)
masm.ma_and(ToRegister(rhs), ToRegister(lhs), ToRegister(dest));
break;
default:
MOZ_CRASH("unexpected binary opcode");
MOZ_ASSUME_UNREACHABLE("unexpected binary opcode");
}
return true;
@ -936,7 +936,7 @@ CodeGeneratorARM::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
} else {
// The shift amounts should be AND'ed into the 0-31 range since arm
@ -961,7 +961,7 @@ CodeGeneratorARM::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
}
@ -1154,7 +1154,7 @@ CodeGeneratorARM::visitMathD(LMathD *math)
masm.ma_vdiv(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return true;
}
@ -1180,7 +1180,7 @@ CodeGeneratorARM::visitMathF(LMathF *math)
masm.ma_vdiv_f32(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return true;
}
@ -1781,13 +1781,13 @@ getBase(U *mir)
bool
CodeGeneratorARM::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
CodeGeneratorARM::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
@ -1806,7 +1806,7 @@ CodeGeneratorARM::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
case Scalar::Uint32: isSigned = true; size = 32; break;
case Scalar::Float64: isFloat = true; size = 64; break;
case Scalar::Float32: isFloat = true; size = 32; break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
const LAllocation *ptr = ins->ptr();
@ -1880,7 +1880,7 @@ CodeGeneratorARM::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
case Scalar::Uint32: isSigned = true; size = 32; break;
case Scalar::Float64: isFloat = true; size = 64; break;
case Scalar::Float32: isFloat = true; size = 32; break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
const LAllocation *ptr = ins->ptr();
if (ptr->isConstant()) {
@ -2156,11 +2156,11 @@ CodeGeneratorARM::visitNegF(LNegF *ins)
bool
CodeGeneratorARM::visitForkJoinGetSlice(LForkJoinGetSlice *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
JitCode *
JitRuntime::generateForkJoinGetSliceStub(JSContext *cx)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}

View File

@ -541,13 +541,13 @@ LIRGeneratorARM::lowerTruncateFToInt32(MTruncateToInt32 *ins)
bool
LIRGeneratorARM::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
LIRGeneratorARM::visitForkJoinGetSlice(MForkJoinGetSlice *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
//__aeabi_uidiv

View File

@ -780,7 +780,7 @@ MacroAssemblerARM::ma_cmn(Register src1, Register src2, Condition c)
void
MacroAssemblerARM::ma_cmn(Register src1, Operand op, Condition c)
{
MOZ_CRASH("Feature NYI");
MOZ_ASSUME_UNREACHABLE("Feature NYI");
}
// Compare (src - src2).
@ -814,7 +814,7 @@ MacroAssemblerARM::ma_cmp(Register src1, Operand op, Condition c)
as_cmp(src1, O2Reg(ScratchRegister), c);
break;
default:
MOZ_CRASH("trying to compare FP and integer registers");
MOZ_ASSUME_UNREACHABLE("trying to compare FP and integer registers");
}
}
void
@ -887,7 +887,7 @@ MacroAssemblerARM::ma_check_mul(Register src1, Register src2, Register dest, Con
return NotEqual;
}
MOZ_CRASH("Condition NYI");
MOZ_ASSUME_UNREACHABLE("Condition NYI");
}
Assembler::Condition
@ -905,7 +905,7 @@ MacroAssemblerARM::ma_check_mul(Register src1, Imm32 imm, Register dest, Conditi
return NotEqual;
}
MOZ_CRASH("Condition NYI");
MOZ_ASSUME_UNREACHABLE("Condition NYI");
}
void
@ -1016,7 +1016,7 @@ void
MacroAssemblerARM::ma_dtr(LoadStore ls, Register rn, Register rm, Register rt,
Index mode, Assembler::Condition cc)
{
MOZ_CRASH("Feature NYI");
MOZ_ASSUME_UNREACHABLE("Feature NYI");
}
void
@ -1362,7 +1362,7 @@ MacroAssemblerARM::ma_b(void *target, Relocation::Kind reloc, Assembler::Conditi
m_buffer.markGuard();
break;
default:
MOZ_CRASH("Other methods of generating tracable jumps NYI");
MOZ_ASSUME_UNREACHABLE("Other methods of generating tracable jumps NYI");
}
}
@ -3486,7 +3486,7 @@ MacroAssemblerARMCompat::loadValue(Address src, ValueOperand val)
mode = IB;
break;
default:
MOZ_CRASH("Bogus Offset for LoadValue as DTM");
MOZ_ASSUME_UNREACHABLE("Bogus Offset for LoadValue as DTM");
}
startDataTransferM(IsLoad, Register::FromCode(srcOp.base()), mode);
transferReg(val.payloadReg());
@ -3556,7 +3556,8 @@ MacroAssemblerARMCompat::storePayload(Register src, Operand dest)
ma_str(src, ToPayload(dest));
return;
}
MOZ_CRASH("unexpected operand");
MOZ_ASSUME_UNREACHABLE("why do we do all of these things?");
}
void
@ -3604,7 +3605,9 @@ MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Operand dest) {
ma_str(secondScratchReg_, ToType(dest));
return;
}
MOZ_CRASH("unexpected operand");
MOZ_ASSUME_UNREACHABLE("why do we do all of these things?");
}
void
@ -3818,7 +3821,7 @@ MacroAssemblerARMCompat::passHardFpABIArg(const MoveOperand &from, MoveOp::Type
break;
}
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
enoughMemory_ = moveResolver_.addMove(from, to, type);
@ -3848,7 +3851,7 @@ MacroAssemblerARMCompat::passSoftFpABIArg(const MoveOperand &from, MoveOp::Type
passedArgTypes_ = (passedArgTypes_ << ArgType_Shift) | ArgType_General;
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
Register destReg;
@ -3995,7 +3998,7 @@ MacroAssemblerARMCompat::callWithABIPost(uint32_t stackAdjust, MoveOp::Type resu
break;
default:
MOZ_CRASH("unexpected callWithABI result");
MOZ_ASSUME_UNREACHABLE("unexpected callWithABI result");
}
freeStack(stackAdjust);
@ -4035,7 +4038,7 @@ AssertValidABIFunctionType(uint32_t passedArgTypes)
case Args_Int_IntDouble:
break;
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
#endif
@ -4050,7 +4053,7 @@ MacroAssemblerARMCompat::callWithABI(void *fun, MoveOp::Type result)
case MoveOp::GENERAL: passedArgTypes_ |= ArgType_General; break;
case MoveOp::DOUBLE: passedArgTypes_ |= ArgType_Double; break;
case MoveOp::FLOAT32: passedArgTypes_ |= ArgType_Float32; break;
default: MOZ_CRASH("Invalid return type");
default: MOZ_ASSUME_UNREACHABLE("Invalid return type");
}
#ifdef DEBUG
AssertValidABIFunctionType(passedArgTypes_);

View File

@ -420,7 +420,7 @@ class MacroAssemblerARM : public Assembler
return transferMultipleByRunsImpl
<FloatRegisterBackwardIterator>(set, ls, rm, mode, -1);
}
MOZ_CRASH("Invalid data transfer addressing mode");
MOZ_ASSUME_UNREACHABLE("Invalid data transfer addressing mode");
}
private:
@ -530,10 +530,10 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
mov(ImmWord(uintptr_t(imm.value)), dest);
}
void mov(Register src, Address dest) {
MOZ_CRASH("NYI-IC");
MOZ_ASSUME_UNREACHABLE("NYI-IC");
}
void mov(Address src, Register dest) {
MOZ_CRASH("NYI-IC");
MOZ_ASSUME_UNREACHABLE("NYI-IC");
}
void call(const Register reg) {

View File

@ -136,7 +136,7 @@ MoveEmitterARM::breakCycle(const MoveOperand &from, const MoveOperand &to, MoveO
}
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
@ -175,7 +175,7 @@ MoveEmitterARM::completeCycle(const MoveOperand &from, const MoveOperand &to, Mo
}
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
@ -204,7 +204,7 @@ MoveEmitterARM::emitMove(const MoveOperand &from, const MoveOperand &to)
masm.ma_str(from.reg(), toOperand(to, false));
break;
default:
MOZ_CRASH("strange move!");
MOZ_ASSUME_UNREACHABLE("strange move!");
}
} else if (to.isGeneralReg()) {
JS_ASSERT(from.isMemoryOrEffectiveAddress());
@ -299,7 +299,7 @@ MoveEmitterARM::emit(const MoveOp &move)
emitMove(from, to);
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}

View File

@ -1653,8 +1653,9 @@ Simulator::conditionallyExecute(SimInstruction *instr)
case Assembler::GT: return !z_flag_ && (n_flag_ == v_flag_);
case Assembler::LE: return z_flag_ || (n_flag_ != v_flag_);
case Assembler::AL: return true;
default: MOZ_ASSUME_UNREACHABLE();
}
MOZ_CRASH("unexpected condition field");
return false;
}
// Calculate and set the Negative and Zero flags.
@ -1767,7 +1768,8 @@ Simulator::getShiftRm(SimInstruction *instr, bool *carry_out)
if (instr->bit(4) == 0) {
// By immediate.
if (shift == ROR && shift_amount == 0) {
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
return result;
}
if ((shift == LSR || shift == ASR) && shift_amount == 0)
shift_amount = 32;
@ -1827,7 +1829,8 @@ Simulator::getShiftRm(SimInstruction *instr, bool *carry_out)
}
default:
MOZ_CRASH("Unexpected shift");
MOZ_ASSUME_UNREACHABLE();
break;
}
} else {
// By register.
@ -1904,7 +1907,8 @@ Simulator::getShiftRm(SimInstruction *instr, bool *carry_out)
}
default:
MOZ_CRASH("Unexpected shift");
MOZ_ASSUME_UNREACHABLE();
break;
}
}
return result;
@ -1930,7 +1934,8 @@ Simulator::processPU(SimInstruction *instr, int num_regs, int reg_size,
int32_t rn_val = get_register(rn);
switch (instr->PUField()) {
case da_x:
MOZ_CRASH("Unexpected PUField: da_x");
MOZ_CRASH();
break;
case ia_x:
*start_address = rn_val;
*end_address = rn_val + (num_regs * reg_size) - reg_size;
@ -1947,7 +1952,8 @@ Simulator::processPU(SimInstruction *instr, int num_regs, int reg_size,
rn_val = *end_address;
break;
default:
MOZ_CRASH("Unexpected PUField");
MOZ_ASSUME_UNREACHABLE();
break;
}
return rn_val;
}
@ -2285,7 +2291,7 @@ Simulator::softwareInterrupt(SimInstruction *instr)
break;
}
default:
MOZ_CRASH("call");
MOZ_ASSUME_UNREACHABLE("call");
}
set_register(lr, saved_lr);
@ -3326,7 +3332,7 @@ Simulator::decodeTypeVFP(SimInstruction *instr)
const bool is_vmls = (instr->opc3Value() & 0x1);
if (instr->szValue() != 0x1)
MOZ_CRASH("Not used by V8.");
MOZ_ASSUME_UNREACHABLE(); // Not used by V8.
const double dd_val = get_double_from_d_register(vd);
const double dn_val = get_double_from_d_register(vn);
@ -3733,7 +3739,7 @@ Simulator::decodeVCVTBetweenFloatingPointAndIntegerFrac(SimInstruction *instr)
set_s_register_from_sinteger(dst, temp);
}
} else {
MOZ_CRASH("Not implemented, fixed to float.");
MOZ_ASSUME_UNREACHABLE(); // Not implemented, fixed to float.
}
}

View File

@ -691,7 +691,7 @@ JitRuntime::generateBailoutHandler(JSContext *cx, ExecutionMode mode)
GenerateParallelBailoutThunk(masm, NO_FRAME_SIZE_CLASS_ID);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
Linker linker(masm);
@ -825,7 +825,7 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
masm.branchIfFalseBool(r0, masm.failureLabel(f.executionMode));
break;
default:
MOZ_CRASH("unknown failure kind");
MOZ_ASSUME_UNREACHABLE("unknown failure kind");
}
// Load the outparam and free any allocated stack.

View File

@ -59,7 +59,7 @@ ABIArgGenerator::next(MIRType type)
}
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
return current_;
@ -383,7 +383,8 @@ Assembler::InvertCondition(Condition cond)
case NotSigned:
return Signed;
default:
MOZ_CRASH("unexpected condition");
MOZ_ASSUME_UNREACHABLE("unexpected condition");
return Equal;
}
}
@ -420,7 +421,8 @@ Assembler::InvertCondition(DoubleCondition cond)
case DoubleLessThanOrEqualOrUnordered:
return DoubleGreaterThan;
default:
MOZ_CRASH("unexpected condition");
MOZ_ASSUME_UNREACHABLE("unexpected condition");
return DoubleEqual;
}
}
@ -620,7 +622,7 @@ Assembler::getBranchCode(Register s, Condition c)
case Assembler::LessThanOrEqual:
return InstImm(op_blez, s, zero, BOffImm16(0));
default:
MOZ_CRASH("Condition not supported.");
MOZ_ASSUME_UNREACHABLE("Condition not supported.");
}
}
@ -1510,7 +1512,8 @@ InstImm Assembler::invertBranch(InstImm branch, BOffImm16 skipOffset)
return branch;
}
MOZ_CRASH("Error creating long branch.");
MOZ_ASSUME_UNREACHABLE("Error creating long branch.");
return branch;
case op_cop1:
MOZ_ASSERT(branch.extractRS() == rs_bc1 >> RSShift);
@ -1524,7 +1527,8 @@ InstImm Assembler::invertBranch(InstImm branch, BOffImm16 skipOffset)
return branch;
}
MOZ_CRASH("Error creating long branch.");
MOZ_ASSUME_UNREACHABLE("Error creating long branch.");
return branch;
}
void

View File

@ -27,7 +27,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
switch (mode_) {
case SequentialExecution: topIonScript_ = script()->ionScript(); break;
case ParallelExecution: topIonScript_ = script()->parallelIonScript(); break;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
if (bailout->frameClass() == FrameSizeClass::None()) {

View File

@ -180,7 +180,7 @@ ICBinaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
}
break;
default:
MOZ_CRASH("Unhandled op for BinaryArith_Int32.");
MOZ_ASSUME_UNREACHABLE("Unhandled op for BinaryArith_Int32.");
}
EmitReturnFromIC(masm);
@ -209,7 +209,7 @@ ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
masm.neg32(R0.payloadReg());
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
return false;
}

View File

@ -847,7 +847,7 @@ CodeGeneratorMIPS::visitBitOpI(LBitOpI *ins)
masm.ma_and(ToRegister(dest), ToRegister(lhs), ToRegister(rhs));
break;
default:
MOZ_CRASH("unexpected binary opcode");
MOZ_ASSUME_UNREACHABLE("unexpected binary opcode");
}
return true;
@ -888,7 +888,7 @@ CodeGeneratorMIPS::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
} else {
// The shift amounts should be AND'ed into the 0-31 range
@ -910,7 +910,7 @@ CodeGeneratorMIPS::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
}
@ -1077,7 +1077,7 @@ CodeGeneratorMIPS::visitMathD(LMathD *math)
masm.as_divd(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return true;
}
@ -1103,7 +1103,7 @@ CodeGeneratorMIPS::visitMathF(LMathF *math)
masm.as_divs(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return true;
}
@ -1893,13 +1893,13 @@ DispatchIonCache::initializeAddCacheState(LInstruction *ins, AddCacheState *addS
bool
CodeGeneratorMIPS::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
CodeGeneratorMIPS::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
@ -1921,7 +1921,7 @@ CodeGeneratorMIPS::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
case ArrayBufferView::TYPE_UINT32: isSigned = false; size = 32; break;
case ArrayBufferView::TYPE_FLOAT64: isFloat = true; size = 64; break;
case ArrayBufferView::TYPE_FLOAT32: isFloat = true; size = 32; break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
if (ptr->isConstant()) {
@ -2008,7 +2008,7 @@ CodeGeneratorMIPS::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
case ArrayBufferView::TYPE_UINT32: isSigned = false; size = 32; break;
case ArrayBufferView::TYPE_FLOAT64: isFloat = true; size = 64; break;
case ArrayBufferView::TYPE_FLOAT32: isFloat = true; size = 32; break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
if (ptr->isConstant()) {
@ -2252,11 +2252,11 @@ CodeGeneratorMIPS::visitNegF(LNegF *ins)
bool
CodeGeneratorMIPS::visitForkJoinGetSlice(LForkJoinGetSlice *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
JitCode *
JitRuntime::generateForkJoinGetSliceStub(JSContext *cx)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}

View File

@ -75,7 +75,7 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
return bailoutCmp32(c, lhs.toReg(), rhs, snapshot);
if (lhs.getTag() == Operand::MEM)
return bailoutCmp32(c, lhs.toAddress(), rhs, snapshot);
MOZ_CRASH("Invalid operand tag.");
MOZ_ASSUME_UNREACHABLE("Invalid operand tag.");
return false;
}
template<typename T>

View File

@ -523,11 +523,11 @@ LIRGeneratorMIPS::lowerTruncateFToInt32(MTruncateToInt32 *ins)
bool
LIRGeneratorMIPS::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
LIRGeneratorMIPS::visitForkJoinGetSlice(MForkJoinGetSlice *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}

View File

@ -728,7 +728,8 @@ MacroAssemblerMIPS::ma_load(Register dest, Address address,
as_lw(dest, base, encodedOffset);
break;
default:
MOZ_CRASH("Invalid argument for ma_load");
MOZ_ASSUME_UNREACHABLE("Invalid argument for ma_load");
break;
}
}
@ -767,7 +768,8 @@ MacroAssemblerMIPS::ma_store(Register data, Address address, LoadStoreSize size,
as_sw(data, base, encodedOffset);
break;
default:
MOZ_CRASH("Invalid argument for ma_store");
MOZ_ASSUME_UNREACHABLE("Invalid argument for ma_store");
break;
}
}
@ -1068,11 +1070,13 @@ MacroAssemblerMIPS::ma_cmp(Register scratch, Register lhs, Register rhs, Conditi
case Always:
case Signed:
case NotSigned:
MOZ_CRASH("There is a better way to compare for equality.");
MOZ_ASSUME_UNREACHABLE("There is a better way to compare for equality.");
break;
case Overflow:
MOZ_CRASH("Overflow condition not supported for MIPS.");
MOZ_ASSUME_UNREACHABLE("Overflow condition not supported for MIPS.");
break;
default:
MOZ_CRASH("Invalid condition for branch.");
MOZ_ASSUME_UNREACHABLE("Invalid condition for branch.");
}
return Always;
}
@ -1167,7 +1171,8 @@ MacroAssemblerMIPS::ma_cmp_set(Register rd, Register rs, Register rt, Condition
as_xori(rd, rd, 1);
break;
default:
MOZ_CRASH("Invalid condition for ma_cmp_set.");
MOZ_ASSUME_UNREACHABLE("Invalid condition for ma_cmp_set.");
break;
}
}
@ -1234,7 +1239,8 @@ MacroAssemblerMIPS::compareFloatingPoint(FloatFormat fmt, FloatRegister lhs, Flo
*testKind = TestForTrue;
break;
default:
MOZ_CRASH("Invalid DoubleCondition.");
MOZ_ASSUME_UNREACHABLE("Invalid DoubleCondition.");
break;
}
}
@ -3184,7 +3190,7 @@ MacroAssemblerMIPSCompat::passABIArg(const MoveOperand &from, MoveOp::Type type)
passedArgTypes_ = (passedArgTypes_ << ArgType_Shift) | ArgType_General;
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
}
@ -3333,7 +3339,7 @@ AssertValidABIFunctionType(uint32_t passedArgTypes)
case Args_Int_IntDouble:
break;
default:
MOZ_CRASH("Unexpected type");
MOZ_ASSUME_UNREACHABLE("Unexpected type");
}
}
#endif
@ -3348,7 +3354,7 @@ MacroAssemblerMIPSCompat::callWithABI(void *fun, MoveOp::Type result)
case MoveOp::GENERAL: passedArgTypes_ |= ArgType_General; break;
case MoveOp::DOUBLE: passedArgTypes_ |= ArgType_Double; break;
case MoveOp::FLOAT32: passedArgTypes_ |= ArgType_Float32; break;
default: MOZ_CRASH("Invalid return type");
default: MOZ_ASSUME_UNREACHABLE("Invalid return type");
}
#ifdef DEBUG
AssertValidABIFunctionType(passedArgTypes_);

View File

@ -379,10 +379,10 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
mov(ImmWord(uintptr_t(imm.value)), dest);
}
void mov(Register src, Address dest) {
MOZ_CRASH("NYI-IC");
MOZ_ASSUME_UNREACHABLE("NYI-IC");
}
void mov(Address src, Register dest) {
MOZ_CRASH("NYI-IC");
MOZ_ASSUME_UNREACHABLE("NYI-IC");
}
void call(const Register reg) {
@ -997,7 +997,7 @@ public:
ma_addTestOverflow(dest, dest, src, overflow);
break;
default:
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
}
template <typename T>
@ -1012,7 +1012,7 @@ public:
ma_b(dest, dest, overflow, cond);
break;
default:
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
}

View File

@ -113,7 +113,7 @@ MoveEmitterMIPS::breakCycle(const MoveOperand &from, const MoveOperand &to, Move
}
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
@ -159,7 +159,7 @@ MoveEmitterMIPS::completeCycle(const MoveOperand &from, const MoveOperand &to, M
}
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
@ -175,7 +175,7 @@ MoveEmitterMIPS::emitMove(const MoveOperand &from, const MoveOperand &to)
else if (to.isMemory())
masm.storePtr(from.reg(), getAdjustedAddress(to));
else
MOZ_CRASH("Invalid emitMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitMove arguments.");
} else if (from.isMemory()) {
if (to.isGeneralReg()) {
masm.loadPtr(getAdjustedAddress(from), to.reg());
@ -183,7 +183,7 @@ MoveEmitterMIPS::emitMove(const MoveOperand &from, const MoveOperand &to)
masm.loadPtr(getAdjustedAddress(from), tempReg());
masm.storePtr(tempReg(), getAdjustedAddress(to));
} else {
MOZ_CRASH("Invalid emitMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitMove arguments.");
}
} else if (from.isEffectiveAddress()) {
if (to.isGeneralReg()) {
@ -192,10 +192,10 @@ MoveEmitterMIPS::emitMove(const MoveOperand &from, const MoveOperand &to)
masm.computeEffectiveAddress(getAdjustedAddress(from), tempReg());
masm.storePtr(tempReg(), getAdjustedAddress(to));
} else {
MOZ_CRASH("Invalid emitMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitMove arguments.");
}
} else {
MOZ_CRASH("Invalid emitMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitMove arguments.");
}
}
@ -252,7 +252,7 @@ MoveEmitterMIPS::emitDoubleMove(const MoveOperand &from, const MoveOperand &to)
else if(to.reg() == a3)
masm.moveFromDoubleHi(from.floatReg(), a3);
else
MOZ_CRASH("Invalid emitDoubleMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitDoubleMove arguments.");
} else {
MOZ_ASSERT(to.isMemory());
masm.storeDouble(from.floatReg(), getAdjustedAddress(to));
@ -270,7 +270,7 @@ MoveEmitterMIPS::emitDoubleMove(const MoveOperand &from, const MoveOperand &to)
else if(to.reg() == a3)
masm.loadPtr(Address(from.base(), getAdjustedOffset(from) + sizeof(uint32_t)), a3);
else
MOZ_CRASH("Invalid emitDoubleMove arguments.");
MOZ_ASSUME_UNREACHABLE("Invalid emitDoubleMove arguments.");
} else {
MOZ_ASSERT(from.isMemory());
MOZ_ASSERT(to.isMemory());
@ -311,7 +311,7 @@ MoveEmitterMIPS::emit(const MoveOp &move)
emitMove(from, to);
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}

View File

@ -944,7 +944,7 @@ MipsDebugger::debug()
value = getRegisterValue(reg.code());
printf("%s: 0x%08x %d \n", arg1, value, value);
} else if (fReg.code() != FloatRegisters::Invalid) {
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
} else {
printf("%s unrecognized\n", arg1);
}
@ -1865,7 +1865,7 @@ Simulator::softwareInterrupt(SimInstruction *instr)
// We first check if we met a call_rt_redirected.
if (instr->instructionBits() == kCallRedirInstr) {
#if !defined(USES_O32_ABI)
MOZ_CRASH("Only O32 ABI supported.");
MOZ_ASSUME_UNREACHABLE("Only O32 ABI supported.");
#else
Redirection *redirection = Redirection::FromSwiInstruction(instr);
int32_t arg0 = getRegister(a0);
@ -2021,7 +2021,7 @@ Simulator::softwareInterrupt(SimInstruction *instr)
break;
}
default:
MOZ_CRASH("call");
MOZ_ASSUME_UNREACHABLE("call");
}
setRegister(ra, saved_ra);
@ -2146,7 +2146,7 @@ Simulator::signalExceptions()
{
for (int i = 1; i < kNumExceptions; i++) {
if (exceptions[i] != 0)
MOZ_CRASH("Error: Exception raised.");
MOZ_ASSUME_UNREACHABLE("Error: Exception raised.");
}
}
@ -3298,7 +3298,7 @@ Simulator::branchDelayInstructionDecode(SimInstruction *instr)
}
if (instr->isForbiddenInBranchDelay()) {
MOZ_CRASH("Eror:Unexpected opcode in a branch delay slot.");
MOZ_ASSUME_UNREACHABLE("Eror:Unexpected opcode in a branch delay slot.");
}
instructionDecode(instr);
}

View File

@ -690,7 +690,7 @@ JitRuntime::generateBailoutHandler(JSContext *cx, ExecutionMode mode)
GenerateParallelBailoutThunk(masm, NO_FRAME_SIZE_CLASS_ID);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
Linker linker(masm);
@ -843,7 +843,7 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
masm.branchIfFalseBool(v0, masm.failureLabel(f.executionMode));
break;
default:
MOZ_CRASH("unknown failure kind");
MOZ_ASSUME_UNREACHABLE("unknown failure kind");
}
masm.freeStack(outParamOffset);

View File

@ -65,7 +65,7 @@ ScaleFromElemWidth(int shift)
return TimesEight;
}
MOZ_CRASH("Invalid scale");
MOZ_ASSUME_UNREACHABLE("Invalid scale");
}
// Used for 32-bit immediates which do not require relocation.
@ -87,7 +87,7 @@ struct Imm32
case TimesEight:
return Imm32(3);
};
MOZ_CRASH("Invalid scale");
MOZ_ASSUME_UNREACHABLE("Invalid scale");
}
static inline Imm32 FactorOf(enum Scale s) {

View File

@ -128,6 +128,6 @@ AssemblerX86Shared::InvertCondition(Condition cond)
case BelowOrEqual:
return Above;
default:
MOZ_CRASH("unexpected condition");
MOZ_ASSUME_UNREACHABLE("unexpected condition");
}
}

View File

@ -245,7 +245,7 @@ class AssemblerX86Shared : public AssemblerShared
return NaN_IsTrue;
}
MOZ_CRASH("Unknown double condition");
MOZ_ASSUME_UNREACHABLE("Unknown double condition");
}
static void StaticAsserts() {
@ -361,7 +361,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movl_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movl(Register src, const Operand &dest) {
@ -379,7 +379,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movl_rm(src.code(), dest.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movl(Imm32 imm32, const Operand &dest) {
@ -394,7 +394,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movl_i32m(imm32.value, dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -450,7 +450,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movdqa_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movdqa(FloatRegister src, const Operand &dest) {
@ -463,7 +463,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movdqa_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cvtss2sd(FloatRegister src, FloatRegister dest) {
@ -483,7 +483,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movzbl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movsbl(const Operand &src, Register dest) {
@ -495,7 +495,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movsbl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movb(Register src, const Operand &dest) {
@ -507,7 +507,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movb_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movb(Imm32 src, const Operand &dest) {
@ -519,7 +519,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movb_i8m(src.value, dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movzwl(const Operand &src, Register dest) {
@ -534,7 +534,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movzwl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movzwl(Register src, Register dest) {
@ -549,7 +549,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movw_rm(src.code(), dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movw(Imm32 src, const Operand &dest) {
@ -561,7 +561,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movw_i16m(src.value, dest.disp(), dest.base(), dest.index(), dest.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movswl(const Operand &src, Register dest) {
@ -573,7 +573,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.movswl_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void leal(const Operand &src, Register dest) {
@ -585,7 +585,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.leal_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -670,7 +670,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.jmp_r(op.reg());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpEAX(Label *label) { cmpSrc(label); }
@ -769,7 +769,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.call_m(op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -804,7 +804,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cmpl_mr(rhs.disp(), rhs.base(), lhs.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpl(Register src, Imm32 imm) {
@ -825,7 +825,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cmpl_im(imm.value, op.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpl(const Operand &lhs, Register rhs) {
@ -840,7 +840,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cmpl_rm(rhs.code(), lhs.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpl(const Operand &op, ImmWord imm) {
@ -855,7 +855,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cmpl_im(imm.value, op.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpl(const Operand &op, ImmPtr imm) {
@ -893,7 +893,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.testl_i32m(rhs.value, lhs.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
break;
}
}
@ -913,7 +913,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.addl_im(imm.value, op.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void subl(Imm32 imm, Register dest) {
@ -928,7 +928,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.subl_im(imm.value, op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void addl(Register src, Register dest) {
@ -946,7 +946,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.subl_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void subl(Register src, const Operand &dest) {
@ -958,7 +958,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.subl_rm(src.code(), dest.disp(), dest.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void orl(Register reg, Register dest) {
@ -976,7 +976,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.orl_im(imm.value, op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void xorl(Register src, Register dest) {
@ -994,7 +994,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.xorl_im(imm.value, op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void andl(Register src, Register dest) {
@ -1012,7 +1012,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.andl_im(imm.value, op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void addl(const Operand &src, Register dest) {
@ -1024,7 +1024,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.addl_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void orl(const Operand &src, Register dest) {
@ -1036,7 +1036,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.orl_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void xorl(const Operand &src, Register dest) {
@ -1048,7 +1048,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.xorl_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void andl(const Operand &src, Register dest) {
@ -1060,7 +1060,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.andl_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void imull(Register multiplier) {
@ -1084,7 +1084,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.imull_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void negl(const Operand &src) {
@ -1096,7 +1096,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.negl_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void negl(Register reg) {
@ -1111,7 +1111,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.notl_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void notl(Register reg) {
@ -1142,7 +1142,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.incl_m32(op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void lock_incl(const Operand &op) {
@ -1156,7 +1156,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.decl_m32(op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void lock_decl(const Operand &op) {
@ -1171,7 +1171,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cmpxchg32(src.code(), op.disp(), op.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -1184,7 +1184,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.xaddl_rm(srcdest.code(), mem.disp(), mem.base(), mem.index(), mem.scale());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -1201,7 +1201,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.push_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void push(Register src) {
@ -1220,7 +1220,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.pop_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void pop(Register src) {
@ -1276,7 +1276,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.pinsrd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void psrldq(Imm32 shift, FloatRegister dest) {
@ -1305,7 +1305,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cvtsi2sd_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cvttsd2si(FloatRegister src, Register dest) {
@ -1329,7 +1329,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.cvtsi2ss_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cvtsi2ss(Register src, FloatRegister dest) {
@ -1393,7 +1393,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.addsd_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void addss(const Operand &src, FloatRegister dest) {
@ -1409,7 +1409,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.addss_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void subsd(FloatRegister src, FloatRegister dest) {
@ -1430,7 +1430,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.subsd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void subss(const Operand &src, FloatRegister dest) {
@ -1443,7 +1443,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.subss_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void mulsd(FloatRegister src, FloatRegister dest) {
@ -1460,7 +1460,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.mulsd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void mulss(const Operand &src, FloatRegister dest) {
@ -1473,7 +1473,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.mulss_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void mulss(FloatRegister src, FloatRegister dest) {
@ -1498,7 +1498,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.divsd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void divss(const Operand &src, FloatRegister dest) {
@ -1511,7 +1511,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.divss_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void xorpd(FloatRegister src, FloatRegister dest) {
@ -1568,7 +1568,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.minsd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void maxsd(FloatRegister src, FloatRegister dest) {
@ -1585,7 +1585,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.maxsd_mr(src.disp(), src.base(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void fisttp(const Operand &dest) {
@ -1595,7 +1595,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.fisttp_m(dest.disp(), dest.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void fld(const Operand &dest) {
@ -1604,7 +1604,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.fld_m(dest.disp(), dest.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void fstp(const Operand &src) {
@ -1613,7 +1613,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.fstp_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void fstp32(const Operand &src) {
@ -1622,7 +1622,7 @@ class AssemblerX86Shared : public AssemblerShared
masm.fstp32_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -1673,14 +1673,14 @@ class AssemblerX86Shared : public AssemblerShared
}
static void PatchInstructionImmediate(uint8_t *code, PatchedImmPtr imm) {
MOZ_CRASH("Unused.");
MOZ_ASSUME_UNREACHABLE("Unused.");
}
static uint32_t NopSize() {
return 1;
}
static uint8_t *NextInstruction(uint8_t *cur, uint32_t *count) {
MOZ_CRASH("nextInstruction NYI on x86");
MOZ_ASSUME_UNREACHABLE("nextInstruction NYI on x86");
}
// Toggle a jmp or cmp emitted by toggledJump().

View File

@ -19,7 +19,7 @@ ToInt32(const LAllocation *a)
return a->toConstant()->toInt32();
if (a->isConstantIndex())
return a->toConstantIndex()->index();
MOZ_CRASH("this is not a constant!");
MOZ_ASSUME_UNREACHABLE("this is not a constant!");
}
static inline double
ToDouble(const LAllocation *a)

View File

@ -343,7 +343,7 @@ CodeGeneratorShared::assignBailoutId(LSnapshot *snapshot)
switch (gen->info().executionMode()) {
case SequentialExecution: break;
case ParallelExecution: return false;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
JS_ASSERT(frameClass_ != FrameSizeClass::None());

View File

@ -1326,7 +1326,7 @@ CodeGeneratorX86Shared::visitBitOpI(LBitOpI *ins)
masm.andl(ToOperand(rhs), ToRegister(lhs));
break;
default:
MOZ_CRASH("unexpected binary opcode");
MOZ_ASSUME_UNREACHABLE("unexpected binary opcode");
}
return true;
@ -1360,7 +1360,7 @@ CodeGeneratorX86Shared::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
} else {
JS_ASSERT(ToRegister(rhs) == ecx);
@ -1381,7 +1381,7 @@ CodeGeneratorX86Shared::visitShiftI(LShiftI *ins)
}
break;
default:
MOZ_CRASH("Unexpected shift op");
MOZ_ASSUME_UNREACHABLE("Unexpected shift op");
}
}
@ -1523,7 +1523,7 @@ CodeGeneratorX86Shared::visitMathD(LMathD *math)
masm.divsd(rhs, lhs);
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
}
return true;
}
@ -1550,7 +1550,7 @@ CodeGeneratorX86Shared::visitMathF(LMathF *math)
masm.divss(rhs, lhs);
break;
default:
MOZ_CRASH("unexpected opcode");
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
return false;
}
return true;

View File

@ -243,7 +243,7 @@ struct AssemblerBuffer
return BufferOffset(bufferSize);
}
BufferOffset prevOffset() const {
MOZ_CRASH("Don't current record lastInstSize");
MOZ_ASSUME_UNREACHABLE("Don't current record lastInstSize");
}
// Break the instruction stream so we can go back and edit it at this point

View File

@ -1202,7 +1202,7 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
}
start = poolGroup[idx].other->addPoolSize(start);
}
MOZ_CRASH("Entry is not in a pool");
MOZ_ASSUME_UNREACHABLE("Entry is not in a pool");
}
void writePoolEntry(PoolEntry pe, uint8_t *buff) {
size_t size = getPoolEntrySize(pe);

View File

@ -404,7 +404,7 @@ class MacroAssemblerX86Shared : public Assembler
loadDouble(src.toBaseIndex(), dest);
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void storeDouble(FloatRegister src, const Address &dest) {
@ -422,7 +422,7 @@ class MacroAssemblerX86Shared : public Assembler
storeDouble(src, dest.toBaseIndex());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void moveDouble(FloatRegister src, FloatRegister dest) {
@ -499,7 +499,7 @@ class MacroAssemblerX86Shared : public Assembler
loadFloat32(src.toBaseIndex(), dest);
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void storeFloat32(FloatRegister src, const Address &dest) {
@ -517,7 +517,7 @@ class MacroAssemblerX86Shared : public Assembler
storeFloat32(src, dest.toBaseIndex());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void moveFloat32(FloatRegister src, FloatRegister dest) {

View File

@ -142,7 +142,7 @@ MoveEmitterX86::emit(const MoveResolver &moves)
emitGeneralMove(from, to);
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
}
@ -256,7 +256,7 @@ MoveEmitterX86::breakCycle(const MoveOperand &to, MoveOp::Type type)
masm.Push(toOperand(to));
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}
@ -308,7 +308,7 @@ MoveEmitterX86::completeCycle(const MoveOperand &to, MoveOp::Type type)
masm.Pop(toPopOperand(to));
break;
default:
MOZ_CRASH("Unexpected move type");
MOZ_ASSUME_UNREACHABLE("Unexpected move type");
}
}

View File

@ -44,7 +44,7 @@ ABIArgGenerator::next(MIRType type)
current_ = ABIArg(FloatArgRegs[regIndex_++]);
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
return current_;
#else
@ -68,7 +68,7 @@ ABIArgGenerator::next(MIRType type)
current_ = ABIArg(FloatArgRegs[floatRegIndex_++]);
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
return current_;
#endif

View File

@ -344,7 +344,7 @@ class Assembler : public AssemblerX86Shared
masm.movq_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movq(Register src, const Operand &dest) {
@ -362,7 +362,7 @@ class Assembler : public AssemblerX86Shared
masm.movq_rm(src.code(), dest.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movq(Imm32 imm32, const Operand &dest) {
@ -380,7 +380,7 @@ class Assembler : public AssemblerX86Shared
masm.movq_i32m(imm32.value, dest.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movq(Register src, FloatRegister dest) {
@ -418,7 +418,7 @@ class Assembler : public AssemblerX86Shared
masm.andq_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -437,7 +437,7 @@ class Assembler : public AssemblerX86Shared
masm.addq_im(imm.value, dest.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void addq(Register src, Register dest) {
@ -455,7 +455,7 @@ class Assembler : public AssemblerX86Shared
masm.addq_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -477,7 +477,7 @@ class Assembler : public AssemblerX86Shared
masm.subq_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void subq(Register src, const Operand &dest) {
@ -489,7 +489,7 @@ class Assembler : public AssemblerX86Shared
masm.subq_rm(src.code(), dest.disp(), dest.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void shlq(Imm32 imm, Register dest) {
@ -519,7 +519,7 @@ class Assembler : public AssemblerX86Shared
masm.orq_mr(src.address(), dest.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void xorq(Register src, Register dest) {
@ -578,7 +578,7 @@ class Assembler : public AssemblerX86Shared
masm.leaq_mr(src.disp(), src.base(), src.index(), src.scale(), dest.code());
break;
default:
MOZ_CRASH("unexepcted operand kind");
MOZ_ASSUME_UNREACHABLE("unexepcted operand kind");
}
}
@ -616,7 +616,7 @@ class Assembler : public AssemblerX86Shared
masm.cmpq_rm(rhs.code(), lhs.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpq(const Operand &lhs, Imm32 rhs) {
@ -631,7 +631,7 @@ class Assembler : public AssemblerX86Shared
masm.cmpq_im(rhs.value, lhs.address());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpq(Register lhs, const Operand &rhs) {
@ -643,7 +643,7 @@ class Assembler : public AssemblerX86Shared
masm.cmpq_mr(rhs.disp(), rhs.base(), lhs.code());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpq(Register lhs, Register rhs) {
@ -668,7 +668,8 @@ class Assembler : public AssemblerX86Shared
masm.testq_i32m(rhs.value, lhs.disp(), lhs.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
break;
}
}

View File

@ -60,7 +60,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
switch (mode_) {
case SequentialExecution: topIonScript_ = script()->ionScript(); break;
case ParallelExecution: topIonScript_ = script()->parallelIonScript(); break;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
snapshotOffset_ = bailout->snapshotOffset();
}

View File

@ -184,7 +184,7 @@ ICBinaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
}
break;
default:
MOZ_CRASH("Unhandled op in BinaryArith_Int32");
MOZ_ASSUME_UNREACHABLE("Unhandled op in BinaryArith_Int32");
}
// Return from stub.
@ -233,7 +233,7 @@ ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
masm.negl(R0.valueReg());
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
}
masm.tagValue(JSVAL_TYPE_INT32, R0.valueReg(), R0);

View File

@ -54,7 +54,7 @@ FrameSizeClass::ClassLimit()
uint32_t
FrameSizeClass::frameSize() const
{
MOZ_CRASH("x64 does not use frame size classes");
MOZ_ASSUME_UNREACHABLE("x64 does not use frame size classes");
}
bool
@ -110,7 +110,7 @@ CodeGeneratorX64::visitUnbox(LUnbox *unbox)
cond = masm.testSymbol(Assembler::NotEqual, value);
break;
default:
MOZ_CRASH("Given MIRType cannot be unboxed.");
MOZ_ASSUME_UNREACHABLE("Given MIRType cannot be unboxed.");
}
if (!bailoutIf(cond, unbox->snapshot()))
return false;
@ -133,7 +133,7 @@ CodeGeneratorX64::visitUnbox(LUnbox *unbox)
masm.unboxSymbol(value, ToRegister(result));
break;
default:
MOZ_CRASH("Given MIRType cannot be unboxed.");
MOZ_ASSUME_UNREACHABLE("Given MIRType cannot be unboxed.");
}
return true;
@ -231,13 +231,13 @@ CodeGeneratorX64::visitAsmJSUInt32ToFloat32(LAsmJSUInt32ToFloat32 *lir)
bool
CodeGeneratorX64::visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
CodeGeneratorX64::visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}
bool
@ -271,7 +271,7 @@ CodeGeneratorX64::visitAsmJSLoadHeap(LAsmJSLoadHeap *ins)
case Scalar::Uint32: masm.movl(srcAddr, ToRegister(ins->output())); break;
case Scalar::Float32: masm.loadFloat32(srcAddr, ToFloatRegister(ins->output())); break;
case Scalar::Float64: masm.loadDouble(srcAddr, ToFloatRegister(ins->output())); break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
uint32_t after = masm.size();
if (!skipNote)
@ -308,7 +308,7 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
case Scalar::Uint16: masm.movw(Imm32(ToInt32(ins->value())), dstAddr); break;
case Scalar::Int32:
case Scalar::Uint32: masm.movl(Imm32(ToInt32(ins->value())), dstAddr); break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
} else {
switch (vt) {
@ -320,7 +320,7 @@ CodeGeneratorX64::visitAsmJSStoreHeap(LAsmJSStoreHeap *ins)
case Scalar::Uint32: masm.movl(ToRegister(ins->value()), dstAddr); break;
case Scalar::Float32: masm.storeFloat32(ToFloatRegister(ins->value()), dstAddr); break;
case Scalar::Float64: masm.storeDouble(ToFloatRegister(ins->value()), dstAddr); break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
}
uint32_t after = masm.size();

View File

@ -168,7 +168,7 @@ LIRGeneratorX64::visitAsmJSStoreHeap(MAsmJSStoreHeap *ins)
lir = new(alloc()) LAsmJSStoreHeap(ptrAlloc, useRegisterAtStart(ins->value()));
break;
default:
MOZ_CRASH("unexpected array type");
MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
return add(lir, ins);
@ -183,5 +183,5 @@ LIRGeneratorX64::visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins)
bool
LIRGeneratorX64::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins)
{
MOZ_CRASH("NYI");
MOZ_ASSUME_UNREACHABLE("NYI");
}

View File

@ -150,7 +150,7 @@ MacroAssemblerX64::passABIArg(const MoveOperand &from, MoveOp::Type type)
switch (type) {
case MoveOp::FLOAT32: stackForCall_ += sizeof(float); break;
case MoveOp::DOUBLE: stackForCall_ += sizeof(double); break;
default: MOZ_CRASH("Unexpected float register class argument type");
default: MOZ_ASSUME_UNREACHABLE("Unexpected float register class argument type");
}
}
break;
@ -170,7 +170,7 @@ MacroAssemblerX64::passABIArg(const MoveOperand &from, MoveOp::Type type)
break;
}
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
enoughMemory_ = moveResolver_.addMove(from, to, type);

View File

@ -113,7 +113,7 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
base.scale(), base.disp() + 4);
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
static inline Operand ToUpper32(const Address &address) {

View File

@ -519,7 +519,7 @@ GenerateParallelBailoutThunk(MacroAssembler &masm)
JitCode *
JitRuntime::generateBailoutTable(JSContext *cx, uint32_t frameClass)
{
MOZ_CRASH("x64 does not use bailout tables");
MOZ_ASSUME_UNREACHABLE("x64 does not use bailout tables");
}
JitCode *
@ -535,7 +535,7 @@ JitRuntime::generateBailoutHandler(JSContext *cx, ExecutionMode mode)
GenerateParallelBailoutThunk(masm);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
Linker linker(masm);
@ -651,7 +651,7 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
break;
case VMFunction::DoubleByValue:
case VMFunction::DoubleByRef:
MOZ_CRASH("NYI: x64 callVM should not be used with 128bits values.");
MOZ_ASSUME_UNREACHABLE("NYI: x64 callVM should not be used with 128bits values.");
}
}
@ -671,7 +671,7 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
masm.j(Assembler::Zero, masm.failureLabel(f.executionMode));
break;
default:
MOZ_CRASH("unknown failure kind");
MOZ_ASSUME_UNREACHABLE("unknown failure kind");
}
// Load the outparam and free any allocated stack.

View File

@ -30,7 +30,7 @@ ABIArgGenerator::next(MIRType type)
stackOffset_ += sizeof(uint64_t);
break;
default:
MOZ_CRASH("Unexpected argument type");
MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
return current_;
}

View File

@ -237,7 +237,7 @@ class Assembler : public AssemblerX86Shared
writeDataRelocation(ptr);
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void movl(ImmWord imm, Register dest) {
@ -294,7 +294,7 @@ class Assembler : public AssemblerX86Shared
masm.fld32_m(dest.disp(), dest.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -304,7 +304,7 @@ class Assembler : public AssemblerX86Shared
masm.fstp32_m(src.disp(), src.base());
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
@ -336,7 +336,7 @@ class Assembler : public AssemblerX86Shared
writeDataRelocation(imm);
break;
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
void cmpl(AsmJSAbsoluteAddress lhs, Register rhs) {

View File

@ -80,7 +80,7 @@ IonBailoutIterator::IonBailoutIterator(const JitActivationIterator &activations,
switch (mode_) {
case SequentialExecution: topIonScript_ = script()->ionScript(); break;
case ParallelExecution: topIonScript_ = script()->parallelIonScript(); break;
default: MOZ_CRASH("No such execution mode");
default: MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
if (bailout->frameClass() == FrameSizeClass::None()) {

View File

@ -191,7 +191,7 @@ ICBinaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
}
break;
default:
MOZ_CRASH("Unhandled op for BinaryArith_Int32. ");
MOZ_ASSUME_UNREACHABLE("Unhandled op for BinaryArith_Int32. ");
}
// Return.
@ -252,7 +252,7 @@ ICUnaryArith_Int32::Compiler::generateStubCode(MacroAssembler &masm)
masm.negl(R0.payloadReg());
break;
default:
MOZ_CRASH("Unexpected op");
MOZ_ASSUME_UNREACHABLE("Unexpected op");
}
EmitReturnFromIC(masm);

View File

@ -296,7 +296,7 @@ CodeGeneratorX86::loadViewTypeElement(Scalar::Type vt, const T &srcAddr,
case Scalar::Uint32: masm.movlWithPatch(srcAddr, ToRegister(out)); break;
case Scalar::Float32: masm.movssWithPatch(srcAddr, ToFloatRegister(out)); break;
case Scalar::Float64: masm.movsdWithPatch(srcAddr, ToFloatRegister(out)); break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
}
@ -417,7 +417,7 @@ CodeGeneratorX86::storeViewTypeElement(Scalar::Type vt, const LAllocation *value
case Scalar::Uint32: masm.movlWithPatch(ToRegister(value), dstAddr); break;
case Scalar::Float32: masm.movssWithPatch(ToFloatRegister(value), dstAddr); break;
case Scalar::Float64: masm.movsdWithPatch(ToFloatRegister(value), dstAddr); break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
}
@ -576,7 +576,7 @@ DispatchIonCache::initializeAddCacheState(LInstruction *ins, AddCacheState *addS
{
// On x86, where there is no general purpose scratch register available,
// child cache classes must manually specify a dispatch scratch register.
MOZ_CRASH("x86 needs manual assignment of dispatchScratch");
MOZ_ASSUME_UNREACHABLE("x86 needs manual assignment of dispatchScratch");
}
void

View File

@ -254,7 +254,7 @@ LIRGeneratorX86::visitAsmJSStoreHeap(MAsmJSStoreHeap *ins)
// See comment below.
lir = new(alloc()) LAsmJSStoreHeap(ptrAlloc, useRegisterAtStart(ins->value()));
break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
return add(lir, ins);
}
@ -271,7 +271,7 @@ LIRGeneratorX86::visitAsmJSStoreHeap(MAsmJSStoreHeap *ins)
// affects instruction layout which affects patching.
lir = new(alloc()) LAsmJSStoreHeap(useRegisterAtStart(ptr), useRegisterAtStart(ins->value()));
break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
return add(lir, ins);
@ -295,7 +295,7 @@ LIRGeneratorX86::visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic
lir = new(alloc()) LStoreTypedArrayElementStatic(useRegisterAtStart(ins->ptr()),
useRegisterAtStart(ins->value()));
break;
default: MOZ_CRASH("unexpected array type");
default: MOZ_ASSUME_UNREACHABLE("unexpected array type");
}
return add(lir, ins);

View File

@ -173,7 +173,7 @@ MacroAssemblerX86::passABIArg(const MoveOperand &from, MoveOp::Type type)
case MoveOp::DOUBLE: stackForCall_ += sizeof(double); break;
case MoveOp::INT32: stackForCall_ += sizeof(int32_t); break;
case MoveOp::GENERAL: stackForCall_ += sizeof(intptr_t); break;
default: MOZ_CRASH("Unexpected argument type");
default: MOZ_ASSUME_UNREACHABLE("Unexpected argument type");
}
enoughMemory_ &= moveResolver_.addMove(from, to, type);
}

View File

@ -102,7 +102,7 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
base.scale(), base.disp() + sizeof(void *));
default:
MOZ_CRASH("unexpected operand kind");
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
}
}
Address ToType(Address base) {

View File

@ -575,7 +575,7 @@ JitRuntime::generateBailoutHandler(JSContext *cx, ExecutionMode mode)
GenerateParallelBailoutThunk(masm, NO_FRAME_SIZE_CLASS_ID);
break;
default:
MOZ_CRASH("No such execution mode");
MOZ_ASSUME_UNREACHABLE("No such execution mode");
}
Linker linker(masm);
@ -711,7 +711,7 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
masm.j(Assembler::Zero, masm.failureLabel(f.executionMode));
break;
default:
MOZ_CRASH("unknown failure kind");
MOZ_ASSUME_UNREACHABLE("unknown failure kind");
}
// Load the outparam and free any allocated stack.