[cleanup] Removing break and return after UNREACHABLE()

Everything after UNREACHABLE is dead code, so it makes sense to remove them.

Bug: v8:9183
Change-Id: If76468a73b926d74717cc2348fd5b36d30f680c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605727
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61411}
This commit is contained in:
Santiago Aboy Solanes 2019-05-10 10:49:37 +01:00 committed by Commit Bot
parent 9e6b3565a5
commit 8b11e91f21
78 changed files with 0 additions and 162 deletions

View File

@ -8232,7 +8232,6 @@ Isolate::DisallowJavascriptExecutionScope::DisallowJavascriptExecutionScope(
break;
default:
UNREACHABLE();
break;
}
}
@ -8250,7 +8249,6 @@ Isolate::DisallowJavascriptExecutionScope::~DisallowJavascriptExecutionScope() {
break;
default:
UNREACHABLE();
break;
}
}

View File

@ -450,7 +450,6 @@ void NeonMemOperand::SetAlignment(int align) {
break;
default:
UNREACHABLE();
break;
}
}
@ -3952,7 +3951,6 @@ static int EncodeScalar(NeonDataType dt, int index) {
break;
default:
UNREACHABLE();
break;
}
return (opc1_opc2 >> 2) * B21 | (opc1_opc2 & 0x3) * B5;
}
@ -4003,7 +4001,6 @@ void Assembler::vdup(NeonSize size, QwNeonRegister dst, Register src) {
break;
default:
UNREACHABLE();
break;
}
int vd, d;
dst.split_code(&vd, &d);
@ -4137,7 +4134,6 @@ static Instr EncodeNeonUnaryOp(UnaryOp op, NeonRegType reg_type, NeonSize size,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
NeonSplitCode(reg_type, dst_code, &vd, &d, &op_encoding);
@ -4231,7 +4227,6 @@ static Instr EncodeNeonBinaryBitwiseOp(BinaryBitwiseOp op, NeonRegType reg_type,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
NeonSplitCode(reg_type, dst_code, &vd, &d, &op_encoding);
@ -4338,7 +4333,6 @@ static Instr EncodeNeonBinOp(FPBinOp op, QwNeonRegister dst,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
dst.split_code(&vd, &d);
@ -4404,7 +4398,6 @@ static Instr EncodeNeonBinOp(IntegerBinOp op, NeonDataType dt,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
dst.split_code(&vd, &d);
@ -4560,7 +4553,6 @@ static Instr EncodeNeonShiftOp(NeonShiftOp op, NeonSize size, bool is_unsigned,
}
default:
UNREACHABLE();
break;
}
int vd, d;
@ -4667,7 +4659,6 @@ static Instr EncodeNeonPairwiseOp(NeonPairwiseOp op, NeonDataType dt,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
dst.split_code(&vd, &d);
@ -4819,7 +4810,6 @@ static Instr EncodeNeonSizedOp(NeonSizedOp op, NeonRegType reg_type,
break;
default:
UNREACHABLE();
break;
}
int vd, d;
NeonSplitCode(reg_type, dst_code, &vd, &d, &op_encoding);

View File

@ -264,7 +264,6 @@ void Decoder::PrintPU(Instruction* instr) {
}
default: {
UNREACHABLE();
break;
}
}
}
@ -700,7 +699,6 @@ int Decoder::FormatOption(Instruction* instr, const char* format) {
}
default: {
UNREACHABLE();
break;
}
}
UNREACHABLE();
@ -1083,7 +1081,6 @@ void Decoder::DecodeType2(Instruction* instr) {
default: {
// The PU field is a 2-bit field.
UNREACHABLE();
break;
}
}
}
@ -1373,7 +1370,6 @@ void Decoder::DecodeType3(Instruction* instr) {
default: {
// The PU field is a 2-bit field.
UNREACHABLE();
break;
}
}
}
@ -2648,7 +2644,6 @@ int Decoder::InstructionDecode(byte* instr_ptr) {
default: {
// The type field is 3-bits in the ARM encoding.
UNREACHABLE();
break;
}
}
return kInstrSize;

View File

@ -1501,7 +1501,6 @@ int32_t Simulator::ProcessPU(Instruction* instr,
}
default: {
UNREACHABLE();
break;
}
}
return rn_val;
@ -2610,7 +2609,6 @@ void Simulator::DecodeType2(Instruction* instr) {
}
default: {
UNREACHABLE();
break;
}
}
if (instr->HasB()) {
@ -3032,7 +3030,6 @@ void Simulator::DecodeType3(Instruction* instr) {
}
default: {
UNREACHABLE();
break;
}
}
if (instr->HasB()) {

View File

@ -467,7 +467,6 @@ void Simulator::DoRuntimeCall(Instruction* instr) {
default:
TraceSim("Type: Unknown.\n");
UNREACHABLE();
break;
case ExternalReference::BUILTIN_CALL:
#if defined(V8_OS_WIN)
@ -772,7 +771,6 @@ void LogicVRegister::ReadUintFromMem(VectorFormat vform, int index,
break;
default:
UNREACHABLE();
return;
}
}
@ -795,7 +793,6 @@ void LogicVRegister::WriteUintToMem(VectorFormat vform, int index,
break;
default:
UNREACHABLE();
return;
}
}
@ -1487,7 +1484,6 @@ void Simulator::VisitPCRelAddressing(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
}

View File

@ -1173,7 +1173,6 @@ bool IterateElements(Isolate* isolate, Handle<JSReceiver> receiver,
case SLOW_STRING_WRAPPER_ELEMENTS:
// |array| is guaranteed to be an array or typed array.
UNREACHABLE();
break;
}
visitor->increase_index_offset(length);
return true;

View File

@ -954,7 +954,6 @@ ElementAccess AccessBuilder::ForFixedArrayElement(
break;
default:
UNREACHABLE();
break;
}
return access;
}

View File

@ -554,7 +554,6 @@ void FlushPendingPushRegisters(TurboAssembler* tasm,
break;
default:
UNREACHABLE();
break;
}
frame_access_state->IncreaseSPDelta(pending_pushes->size());
pending_pushes->clear();
@ -3434,7 +3433,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
}
default:
UNREACHABLE();
break;
}
}

View File

@ -482,7 +482,6 @@ void InstructionSelector::VisitLoad(Node* node) {
case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (node->opcode() == IrOpcode::kPoisonedLoad) {
CHECK_NE(poisoning_level_, PoisoningMitigationLevel::kDontPoison);
@ -645,7 +644,6 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
default:
// All other cases should support unaligned accesses.
UNREACHABLE();
return;
}
}
@ -736,7 +734,6 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
default:
// All other cases should support unaligned accesses.
UNREACHABLE();
return;
}
}
@ -1659,7 +1656,6 @@ void MaybeReplaceCmpZeroWithFlagSettingBinop(InstructionSelector* selector,
break;
default:
UNREACHABLE();
return;
}
if (selector->CanCover(*node, binop)) {
// The comparison is the only user of {node}.
@ -2044,7 +2040,6 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
Emit(opcode | AddressingModeField::encode(kMode_Offset_RR),
g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index));
@ -2069,7 +2064,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
AddressingMode addressing_mode = kMode_Offset_RR;

View File

@ -714,7 +714,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
// by an unknown value, and it is safe to continue accessing the frame
// via the stack pointer.
UNREACHABLE();
break;
case kArchSaveCallerRegisters: {
fp_mode_ =
static_cast<SaveFPRegsMode>(MiscField::decode(instr->opcode()));
@ -2843,7 +2842,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
}
default:
UNREACHABLE();
break;
}
}

View File

@ -1871,7 +1871,6 @@ void MaybeReplaceCmpZeroWithFlagSettingBinop(InstructionSelector* selector,
break;
default:
UNREACHABLE();
return;
}
if (selector->CanCover(*node, binop)) {
// The comparison is the only user of the add or and, so we can generate
@ -2768,7 +2767,6 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicLoad(this, node, opcode);
}
@ -2791,7 +2789,6 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicLoad(this, node, opcode);
}
@ -2811,7 +2808,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicStore(this, node, opcode);
}
@ -2834,7 +2830,6 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicStore(this, node, opcode);
}

View File

@ -344,7 +344,6 @@ void CodeGenerator::TryInsertBranchPoisoning(const InstructionBlock* block) {
}
case kFlags_deoptimize_and_poison: {
UNREACHABLE();
break;
}
default:
break;

View File

@ -1188,7 +1188,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kArchWordPoisonOnSpeculation:
// TODO(860429): Remove remaining poisoning infrastructure on ia32.
UNREACHABLE();
break;
case kLFence:
__ lfence();
break;
@ -3898,7 +3897,6 @@ static Condition FlagsConditionToCondition(FlagsCondition condition) {
break;
default:
UNREACHABLE();
break;
}
}
@ -4592,7 +4590,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
}
default:
UNREACHABLE();
break;
}
}

View File

@ -310,7 +310,6 @@ void InstructionSelector::VisitLoad(Node* node) {
case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
IA32OperandGenerator g(this);
@ -1619,7 +1618,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
break;
}
VisitAtomicExchange(this, node, opcode, rep);
}

View File

@ -485,7 +485,6 @@ InstructionOperand OperandForDeopt(Isolate* isolate, OperandGenerator* g,
case IrOpcode::kObjectState:
case IrOpcode::kTypedObjectState:
UNREACHABLE();
break;
default:
switch (kind) {
case FrameStateInputKind::kStackSlot:
@ -1227,7 +1226,6 @@ void InstructionSelector::VisitControl(BasicBlock* block) {
}
default:
UNREACHABLE();
break;
}
if (trace_turbo_ == kEnableTraceTurboJson && input) {
int instruction_start = static_cast<int>(instructions_.size());

View File

@ -56,7 +56,6 @@ FlagsCondition CommuteFlagsCondition(FlagsCondition condition) {
case kPositiveOrZero:
case kNegative:
UNREACHABLE();
break;
case kEqual:
case kNotEqual:
case kOverflow:

View File

@ -3105,7 +3105,6 @@ void CodeGenerator::AssembleBranchPoisoning(FlagsCondition condition,
return;
default:
UNREACHABLE();
break;
}
}

View File

@ -315,7 +315,6 @@ void InstructionSelector::VisitLoad(Node* node) {
case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (node->opcode() == IrOpcode::kPoisonedLoad) {
CHECK_NE(poisoning_level_, PoisoningMitigationLevel::kDontPoison);
@ -1322,7 +1321,6 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8:
UNREACHABLE();
break;
case MachineRepresentation::kWord16:
opcode = load_rep.IsUnsigned() ? kMipsUlhu : kMipsUlh;
break;
@ -1347,7 +1345,6 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {
@ -1383,7 +1380,6 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8:
UNREACHABLE();
break;
case MachineRepresentation::kWord16:
opcode = kMipsUsh;
break;
@ -1402,7 +1398,6 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
case MachineRepresentation::kWord64: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {
@ -1800,7 +1795,6 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {
@ -1835,7 +1829,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {

View File

@ -3250,7 +3250,6 @@ void CodeGenerator::AssembleBranchPoisoning(FlagsCondition condition,
return;
default:
UNREACHABLE();
break;
}
}

View File

@ -395,7 +395,6 @@ void InstructionSelector::VisitLoad(Node* node) {
case MachineRepresentation::kCompressed: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (node->opcode() == IrOpcode::kPoisonedLoad) {
CHECK_NE(poisoning_level_, PoisoningMitigationLevel::kDontPoison);
@ -1673,7 +1672,6 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8:
UNREACHABLE();
break;
case MachineRepresentation::kWord16:
opcode = load_rep.IsUnsigned() ? kMips64Ulhu : kMips64Ulh;
break;
@ -1694,7 +1692,6 @@ void InstructionSelector::VisitUnalignedLoad(Node* node) {
case MachineRepresentation::kCompressed: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {
@ -1728,7 +1725,6 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
case MachineRepresentation::kBit: // Fall through.
case MachineRepresentation::kWord8:
UNREACHABLE();
break;
case MachineRepresentation::kWord16:
opcode = kMips64Ush;
break;
@ -1749,7 +1745,6 @@ void InstructionSelector::VisitUnalignedStore(Node* node) {
case MachineRepresentation::kCompressed: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (g.CanBeImmediate(index, opcode)) {
@ -2420,7 +2415,6 @@ void InstructionSelector::VisitWord32AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicLoad(this, node, opcode);
}
@ -2440,7 +2434,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicStore(this, node, opcode);
@ -2464,7 +2457,6 @@ void InstructionSelector::VisitWord64AtomicLoad(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicLoad(this, node, opcode);
}
@ -2487,7 +2479,6 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicStore(this, node, opcode);

View File

@ -729,7 +729,6 @@ void FlushPendingPushRegisters(TurboAssembler* tasm,
break;
default:
UNREACHABLE();
break;
}
frame_access_state->IncreaseSPDelta(pending_pushes->size());
pending_pushes->clear();
@ -1959,7 +1958,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kPPC_AtomicStoreWord32:
case kPPC_AtomicStoreWord64:
UNREACHABLE();
break;
case kWord32AtomicExchangeInt8:
ASSEMBLE_ATOMIC_EXCHANGE_INTEGER(lbarx, stbcx);
__ extsb(i.OutputRegister(0), i.OutputRegister(0));
@ -2060,7 +2058,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
#endif // V8_TARGET_ARCH_PPC64
default:
UNREACHABLE();
break;
}
return kSuccess;
} // NOLINT(readability/fn_size)

View File

@ -215,7 +215,6 @@ void InstructionSelector::VisitLoad(Node* node) {
case MachineRepresentation::kSimd128: // Fall through.
case MachineRepresentation::kNone:
UNREACHABLE();
return;
}
if (node->opcode() == IrOpcode::kPoisonedLoad &&

View File

@ -2093,7 +2093,6 @@ int LiveRangeBuilder::FixedFPLiveRangeID(int index, MachineRepresentation rep) {
break;
default:
UNREACHABLE();
break;
}
return result;
}

View File

@ -1218,7 +1218,6 @@ void FlushPendingPushRegisters(TurboAssembler* tasm,
break;
default:
UNREACHABLE();
break;
}
frame_access_state->IncreaseSPDelta(pending_pushes->size());
pending_pushes->clear();
@ -2803,7 +2802,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
break;
default:
UNREACHABLE();
break;
}
return kSuccess;
} // NOLINT(readability/fn_size)

View File

@ -4188,7 +4188,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
}
default:
UNREACHABLE();
break;
}
}

View File

@ -2373,7 +2373,6 @@ void InstructionSelector::VisitWord32AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicExchange(this, node, opcode);
}
@ -2396,7 +2395,6 @@ void InstructionSelector::VisitWord64AtomicStore(Node* node) {
break;
default:
UNREACHABLE();
return;
}
VisitAtomicExchange(this, node, opcode);
}

View File

@ -1473,7 +1473,6 @@ CellData* ModuleData::GetCell(int cell_index) const {
break;
case ModuleDescriptor::kInvalid:
UNREACHABLE();
break;
}
CHECK_NOT_NULL(cell);
return cell;

View File

@ -268,7 +268,6 @@ JSTypeHintLowering::LoweringResult JSTypeHintLowering::ReduceUnaryOperation(
}
default:
UNREACHABLE();
break;
}
if (node != nullptr) {
@ -354,7 +353,6 @@ JSTypeHintLowering::LoweringResult JSTypeHintLowering::ReduceBinaryOperation(
}
default:
UNREACHABLE();
break;
}
return LoweringResult::NoChange();
}

View File

@ -1233,7 +1233,6 @@ int LoadElimination::FieldIndexOf(FieldAccess const& access) {
case MachineRepresentation::kBit:
case MachineRepresentation::kSimd128:
UNREACHABLE();
break;
case MachineRepresentation::kWord32:
if (kInt32Size != kTaggedSize) {
return -1; // We currently only track tagged pointer size fields.

View File

@ -477,7 +477,6 @@ Node* RepresentationChanger::GetTaggedRepresentationFor(
case IrOpcode::kFloat64Constant:
case IrOpcode::kFloat32Constant:
UNREACHABLE();
break;
default:
break;
}
@ -735,7 +734,6 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
case IrOpcode::kFloat64Constant:
case IrOpcode::kFloat32Constant:
UNREACHABLE();
break;
default:
break;
}
@ -938,7 +936,6 @@ Node* RepresentationChanger::GetWord32RepresentationFor(
case IrOpcode::kFloat32Constant:
case IrOpcode::kFloat64Constant:
UNREACHABLE();
break;
case IrOpcode::kNumberConstant: {
double const fv = OpParameter<double>(node->op());
if (use_info.type_check() == TypeCheckKind::kNone ||
@ -1231,7 +1228,6 @@ Node* RepresentationChanger::GetWord64RepresentationFor(
case IrOpcode::kFloat32Constant:
case IrOpcode::kFloat64Constant:
UNREACHABLE();
break;
case IrOpcode::kNumberConstant: {
double const fv = OpParameter<double>(node->op());
using limits = std::numeric_limits<int64_t>;

View File

@ -134,7 +134,6 @@ void Scheduler::UpdatePlacement(Node* node, Placement placement) {
case IrOpcode::kParameter:
// Parameters are fixed once and for all.
UNREACHABLE();
break;
case IrOpcode::kPhi:
case IrOpcode::kEffectPhi: {
// Phis and effect phis are coupled to their respective blocks.

View File

@ -116,7 +116,6 @@ UseInfo CheckedUseInfoAsFloat64FromHint(
case NumberOperationHint::kSigned32:
// Not used currently.
UNREACHABLE();
break;
case NumberOperationHint::kNumber:
return UseInfo::CheckedNumberAsFloat64(identify_zeros, feedback);
case NumberOperationHint::kNumberOrOddball:

View File

@ -490,7 +490,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
case IrOpcode::kInductionVariablePhi: {
// This is only a temporary node for the typer.
UNREACHABLE();
break;
}
case IrOpcode::kEffectPhi: {
// EffectPhi input count matches parent control node.

View File

@ -1223,7 +1223,6 @@ Node* WasmGraphBuilder::BuildChangeEndiannessStore(
break;
default:
UNREACHABLE();
break;
}
if (mem_rep == MachineRepresentation::kWord8) {
@ -1377,7 +1376,6 @@ Node* WasmGraphBuilder::BuildChangeEndiannessLoad(Node* node,
break;
default:
UNREACHABLE();
break;
}
int i;
@ -6142,7 +6140,6 @@ wasm::WasmCode* CompileWasmMathIntrinsic(wasm::WasmEngine* wasm_engine,
break;
default:
UNREACHABLE();
break;
}
builder.Return(node);

View File

@ -1950,7 +1950,6 @@ static void PrintNonErrorsMessageCallback(Local<Message> message,
default: {
UNREACHABLE();
break;
}
}
// Converts a V8 value to a C string.

View File

@ -1023,7 +1023,6 @@ void Debug::PrepareStep(StepAction step_action) {
switch (step_action) {
case StepNone:
UNREACHABLE();
break;
case StepOut: {
// Clear last position info. For stepping out it does not matter.
thread_local_.last_statement_position_ = kNoSourcePosition;

View File

@ -2740,7 +2740,6 @@ int TranslatedFrame::GetValueCount() {
case kInvalid:
UNREACHABLE();
break;
}
UNREACHABLE();
}

View File

@ -2598,7 +2598,6 @@ class FastSmiOrObjectElementsAccessor
// This function is currently only used for JSArrays with non-zero
// length.
UNREACHABLE();
break;
case NO_ELEMENTS:
break; // Nothing to do.
}
@ -2971,7 +2970,6 @@ class FastDoubleElementsAccessor
// This function is currently only used for JSArrays with non-zero
// length.
UNREACHABLE();
break;
}
}
@ -4680,7 +4678,6 @@ MaybeHandle<Object> ArrayConstructInitializeElements(Handle<JSArray> array,
}
default:
UNREACHABLE();
break;
}
array->set_elements(*elms);

View File

@ -91,7 +91,6 @@ int FeedbackMetadata::GetSlotSize(FeedbackSlotKind kind) {
case FeedbackSlotKind::kInvalid:
case FeedbackSlotKind::kKindsNumber:
UNREACHABLE();
break;
}
return 1;
}

View File

@ -521,7 +521,6 @@ bool FeedbackNexus::Clear() {
case FeedbackSlotKind::kInvalid:
case FeedbackSlotKind::kKindsNumber:
UNREACHABLE();
break;
}
return feedback_updated;
}
@ -740,7 +739,6 @@ InlineCacheState FeedbackNexus::ic_state() const {
case FeedbackSlotKind::kInvalid:
case FeedbackSlotKind::kKindsNumber:
UNREACHABLE();
break;
}
return UNINITIALIZED;
}

View File

@ -2140,7 +2140,6 @@ void EventHandler(const v8::JitCodeEvent* event) {
case v8::JitCodeEvent::CODE_MOVED:
// Enabling the GDB JIT interface should disable code compaction.
UNREACHABLE();
break;
case v8::JitCodeEvent::CODE_REMOVED:
// Do nothing. Instead, adding code causes eviction of any entry whose
// address range intersects the address range of the added code.

View File

@ -3910,7 +3910,6 @@ Handle<LoadHandler> Factory::NewLoadHandler(int data_count) {
break;
default:
UNREACHABLE();
break;
}
return handle(LoadHandler::cast(New(map, AllocationType::kOld)), isolate());
}
@ -3932,7 +3931,6 @@ Handle<StoreHandler> Factory::NewStoreHandler(int data_count) {
break;
default:
UNREACHABLE();
break;
}
return handle(StoreHandler::cast(New(map, AllocationType::kOld)), isolate());
}

View File

@ -26,7 +26,6 @@ AllocationResult LocalAllocator::Allocate(AllocationSpace space,
->AllocateRaw(object_size, alignment);
default:
UNREACHABLE();
break;
}
}
@ -42,7 +41,6 @@ void LocalAllocator::FreeLast(AllocationSpace space, HeapObject object,
default:
// Only new and old space supported.
UNREACHABLE();
break;
}
}

View File

@ -4829,7 +4829,6 @@ void YoungGenerationEvacuator::RawEvacuatePage(MemoryChunk* chunk,
break;
case kObjectsOldToOld:
UNREACHABLE();
break;
}
}

View File

@ -541,7 +541,6 @@ int DisassemblerIA32::PrintOperands(const char* mnem,
}
default:
UNREACHABLE();
break;
}
return advance;
}

View File

@ -57,7 +57,6 @@ TNode<MaybeObject> AccessorAssembler::LoadHandlerDataField(
break;
default:
UNREACHABLE();
break;
}
USE(minimum_size);
CSA_ASSERT(this, UintPtrGreaterThanOrEqual(

View File

@ -704,7 +704,6 @@ void IC::PatchCache(Handle<Name> name, const MaybeObjectHandle& handler) {
break;
case GENERIC:
UNREACHABLE();
break;
}
}

View File

@ -522,7 +522,6 @@ Response V8DebuggerAgentImpl::setBreakpointByUrl(
break;
default:
UNREACHABLE();
break;
}
if (breakpoints->get(breakpointId)) {
return Response::Error("Breakpoint at specified location already exists.");

View File

@ -445,7 +445,6 @@ void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) {
switch (reserved_operand_size) {
case OperandSize::kNone:
UNREACHABLE();
break;
case OperandSize::kByte:
node->update_operand0(k8BitJumpPlaceholder);
break;

View File

@ -4350,7 +4350,6 @@ void BytecodeGenerator::VisitCall(Call* expr) {
}
case Call::SUPER_CALL:
UNREACHABLE();
break;
}
// Evaluate all arguments to the function call and store in sequential args

View File

@ -284,7 +284,6 @@ ConstantArrayBuilder::OperandSizeToSlice(OperandSize operand_size) const {
switch (operand_size) {
case OperandSize::kNone:
UNREACHABLE();
break;
case OperandSize::kByte:
slice = idx_slice_[0];
break;

View File

@ -389,7 +389,6 @@ Node* InterpreterAssembler::BytecodeOperandReadUnaligned(
break;
default:
UNREACHABLE();
break;
}
MachineType msb_type =
result_type.IsSigned() ? MachineType::Int8() : MachineType::Uint8();

View File

@ -109,7 +109,6 @@ void JSONTraceWriter::AppendArgValue(uint8_t type,
break;
default:
UNREACHABLE();
break;
}
}

View File

@ -556,7 +556,6 @@ void Decoder::PrintFormat(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
PrintChar(formatLetter);
}
@ -2052,7 +2051,6 @@ void Decoder::DecodeTypeImmediate(Instruction* instr) {
default:
printf("a 0x%x \n", instr->OpcodeFieldRaw());
UNREACHABLE();
break;
}
}

View File

@ -597,7 +597,6 @@ void Decoder::PrintFormat(Instruction* instr) {
break;
default:
UNREACHABLE();
break;
}
PrintChar(formatLetter);
}
@ -2344,7 +2343,6 @@ void Decoder::DecodeTypeImmediate(Instruction* instr) {
default:
printf("a 0x%x \n", instr->OpcodeFieldRaw());
UNREACHABLE();
break;
}
}

View File

@ -3636,7 +3636,6 @@ void Simulator::DecodeTypeRegisterCOP1() {
case BC1EQZ:
case BC1NEZ:
UNREACHABLE();
break;
case CFC1:
// At the moment only FCSR is supported.
DCHECK_EQ(fs_reg(), kFCSRRegister);

View File

@ -456,7 +456,6 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
// TODO(all): Handle these types too.
os << "UNKNOWN TYPE " << map()->instance_type();
UNREACHABLE();
break;
}
}
@ -1190,7 +1189,6 @@ void FeedbackNexus::Print(std::ostream& os) { // NOLINT
case FeedbackSlotKind::kInvalid:
case FeedbackSlotKind::kKindsNumber:
UNREACHABLE();
break;
}
}

View File

@ -2354,7 +2354,6 @@ void HeapObject::RehashBasedOnMap(ReadOnlyRoots roots) {
switch (map()->instance_type()) {
case HASH_TABLE_TYPE:
UNREACHABLE();
break;
case NAME_DICTIONARY_TYPE:
NameDictionary::cast(*this)->Rehash(roots);
break;

View File

@ -153,7 +153,6 @@ Cell Module::GetCell(int cell_index) {
break;
case ModuleDescriptor::kInvalid:
UNREACHABLE();
break;
}
return Cell::cast(cell);
}

View File

@ -107,7 +107,6 @@ void PendingCompilationErrorHandler::ThrowPendingError(Isolate* isolate,
break;
default:
UNREACHABLE();
break;
}
if (!error->IsJSObject()) {

View File

@ -318,7 +318,6 @@ int Decoder::FormatOption(Instruction* instr, const char* format) {
#endif
default: {
UNREACHABLE();
break;
}
}

View File

@ -1183,7 +1183,6 @@ void RegExpMacroAssemblerARM64::ReadCurrentPositionFromRegister(int reg) {
break;
default:
UNREACHABLE();
break;
}
}
@ -1515,7 +1514,6 @@ Register RegExpMacroAssemblerARM64::GetRegister(int register_index,
break;
default:
UNREACHABLE();
break;
}
DCHECK(result.Is32Bits());
return result;
@ -1549,7 +1547,6 @@ void RegExpMacroAssemblerARM64::StoreRegister(int register_index,
}
default:
UNREACHABLE();
break;
}
}

View File

@ -1725,7 +1725,6 @@ static inline bool EmitAtomLetter(Isolate* isolate,
break;
default:
UNREACHABLE();
break;
}
return true;
}

View File

@ -539,7 +539,6 @@ void RelocInfo::Verify(Isolate* isolate) {
case NUMBER_OF_MODES:
case PC_JUMP:
UNREACHABLE();
break;
}
}
#endif // VERIFY_HEAP

View File

@ -200,7 +200,6 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
case FAST_STRING_WRAPPER_ELEMENTS:
case SLOW_STRING_WRAPPER_ELEMENTS:
UNREACHABLE();
break;
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype) case TYPE##_ELEMENTS:
@ -208,7 +207,6 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
#undef TYPED_ARRAY_CASE
// Typed elements cannot be created using an object literal.
UNREACHABLE();
break;
case PACKED_SMI_ELEMENTS:
case HOLEY_SMI_ELEMENTS:

View File

@ -294,7 +294,6 @@ int Decoder::FormatOption(Instruction* instr, const char* format) {
}
default: {
UNREACHABLE();
break;
}
}

View File

@ -3114,7 +3114,6 @@ EVALUATE(VSUM) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3135,7 +3134,6 @@ EVALUATE(VSUMG) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3184,7 +3182,6 @@ EVALUATE(VPK) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3211,7 +3208,6 @@ EVALUATE(VPKS) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3238,7 +3234,6 @@ EVALUATE(VPKLS) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3272,7 +3267,6 @@ EVALUATE(VUPH) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3297,7 +3291,6 @@ EVALUATE(VUPLH) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3331,7 +3324,6 @@ EVALUATE(VUPL) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3356,7 +3348,6 @@ EVALUATE(VUPLL) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3542,7 +3533,6 @@ EVALUATE(VLC) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3897,7 +3887,6 @@ void VectorSignOp(void* dst, void* src, int m4, int m5) {
break;
default:
UNREACHABLE();
break;
}
}
@ -3919,7 +3908,6 @@ EVALUATE(VFPSO) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3958,7 +3946,6 @@ EVALUATE(VFSQ) {
break;
default:
UNREACHABLE();
break;
}
return length;
}
@ -3985,7 +3972,6 @@ EVALUATE(VFI) {
break;
default:
UNREACHABLE();
break;
}
return length;
}

View File

@ -170,7 +170,6 @@ void StringStream::Add(Vector<const char> format, Vector<FmtElm> elms) {
}
default:
UNREACHABLE();
break;
}
}

View File

@ -416,7 +416,6 @@ void ValueSerializer::WriteOddball(Oddball oddball) {
break;
default:
UNREACHABLE();
break;
}
WriteTag(tag);
}

View File

@ -641,7 +641,6 @@ void InstanceBuilder::WriteGlobalValue(const WasmGlobal& global, double num) {
// only be initialized with BigInts. See:
// https://github.com/WebAssembly/JS-BigInt-integration/issues/12
UNREACHABLE();
break;
case kWasmF32:
WriteLittleEndianValue<float>(GetRawGlobalPtr<float>(global),
DoubleToFloat32(num));

View File

@ -673,7 +673,6 @@ int DisassemblerX64::PrintOperands(const char* mnem,
}
default:
UNREACHABLE();
break;
}
return advance;
}

View File

@ -272,7 +272,6 @@ void PrintStateValue(std::ostream& os, Isolate* isolate, Handle<Object> value,
}
default:
UNREACHABLE();
break;
}
os << " (" << operand.representation() << " ";
if (operand.location_kind() == AllocatedOperand::REGISTER) {

View File

@ -167,7 +167,6 @@ void BytecodeExpectationsPrinter::PrintBytecodeOperand(
break;
default:
UNREACHABLE();
return;
}
if (Bytecodes::IsRegisterOperandType(op_type)) {

View File

@ -305,7 +305,6 @@ void ProgramOptions::UpdateFromHeader(std::istream& stream) {
continue;
} else {
UNREACHABLE();
return;
}
}
}

View File

@ -452,7 +452,6 @@ static void TestRoundingMode(VCVTTypes types,
default:
UNREACHABLE();
break;
}
// Check for vfp exceptions
__ vmrs(r2);

View File

@ -830,7 +830,6 @@ static void InitializeGenerationData(
break;
default:
UNREACHABLE();
break;
}
// Must remove the influence of the above decision.
test_case /= kBalances;
@ -854,7 +853,6 @@ static void InitializeGenerationData(
break;
default:
UNREACHABLE();
break;
}
// Must remove the influence of the above decision.
test_case /= kTreeLengths;

View File

@ -147,7 +147,6 @@ function test() {
switch(3) {
case 5:
assertUnreachable();
break;
case 3:
j = 13;
default:
@ -158,7 +157,6 @@ function test() {
case 9:
j = 19;
assertUnreachable();
break;
}
assertEquals(17, j, "switch with constant value");
}

View File

@ -813,7 +813,6 @@ TEST_P(SlotConstraintTest, SlotConstraint) {
break;
default:
UNREACHABLE();
break;
}
EndBlock(Last());