Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index bdc5370f5a30ac5779f65f6999c3470256a712cf..e905da08547a5713273c08a8f4035826cdcf5dae 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -2522,8 +2522,19 @@ void BytecodeGenerator::VisitCall(Call* expr) { |
} |
builder()->SetExpressionPosition(expr); |
- builder()->Call(callee, receiver, 1 + args->length(), |
- feedback_index(expr->CallFeedbackICSlot()), |
+ |
+ int feedback_slot_index; |
+ if (expr->CallFeedbackICSlot().IsInvalid()) { |
+ DCHECK(call_type == Call::POSSIBLY_EVAL_CALL); |
+ // Valid type feedback slots can only be greater than kReservedIndexCount. |
+ // We use 0 to indicate an invalid slot it. Statically assert that 0 cannot |
+ // be a valid slot id. |
+ STATIC_ASSERT(TypeFeedbackVector::kReservedIndexCount > 0); |
+ feedback_slot_index = 0; |
+ } else { |
+ feedback_slot_index = feedback_index(expr->CallFeedbackICSlot()); |
+ } |
+ builder()->Call(callee, receiver, 1 + args->length(), feedback_slot_index, |
expr->tail_call_mode()); |
execution_result()->SetResultInAccumulator(); |
} |