Commit 16089196 authored by Mythri's avatar Mythri Committed by Commit Bot

[Interpreter] Inline fast paths in compare bytecode handlers.

Compare bytecode handlers does several checks to collect feedback and
repeats these checks when actually performing the operation. This cl
changes it perform the actual comparison for smi / number along with 
collecting feedback. 

BUG=v8:4280

Change-Id: If0954b68dd232461e08e94a90ccc17604c235b27
Reviewed-on: https://chromium-review.googlesource.com/458420
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44216}
parent e2858f2a
This diff is collapsed.
......@@ -1987,17 +1987,9 @@ TEST(InterpreterMixedComparisons) {
CompareC(comparison, lhs, rhs, true));
Object* feedback = callable.vector()->Get(slot);
CHECK(feedback->IsSmi());
int expected_feedback = CompareOperationFeedback::kNumber;
if (string_type == kInternalizedStringConstant &&
!Token::IsOrderedRelationalCompareOp(comparison)) {
// Non-ordering compares (i.e. equality/strict equality) have
// special type feedback specifically for internalized strings.
expected_feedback |=
CompareOperationFeedback::kInternalizedString;
} else {
expected_feedback |= CompareOperationFeedback::kString;
}
CHECK_EQ(expected_feedback, static_cast<Smi*>(feedback)->value());
// Comparison with a number and string collects kAny feedback.
CHECK_EQ(CompareOperationFeedback::kAny,
static_cast<Smi*>(feedback)->value());
}
}
}
......
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