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

Unified Diff: src/type-feedback-vector.cc

Issue 2631253002: [compiler] Unify EnsureFeedbackMetadata call sites. (Closed)
Patch Set: Remove helper method. Created 3 years, 11 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/type-feedback-vector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index 7fdd7a5504da3970d4260c885ab396281db7b963..dfcb98d1ec1501114b85dd39da622d739de1198a 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -118,27 +118,6 @@ Handle<TypeFeedbackMetadata> TypeFeedbackMetadata::New(Isolate* isolate,
return metadata;
}
-// static
-void TypeFeedbackMetadata::EnsureAllocated(Isolate* isolate,
- Handle<SharedFunctionInfo> sfi,
- const FeedbackVectorSpec* spec) {
- // If no type feedback metadata exists, create it. At this point the
- // AstNumbering pass has already run. Note the snapshot can contain outdated
- // vectors for a different configuration, hence we also recreate a new vector
- // when the function is not compiled (i.e. no code was serialized).
-
- // TODO(mvstanton): reintroduce is_empty() predicate to feedback_metadata().
- if (sfi->feedback_metadata()->length() == 0 || !sfi->is_compiled()) {
- Handle<TypeFeedbackMetadata> feedback_metadata =
- TypeFeedbackMetadata::New(isolate, spec);
- sfi->set_feedback_metadata(*feedback_metadata);
- }
-
- // It's very important that recompiles do not alter the structure of the type
- // feedback vector. Verify that the structure fits the function literal.
- CHECK(!sfi->feedback_metadata()->SpecDiffersFrom(spec));
-}
-
bool TypeFeedbackMetadata::SpecDiffersFrom(
const FeedbackVectorSpec* other_spec) const {
if (other_spec->slots() != slot_count()) {
« no previous file with comments | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698