Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index 61f09ac2e3726d9cddd3a7d65075a53a11a23188..650234a58447d506cd28659f0a9c4c49bd38a332 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -655,10 +655,14 @@ void BytecodeGenerator::BuildIndexedJump(Register index, size_t start_index, |
.CompareOperation(Token::Value::EQ_STRICT, index) |
.JumpIfTrue(&(targets[i])); |
} |
- // TODO(oth): This should be an abort via the runtime with a |
- // corresponding message., An illegal bytecode should never be |
- // emitted in valid bytecode. |
- builder()->Illegal(); // Should never get here. |
+ |
+ RegisterAllocationScope register_scope(this); |
+ Register reason = register_allocator()->NewRegister(); |
+ BailoutReason bailout_reason = BailoutReason::kInvalidJumpTableIndex; |
+ builder() |
+ ->LoadLiteral(Smi::FromInt(static_cast<int>(bailout_reason))) |
+ .StoreAccumulatorInRegister(reason) |
+ .CallRuntime(Runtime::kAbort, reason, 1); |
} |
void BytecodeGenerator::VisitIterationHeader(IterationStatement* stmt, |