Index: src/full-codegen/full-codegen.h |
diff --git a/src/full-codegen/full-codegen.h b/src/full-codegen/full-codegen.h |
index aa1caaff98603834e94192e2a4712c2a5a5cbed0..617e5268baa0cc0a1c231dd5520fb56ce488b376 100644 |
--- a/src/full-codegen/full-codegen.h |
+++ b/src/full-codegen/full-codegen.h |
@@ -411,11 +411,15 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> { |
void PrepareForBailout(Expression* node, Deoptimizer::BailoutState state); |
void PrepareForBailoutForId(BailoutId id, Deoptimizer::BailoutState state); |
+ // Returns the plain index for the FixedArray that backs the feedback vector. |
+ int SlotToIndex(FeedbackVectorSlot slot) const { |
+ return TypeFeedbackVector::GetIndexFromSpec( |
+ literal()->feedback_vector_spec(), slot); |
+ } |
// Returns a smi for the index into the FixedArray that backs the feedback |
// vector |
Smi* SmiFromSlot(FeedbackVectorSlot slot) const { |
- return Smi::FromInt(TypeFeedbackVector::GetIndexFromSpec( |
- literal()->feedback_vector_spec(), slot)); |
+ return Smi::FromInt(SlotToIndex(slot)); |
} |
// Record a call's return site offset, used to rebuild the frame if the |