Commit 72c9ab34 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[cleanup] Remove code_is_interpreted parameter from ComputeCounts.

Since fullcodegen was removed, all baseline code runs in Ignition now,
so the code_is_interpreted parameter to FeedbackVector::ComputeCounts
is no longer needed.

Bug: v8:6409
Change-Id: I27842a4978079f8166f22db6c695b352a38e1d87
Reviewed-on: https://chromium-review.googlesource.com/646106Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47748}
parent 71b7c4c0
......@@ -222,8 +222,7 @@ CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) {
}
void FeedbackVector::ComputeCounts(int* with_type_info, int* generic,
int* vector_ic_count,
bool code_is_interpreted) {
int* vector_ic_count) {
Object* megamorphic_sentinel =
*FeedbackVector::MegamorphicSentinel(GetIsolate());
int with = 0;
......@@ -237,11 +236,6 @@ void FeedbackVector::ComputeCounts(int* with_type_info, int* generic,
Object* const obj = Get(slot);
switch (kind) {
case FeedbackSlotKind::kCall:
// If we are not running interpreted code, we need to ignore the special
// IC slots for call/construct used by the interpreter.
// TODO(mvstanton): Remove code_is_interpreted when full code is retired
// from service.
if (!code_is_interpreted) break;
case FeedbackSlotKind::kLoadProperty:
case FeedbackSlotKind::kLoadGlobalInsideTypeof:
case FeedbackSlotKind::kLoadGlobalNotInsideTypeof:
......@@ -259,34 +253,24 @@ void FeedbackVector::ComputeCounts(int* with_type_info, int* generic,
with++;
} else if (obj == megamorphic_sentinel) {
gen++;
if (code_is_interpreted) with++;
with++;
}
total++;
break;
}
case FeedbackSlotKind::kBinaryOp:
// If we are not running interpreted code, we need to ignore the special
// IC slots for binaryop/compare used by the interpreter.
// TODO(mvstanton): Remove code_is_interpreted when full code is retired
// from service.
if (code_is_interpreted) {
int const feedback = Smi::ToInt(obj);
BinaryOperationHint hint = BinaryOperationHintFromFeedback(feedback);
if (hint == BinaryOperationHint::kAny) {
gen++;
}
if (hint != BinaryOperationHint::kNone) {
with++;
}
total++;
case FeedbackSlotKind::kBinaryOp: {
int const feedback = Smi::ToInt(obj);
BinaryOperationHint hint = BinaryOperationHintFromFeedback(feedback);
if (hint == BinaryOperationHint::kAny) {
gen++;
}
if (hint != BinaryOperationHint::kNone) {
with++;
}
total++;
break;
}
case FeedbackSlotKind::kCompareOp: {
// If we are not running interpreted code, we need to ignore the special
// IC slots for binaryop/compare used by the interpreter.
// TODO(mvstanton): Remove code_is_interpreted when full code is retired
// from service.
if (code_is_interpreted) {
int const feedback = Smi::ToInt(obj);
CompareOperationHint hint =
CompareOperationHintFromFeedback(feedback);
......@@ -297,7 +281,6 @@ void FeedbackVector::ComputeCounts(int* with_type_info, int* generic,
with++;
}
total++;
}
break;
}
case FeedbackSlotKind::kCreateClosure:
......
......@@ -125,7 +125,7 @@ class FeedbackVector : public HeapObject {
static inline FeedbackVector* cast(Object* obj);
inline void ComputeCounts(int* with_type_info, int* generic,
int* vector_ic_count, bool code_is_interpreted);
int* vector_ic_count);
inline bool is_empty() const;
......
......@@ -109,9 +109,8 @@ static void GetICCounts(JSFunction* function, int* ic_with_type_info_count,
// Harvest vector-ics as well
FeedbackVector* vector = function->feedback_vector();
int with = 0, gen = 0, type_vector_ic_count = 0;
const bool is_interpreted = function->shared()->IsInterpreted();
vector->ComputeCounts(&with, &gen, &type_vector_ic_count, is_interpreted);
vector->ComputeCounts(&with, &gen, &type_vector_ic_count);
*ic_total_count += type_vector_ic_count;
*ic_with_type_info_count += with;
*ic_generic_count += gen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment