Bug 1036781 - Part 10: Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/src/jit MIR code. r=jandem

This commit is contained in:
Chris Peterson 2014-09-01 14:33:42 -07:00
parent 5301299c5f
commit 6b291cbc20
5 changed files with 25 additions and 25 deletions

View File

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

View File

@ -119,7 +119,7 @@ EvaluateConstantOperands(TempAllocator &alloc, MBinaryInstruction *ins, bool *pt
ret.setNumber(NumberMod(lhs.toNumber(), rhs.toNumber()));
break;
default:
MOZ_ASSUME_UNREACHABLE("NYI");
MOZ_CRASH("NYI");
}
// setNumber eagerly transforms a number to int32.
@ -622,7 +622,7 @@ MConstant::printOpcode(FILE *fp) const
fprintf(fp, "magic optimized-out");
break;
default:
MOZ_ASSUME_UNREACHABLE("unexpected type");
MOZ_CRASH("unexpected type");
}
}
@ -666,7 +666,7 @@ MSimdValueX4::foldsTo(TempAllocator &alloc)
cst = SimdConstant::CreateX4(a);
break;
}
default: MOZ_ASSUME_UNREACHABLE("unexpected type in MSimdValueX4::foldsTo");
default: MOZ_CRASH("unexpected type in MSimdValueX4::foldsTo");
}
return MSimdConstant::New(alloc, cst, type());
@ -699,7 +699,7 @@ MSimdSplatX4::foldsTo(TempAllocator &alloc)
cst = SimdConstant::CreateX4(a);
break;
}
default: MOZ_ASSUME_UNREACHABLE("unexpected type in MSimdSplatX4::foldsTo");
default: MOZ_CRASH("unexpected type in MSimdSplatX4::foldsTo");
}
return MSimdConstant::New(alloc, cst, type());
@ -779,7 +779,7 @@ MMathFunction::FunctionName(Function function)
case Ceil: return "Ceil";
case Round: return "Round";
default:
MOZ_ASSUME_UNREACHABLE("Unknown math function");
MOZ_CRASH("Unknown math function");
}
}
@ -2091,7 +2091,7 @@ MCompare::inputType()
case Compare_Value:
return MIRType_Value;
default:
MOZ_ASSUME_UNREACHABLE("No known conversion");
MOZ_CRASH("No known conversion");
}
}
@ -2688,7 +2688,7 @@ MCompare::tryFold(bool *result)
*result = (op == JSOP_NE || op == JSOP_STRICTNE);
return true;
default:
MOZ_ASSUME_UNREACHABLE("Unexpected type");
MOZ_CRASH("Unexpected type");
}
}
@ -2711,9 +2711,9 @@ MCompare::tryFold(bool *result)
return true;
case MIRType_Boolean:
// Int32 specialization should handle this.
MOZ_ASSUME_UNREACHABLE("Wrong specialization");
MOZ_CRASH("Wrong specialization");
default:
MOZ_ASSUME_UNREACHABLE("Unexpected type");
MOZ_CRASH("Unexpected type");
}
}
@ -2736,9 +2736,9 @@ MCompare::tryFold(bool *result)
return true;
case MIRType_String:
// Compare_String specialization should handle this.
MOZ_ASSUME_UNREACHABLE("Wrong specialization");
MOZ_CRASH("Wrong specialization");
default:
MOZ_ASSUME_UNREACHABLE("Unexpected type");
MOZ_CRASH("Unexpected type");
}
}
@ -2788,7 +2788,7 @@ MCompare::evaluateConstantOperands(bool *result)
*result = (comp != 0);
break;
default:
MOZ_ASSUME_UNREACHABLE("Unexpected op.");
MOZ_CRASH("Unexpected op.");
}
return true;
@ -2820,7 +2820,7 @@ MCompare::evaluateConstantOperands(bool *result)
*result = (lhsUint != rhsUint);
break;
default:
MOZ_ASSUME_UNREACHABLE("Unexpected op.");
MOZ_CRASH("Unexpected op.");
}
return true;

View File

@ -1503,7 +1503,7 @@ class MSimdBinaryArith : public MBinaryInstruction
case Mul: return "Mul";
case Div: return "Div";
}
MOZ_ASSUME_UNREACHABLE("unexpected operation");
MOZ_CRASH("unexpected operation");
}
private:
@ -3403,7 +3403,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
kind = Bailout_NonObjectInput;
break;
default:
MOZ_ASSUME_UNREACHABLE("Given MIRType cannot be unboxed.");
MOZ_CRASH("Given MIRType cannot be unboxed.");
}
return new(alloc) MUnbox(ins, type, mode, kind);
@ -5339,7 +5339,7 @@ class MDiv : public MBinaryArithInstruction
void analyzeEdgeCasesBackward();
double getIdentity() {
MOZ_ASSUME_UNREACHABLE("not used");
MOZ_CRASH("not used");
}
bool canBeNegativeZero() const {
@ -5435,7 +5435,7 @@ class MMod : public MBinaryArithInstruction
MDefinition *foldsTo(TempAllocator &alloc);
double getIdentity() {
MOZ_ASSUME_UNREACHABLE("not used");
MOZ_CRASH("not used");
}
bool canBeNegativeDividend() const {

View File

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

View File

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