Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Unified Diff: src/compiler.cc

Issue 1255383004: [compiler] Verify that type feedback vector structure is the same on recompile. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and comment change. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 1815c9a8d6441176ba61503aa3ba2186ddc30abe..574048682238c0a8c56316c7ba0f6c03ad8729f4 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -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()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698