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

Unified Diff: src/objects-inl.h

Issue 2597163002: Revert of [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: Created 4 years 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/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index ffb786de0c4b8b370c89b3f4f9180cf397a8c6ef..376e898ea9c27f4bb78e91590bb27f7a292334bd 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3494,16 +3494,12 @@
return reinterpret_cast<LiteralsArray*>(object);
}
-bool LiteralsArray::needs_feedback_vector() const {
- return get(kVectorIndex)->IsUndefined(this->GetIsolate());
-}
TypeFeedbackVector* LiteralsArray::feedback_vector() const {
- if (length() == 0 || needs_feedback_vector()) {
+ if (length() == 0) {
return TypeFeedbackVector::cast(
- this->GetIsolate()->heap()->empty_type_feedback_vector());
- }
-
+ const_cast<FixedArray*>(FixedArray::cast(this)));
+ }
return TypeFeedbackVector::cast(get(kVectorIndex));
}
@@ -6630,13 +6626,6 @@
}
}
-bool JSFunction::needs_literals_array() const {
- SharedFunctionInfo* shared = this->shared();
-
- return literals() == shared->GetIsolate()->heap()->empty_literals_array() &&
- (shared->feedback_metadata()->slot_count() > 0 ||
- shared->num_literals() > 0);
-}
Context* JSFunction::context() {
return Context::cast(READ_FIELD(this, kContextOffset));
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698