Commit 99a53f73 authored by mvstanton's avatar mvstanton Committed by Commit bot

[compiler] Verify that type feedback vector structure is the same on recompile.

Use a CHECK statement to find any violations of this rule.

Review URL: https://codereview.chromium.org/1255383004

Cr-Commit-Position: refs/heads/master@{#29965}
parent 872206f4
......@@ -211,11 +211,14 @@ bool CompilationInfo::ShouldSelfOptimize() {
void CompilationInfo::EnsureFeedbackVector() {
if (feedback_vector_.is_null() ||
feedback_vector_->SpecDiffersFrom(function()->feedback_vector_spec())) {
if (feedback_vector_.is_null()) {
feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector(
function()->feedback_vector_spec());
}
// It's very important that recompiles do not alter the structure of the
// type feedback vector.
CHECK(!feedback_vector_->SpecDiffersFrom(function()->feedback_vector_spec()));
}
......
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