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

Unified Diff: src/objects.cc

Issue 2672363002: Link type feedback vectors to the shared function info. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « src/isolate.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 41c3edc707095d860703378924a2ce85d83ea7c4..f6b82a0b9ed1c515637dec1ff4864164a30b6090 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12120,7 +12120,7 @@ void JSFunction::EnsureLiterals(Handle<JSFunction> function) {
}
// Top level code didn't get it's literals installed.
Handle<FeedbackVector> feedback_vector =
- FeedbackVector::New(isolate, handle(shared->feedback_metadata()));
+ FeedbackVector::New(isolate, shared);
Handle<Cell> new_cell = isolate->factory()->NewCell(feedback_vector);
function->set_feedback_vector_cell(*new_cell);
} else if (!cell->value()->IsFeedbackVector() ||
@@ -12132,7 +12132,7 @@ void JSFunction::EnsureLiterals(Handle<JSFunction> function) {
reinterpret_cast<void*>(*function));
}
Handle<FeedbackVector> feedback_vector =
- FeedbackVector::New(isolate, handle(shared->feedback_metadata()));
+ FeedbackVector::New(isolate, shared);
// Re-get the feedback_vector() value as GC may have occurred.
function->feedback_vector_cell()->set_value(*feedback_vector);
} else {
@@ -12142,11 +12142,6 @@ void JSFunction::EnsureLiterals(Handle<JSFunction> function) {
reinterpret_cast<void*>(*function));
}
}
-
- // No matter what, ensure some post-conditions.
- DCHECK(shared->feedback_metadata()->slot_count() != 0 ||
- function->feedback_vector() ==
- shared->GetIsolate()->heap()->empty_feedback_vector());
}
static void GetMinInobjectSlack(Map* map, void* data) {
« no previous file with comments | « src/isolate.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698