Commit d7d97192 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Compile] Replace resetting of feedback vector with CHECK_EQ.

Previous differences in eager and lazy parsing meant that it was possible
that feedback vectors could be different for the same function depending on
how it was compiled. These issues have now been fixed, so remove the workaround
and add an explicit CHECK that the feedback vectors are the same.

BUG=chromium:984344,v8:9511

Change-Id: I0edfa350b1a2f236db1ee2f86bc46690da926af1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741650
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63116}
parent 4418a7b9
......@@ -4994,13 +4994,9 @@ void JSFunction::InitializeFeedbackCell(Handle<JSFunction> function) {
Isolate* const isolate = function->GetIsolate();
if (function->has_feedback_vector()) {
// TODO(984344): Make this a CHECK that feedback vectors are identical to
// what we expect once we have removed all bytecode generation differences
// between eager and lazy compilation. For now just reset if they aren't
// identical
FeedbackVector vector = function->feedback_vector();
if (vector.length() == vector.metadata().slot_count()) return;
function->raw_feedback_cell().reset();
CHECK_EQ(function->feedback_vector().length(),
function->feedback_vector().metadata().slot_count());
return;
}
bool needs_feedback_vector = !FLAG_lazy_feedback_allocation;
......
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