зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1036781 - Part 5: Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/src/jit for Ion. r=jandem
This commit is contained in:
Родитель
377e257e4e
Коммит
c0ac30f281
|
@ -480,7 +480,7 @@ jit::RequestInterruptForIonCode(JSRuntime *rt, JSRuntime::InterruptMode mode)
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad interrupt mode");
|
||||
MOZ_CRASH("Bad interrupt mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1157,7 +1157,7 @@ IonScript::getSafepointIndex(uint32_t disp) const
|
|||
}
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("displacement not found.");
|
||||
MOZ_CRASH("displacement not found.");
|
||||
}
|
||||
|
||||
const OsiIndex *
|
||||
|
@ -1171,7 +1171,7 @@ IonScript::getOsiIndex(uint32_t disp) const
|
|||
return it;
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Failed to find OSI point return address");
|
||||
MOZ_CRASH("Failed to find OSI point return address");
|
||||
}
|
||||
|
||||
const OsiIndex *
|
||||
|
@ -1702,7 +1702,7 @@ GenerateLIR(MIRGenerator *mir)
|
|||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||
MOZ_CRASH("Bad regalloc");
|
||||
}
|
||||
|
||||
if (mir->shouldCancel("Allocate Registers"))
|
||||
|
@ -2580,7 +2580,7 @@ InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
|
|||
break;
|
||||
case JitFrame_Unwound_IonJS:
|
||||
case JitFrame_Unwound_BaselineStub:
|
||||
MOZ_ASSUME_UNREACHABLE("invalid");
|
||||
MOZ_CRASH("invalid");
|
||||
case JitFrame_Unwound_Rectifier:
|
||||
IonSpew(IonSpew_Invalidate, "#%d unwound rectifier frame @ %p", frameno, it.fp());
|
||||
break;
|
||||
|
@ -2824,7 +2824,7 @@ jit::Invalidate(JSContext *cx, JSScript *script, ExecutionMode mode, bool resetU
|
|||
return false;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
Invalidate(cx, scripts, resetUses, cancelOffThread);
|
||||
|
@ -2877,7 +2877,7 @@ jit::FinishInvalidation(FreeOp *fop, JSScript *script)
|
|||
return;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("bad execution mode");
|
||||
MOZ_CRASH("bad execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2926,10 +2926,10 @@ jit::ForbidCompilation(JSContext *cx, JSScript *script, ExecutionMode mode)
|
|||
return;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
|
||||
AutoFlushICache *
|
||||
|
|
|
@ -1092,7 +1092,7 @@ TypeAnalyzer::replaceRedundantPhi(MPhi *phi)
|
|||
v = MagicValue(JS_OPTIMIZED_OUT);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
MOZ_CRASH("unexpected type");
|
||||
}
|
||||
MConstant *c = MConstant::New(alloc(), v);
|
||||
// The instruction pass will insert the box
|
||||
|
|
|
@ -1370,7 +1370,7 @@ IonBuilder::snoopControlFlow(JSOp op)
|
|||
|
||||
default:
|
||||
// Hard assert for now - make an error later.
|
||||
MOZ_ASSUME_UNREACHABLE("unknown goto case");
|
||||
MOZ_CRASH("unknown goto case");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1381,7 +1381,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_ASSUME_UNREACHABLE("we should never reach an ifne!");
|
||||
MOZ_CRASH("we should never reach an ifne!");
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -1661,7 +1661,7 @@ IonBuilder::inspectOpcode(JSOp op)
|
|||
|
||||
case JSOP_LOOPHEAD:
|
||||
// JSOP_LOOPHEAD is handled when processing the loop header.
|
||||
MOZ_ASSUME_UNREACHABLE("JSOP_LOOPHEAD outside loop");
|
||||
MOZ_CRASH("JSOP_LOOPHEAD outside loop");
|
||||
|
||||
case JSOP_GETELEM:
|
||||
case JSOP_CALLELEM:
|
||||
|
@ -1873,7 +1873,7 @@ IonBuilder::processCfgEntry(CFGState &state)
|
|||
return processTryEnd(state);
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unknown cfgstate");
|
||||
MOZ_CRASH("unknown cfgstate");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2581,7 +2581,7 @@ IonBuilder::processSwitchBreak(JSOp op)
|
|||
breaks = &state.condswitch.breaks;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected switch state.");
|
||||
MOZ_CRASH("Unexpected switch state.");
|
||||
}
|
||||
|
||||
*breaks = new(alloc()) DeferredEdge(current, *breaks);
|
||||
|
@ -2660,7 +2660,7 @@ IonBuilder::maybeLoop(JSOp op, jssrcnote *sn)
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected opcode");
|
||||
MOZ_CRASH("unexpected opcode");
|
||||
}
|
||||
|
||||
return ControlStatus_None;
|
||||
|
@ -2690,7 +2690,7 @@ IonBuilder::assertValidLoopHeadOp(jsbytecode *pc)
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("JSOP_LOOPHEAD unexpected source note");
|
||||
MOZ_CRASH("JSOP_LOOPHEAD unexpected source note");
|
||||
}
|
||||
|
||||
// Make sure this loop goes to the same ifne as the loop header's
|
||||
|
@ -3587,7 +3587,7 @@ IonBuilder::jsop_ifeq(JSOp op)
|
|||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected source note type");
|
||||
MOZ_CRASH("unexpected source note type");
|
||||
}
|
||||
|
||||
// Switch to parsing the true branch. Note that no PC update is needed,
|
||||
|
@ -3709,7 +3709,7 @@ IonBuilder::processReturn(JSOp op)
|
|||
|
||||
default:
|
||||
def = nullptr;
|
||||
MOZ_ASSUME_UNREACHABLE("unknown return op");
|
||||
MOZ_CRASH("unknown return op");
|
||||
}
|
||||
|
||||
if (instrumentedProfiling() && inliningDepth_ == 0) {
|
||||
|
@ -3828,7 +3828,7 @@ IonBuilder::jsop_bitop(JSOp op)
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected bitop");
|
||||
MOZ_CRASH("unexpected bitop");
|
||||
}
|
||||
|
||||
current->add(ins);
|
||||
|
@ -3885,7 +3885,7 @@ IonBuilder::jsop_binary(JSOp op, MDefinition *left, MDefinition *right)
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected binary opcode");
|
||||
MOZ_CRASH("unexpected binary opcode");
|
||||
}
|
||||
|
||||
current->add(ins);
|
||||
|
@ -4232,7 +4232,7 @@ IonBuilder::selectInliningTargets(ObjectVector &targets, CallInfo &callInfo, Boo
|
|||
inlineable = true;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unhandled InliningDecision value!");
|
||||
MOZ_CRASH("Unhandled InliningDecision value!");
|
||||
}
|
||||
|
||||
// Enforce a maximum inlined bytecode limit at the callsite.
|
||||
|
@ -6610,7 +6610,7 @@ jit::TypeSetIncludes(types::TypeSet *types, MIRType input, types::TypeSet *input
|
|||
return types->unknown() || (inputTypes && inputTypes->isSubset(types));
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad input type");
|
||||
MOZ_CRASH("Bad input type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6894,10 +6894,10 @@ IonBuilder::getElemTryTypedObject(bool *emitted, MDefinition *obj, MDefinition *
|
|||
return true;
|
||||
|
||||
case type::UnsizedArray:
|
||||
MOZ_ASSUME_UNREACHABLE("Unsized arrays cannot be element types");
|
||||
MOZ_CRASH("Unsized arrays cannot be element types");
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad kind");
|
||||
MOZ_CRASH("Bad kind");
|
||||
}
|
||||
|
||||
static MIRType
|
||||
|
@ -7639,7 +7639,7 @@ MIRTypeForTypedArrayRead(Scalar::Type arrayType, bool observedDouble)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown typed array type");
|
||||
MOZ_CRASH("Unknown typed array type");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -7707,7 +7707,7 @@ IonBuilder::jsop_getelem_typed(MDefinition *obj, MDefinition *index,
|
|||
barrier = BarrierKind::NoBarrier;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown typed array type");
|
||||
MOZ_CRASH("Unknown typed array type");
|
||||
}
|
||||
|
||||
// Assume we will read out-of-bound values. In this case the
|
||||
|
@ -7805,7 +7805,7 @@ IonBuilder::setElemTryTypedObject(bool *emitted, MDefinition *obj,
|
|||
elemSize);
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad kind");
|
||||
MOZ_CRASH("Bad kind");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -8074,7 +8074,7 @@ IonBuilder::jsop_setelem_dense(types::TemporaryTypeSet::DoubleConversion convers
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown double conversion");
|
||||
MOZ_CRASH("Unknown double conversion");
|
||||
}
|
||||
|
||||
bool writeHole = false;
|
||||
|
@ -8885,10 +8885,10 @@ IonBuilder::getPropTryTypedObject(bool *emitted,
|
|||
resultTypes);
|
||||
|
||||
case type::UnsizedArray:
|
||||
MOZ_ASSUME_UNREACHABLE("Field of unsized array type");
|
||||
MOZ_CRASH("Field of unsized array type");
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Bad kind");
|
||||
MOZ_CRASH("Bad kind");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -9535,7 +9535,7 @@ IonBuilder::setPropTryTypedObject(bool *emitted, MDefinition *obj,
|
|||
value, fieldPrediction);
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown kind");
|
||||
MOZ_CRASH("Unknown kind");
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -1275,7 +1275,7 @@ GetPropertyIC::tryAttachNative(JSContext *cx, HandleScript outerScript, IonScrip
|
|||
attachKind = "array length";
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad NativeGetPropCacheability");
|
||||
MOZ_CRASH("Bad NativeGetPropCacheability");
|
||||
}
|
||||
return linkAndAttachStub(cx, masm, attacher, ion, attachKind);
|
||||
}
|
||||
|
@ -4185,7 +4185,7 @@ IsCacheableNonGlobalScopeChain(JSObject *scopeChain, JSObject *holder)
|
|||
}
|
||||
}
|
||||
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid scope chain");
|
||||
MOZ_CRASH("Invalid scope chain");
|
||||
}
|
||||
|
||||
JSObject *
|
||||
|
|
|
@ -47,7 +47,7 @@ class IonCacheVisitor
|
|||
public:
|
||||
#define VISIT_INS(op) \
|
||||
virtual bool visit##op##IC(CodeGenerator *codegen) { \
|
||||
MOZ_ASSUME_UNREACHABLE("NYI: " #op "IC"); \
|
||||
MOZ_CRASH("NYI: " #op "IC"); \
|
||||
}
|
||||
|
||||
IONCACHE_KIND_LIST(VISIT_INS)
|
||||
|
|
|
@ -284,7 +284,7 @@ SizeOfFramePrefix(FrameType type)
|
|||
case JitFrame_Exit:
|
||||
return IonExitFrameLayout::Size();
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unknown frame type");
|
||||
MOZ_CRASH("unknown frame type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,7 @@ HandleExceptionIon(JSContext *cx, const InlineFrameIterator &frame, ResumeFromEx
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected try note");
|
||||
MOZ_CRASH("Unexpected try note");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFrom
|
|||
return;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid trap status");
|
||||
MOZ_CRASH("Invalid trap status");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -607,7 +607,7 @@ HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFrom
|
|||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid try note");
|
||||
MOZ_CRASH("Invalid try note");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -842,7 +842,7 @@ MarkCalleeToken(JSTracer *trc, CalleeToken token)
|
|||
return CalleeToToken(script);
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unknown callee token type");
|
||||
MOZ_CRASH("unknown callee token type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1046,7 +1046,7 @@ JitActivationIterator::jitStackRange(uintptr_t *&min, uintptr_t *&end)
|
|||
if (exitFrame->isWrapperExit() && f->outParam == Type_Handle) {
|
||||
switch (f->outParamRootType) {
|
||||
case VMFunction::RootNone:
|
||||
MOZ_ASSUME_UNREACHABLE("Handle outparam must have root type");
|
||||
MOZ_CRASH("Handle outparam must have root type");
|
||||
case VMFunction::RootObject:
|
||||
case VMFunction::RootString:
|
||||
case VMFunction::RootPropertyName:
|
||||
|
@ -1234,7 +1234,7 @@ MarkJitExitFrame(JSTracer *trc, const JitFrameIterator &frame)
|
|||
if (f->outParam == Type_Handle) {
|
||||
switch (f->outParamRootType) {
|
||||
case VMFunction::RootNone:
|
||||
MOZ_ASSUME_UNREACHABLE("Handle outparam must have root type");
|
||||
MOZ_CRASH("Handle outparam must have root type");
|
||||
case VMFunction::RootObject:
|
||||
gc::MarkObjectRoot(trc, footer->outParam<JSObject *>(), "ion-vm-out");
|
||||
break;
|
||||
|
@ -1299,14 +1299,14 @@ MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
|
|||
MarkIonJSFrame(trc, frames);
|
||||
break;
|
||||
case JitFrame_Unwound_IonJS:
|
||||
MOZ_ASSUME_UNREACHABLE("invalid");
|
||||
MOZ_CRASH("invalid");
|
||||
case JitFrame_Rectifier:
|
||||
MarkRectifierFrame(trc, frames);
|
||||
break;
|
||||
case JitFrame_Unwound_Rectifier:
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected frame type");
|
||||
MOZ_CRASH("unexpected frame type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1521,7 +1521,7 @@ FromTypedPayload(JSValueType type, uintptr_t payload)
|
|||
case JSVAL_TYPE_OBJECT:
|
||||
return FromObjectPayload(payload);
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type - needs payload");
|
||||
MOZ_CRASH("unexpected type - needs payload");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1609,7 +1609,7 @@ SnapshotIterator::allocationValue(const RValueAllocation &alloc)
|
|||
case JSVAL_TYPE_OBJECT:
|
||||
return FromObjectPayload(fromStack(alloc.stackOffset2()));
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected type");
|
||||
MOZ_CRASH("Unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ SnapshotIterator::allocationValue(const RValueAllocation &alloc)
|
|||
return fromInstructionResult(alloc.index());
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("huh?");
|
||||
MOZ_CRASH("huh?");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1776,10 +1776,10 @@ JitFrameIterator::ionScriptFromCalleeToken() const
|
|||
case ParallelExecution:
|
||||
return script()->parallelIonScript();
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unknown callee token type");
|
||||
MOZ_CRASH("unknown callee token type");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ ScriptFromCalleeToken(CalleeToken token)
|
|||
case CalleeToken_Function:
|
||||
return CalleeTokenToFunction(token)->nonLazyScript();
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("invalid callee token tag");
|
||||
MOZ_CRASH("invalid callee token tag");
|
||||
}
|
||||
|
||||
// In between every two frames lies a small header describing both frames. This
|
||||
|
|
|
@ -288,7 +288,7 @@ StoreToTypedFloatArray(MacroAssembler &masm, int arrayType, const S &value, cons
|
|||
masm.storeDouble(value, dest);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
|
||||
MOZ_CRASH("Invalid typed array type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T &src, AnyRegi
|
|||
canonicalizeDouble(dest.fpu());
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
|
||||
MOZ_CRASH("Invalid typed array type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,7 @@ MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const T &src, const V
|
|||
boxDouble(ScratchDoubleReg, dest);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
|
||||
MOZ_CRASH("Invalid typed array type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1241,7 +1241,7 @@ MacroAssembler::loadContext(Register cxReg, Register scratch, ExecutionMode exec
|
|||
loadForkJoinContext(cxReg, scratch);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ MacroAssembler::enterExitFrameAndLoadContext(const VMFunction *f, Register cxReg
|
|||
enterParallelExitFrameAndLoadContext(f, cxReg, scratch);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1302,7 +1302,7 @@ MacroAssembler::enterFakeExitFrame(Register cxReg, Register scratch,
|
|||
enterFakeParallelExitFrame(cxReg, scratch, codeVal);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1324,7 +1324,7 @@ MacroAssembler::handleFailure(ExecutionMode executionMode)
|
|||
handler = JS_FUNC_TO_DATA_PTR(void *, jit::HandleParallelFailure);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
MOZ_CRASH("No such execution mode");
|
||||
}
|
||||
MacroAssemblerSpecific::handleFailureWithHandler(handler);
|
||||
|
||||
|
@ -1622,7 +1622,7 @@ MacroAssembler::PushEmptyRooted(VMFunction::RootType rootType)
|
|||
{
|
||||
switch (rootType) {
|
||||
case VMFunction::RootNone:
|
||||
MOZ_ASSUME_UNREACHABLE("Handle must have root type");
|
||||
MOZ_CRASH("Handle must have root type");
|
||||
case VMFunction::RootObject:
|
||||
case VMFunction::RootString:
|
||||
case VMFunction::RootPropertyName:
|
||||
|
@ -1642,7 +1642,7 @@ MacroAssembler::popRooted(VMFunction::RootType rootType, Register cellReg,
|
|||
{
|
||||
switch (rootType) {
|
||||
case VMFunction::RootNone:
|
||||
MOZ_ASSUME_UNREACHABLE("Handle must have root type");
|
||||
MOZ_CRASH("Handle must have root type");
|
||||
case VMFunction::RootObject:
|
||||
case VMFunction::RootString:
|
||||
case VMFunction::RootPropertyName:
|
||||
|
@ -1713,7 +1713,7 @@ MacroAssembler::convertTypedOrValueToFloatingPoint(TypedOrValueRegister src, Flo
|
|||
loadConstantFloatingPoint(GenericNaN(), float(GenericNaN()), output, outputType);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
|
||||
MOZ_CRASH("Bad MIRType");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1928,7 +1928,7 @@ MacroAssembler::convertTypedOrValueToInt(TypedOrValueRegister src, FloatRegister
|
|||
jump(fail);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
|
||||
MOZ_CRASH("Bad MIRType");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2016,7 +2016,7 @@ MacroAssembler::branchEqualTypeIfNeeded(MIRType type, MDefinition *maybeDef, Reg
|
|||
branchTestObject(Equal, tag, label);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unsupported type");
|
||||
MOZ_CRASH("Unsupported type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
} else if (type_.isAnyObject()) {
|
||||
mirType = MIRType_Object;
|
||||
} else {
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown conversion to mirtype");
|
||||
MOZ_CRASH("Unknown conversion to mirtype");
|
||||
}
|
||||
|
||||
if (mirType == MIRType_Double)
|
||||
|
@ -347,7 +347,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
case MIRType_MagicIsConstructing:
|
||||
case MIRType_MagicHole: return branchTestMagic(cond, val, label);
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad MIRType");
|
||||
MOZ_CRASH("Bad MIRType");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
store32(value, dest);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid typed array type");
|
||||
MOZ_CRASH("Invalid typed array type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
switch (executionMode) {
|
||||
case SequentialExecution: return &sequentialFailureLabel_;
|
||||
case ParallelExecution: return ¶llelFailureLabel_;
|
||||
default: MOZ_ASSUME_UNREACHABLE("Unexpected execution mode");
|
||||
default: MOZ_CRASH("Unexpected execution mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1456,7 +1456,7 @@ JSOpToDoubleCondition(JSOp op)
|
|||
case JSOP_GE:
|
||||
return Assembler::DoubleGreaterThanOrEqual;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected comparison operation");
|
||||
MOZ_CRASH("Unexpected comparison operation");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ JSOpToCondition(JSOp op, bool isSigned)
|
|||
case JSOP_GE:
|
||||
return Assembler::GreaterThanOrEqual;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unrecognized comparison operation");
|
||||
MOZ_CRASH("Unrecognized comparison operation");
|
||||
}
|
||||
} else {
|
||||
switch (op) {
|
||||
|
@ -1502,7 +1502,7 @@ JSOpToCondition(JSOp op, bool isSigned)
|
|||
case JSOP_GE:
|
||||
return Assembler::AboveOrEqual;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unrecognized comparison operation");
|
||||
MOZ_CRASH("Unrecognized comparison operation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ OptimizationInfos::nextLevel(OptimizationLevel level) const
|
|||
case Optimization_DontCompile:
|
||||
return Optimization_Normal;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown optimization level.");
|
||||
MOZ_CRASH("Unknown optimization level.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ OptimizationLevelString(OptimizationLevel level)
|
|||
case Optimization_AsmJS:
|
||||
return "Optimization_AsmJS";
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid OptimizationLevel");
|
||||
MOZ_CRASH("Invalid OptimizationLevel");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -222,7 +222,7 @@ BailoutKindString(BailoutKind kind)
|
|||
case Bailout_IonExceptionDebugMode:
|
||||
return "Bailout_IonExceptionDebugMode";
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Invalid BailoutKind");
|
||||
MOZ_CRASH("Invalid BailoutKind");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ MIRTypeFromValueType(JSValueType type)
|
|||
case JSVAL_TYPE_UNKNOWN:
|
||||
return MIRType_Value;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected jsval type");
|
||||
MOZ_CRASH("unexpected jsval type");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ StringFromMIRType(MIRType type)
|
|||
case MIRType_Float32x4:
|
||||
return "Float32x4";
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Unknown MIRType.");
|
||||
MOZ_CRASH("Unknown MIRType.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ SimdTypeToLength(MIRType type)
|
|||
return 4;
|
||||
default: break;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected SIMD kind");
|
||||
MOZ_CRASH("unexpected SIMD kind");
|
||||
}
|
||||
|
||||
static inline MIRType
|
||||
|
@ -555,7 +555,7 @@ SimdTypeToScalarType(MIRType type)
|
|||
return MIRType_Float32;
|
||||
default: break;
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected SIMD kind");
|
||||
MOZ_CRASH("unexpected SIMD kind");
|
||||
}
|
||||
|
||||
// Indicates a lane in a SIMD register: X for the first lane, Y for the second,
|
||||
|
|
Загрузка…
Ссылка в новой задаче