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

Unified Diff: src/snapshot/partial-serializer.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: gyp file 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
Index: src/snapshot/partial-serializer.cc
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc
index b78a1edbd0647f52079a4a3ee1c4b922ad334c5f..52938a5fbe2962ac7c0722a60b870cf4845c3897 100644
--- a/src/snapshot/partial-serializer.cc
+++ b/src/snapshot/partial-serializer.cc
@@ -93,10 +93,9 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
// Clear literal boilerplates.
if (obj->IsJSFunction()) {
JSFunction* function = JSFunction::cast(obj);
- LiteralsArray* literals = function->literals();
- for (int i = 0; i < literals->literals_count(); i++) {
- literals->set_literal_undefined(i);
- }
+ TypeFeedbackVector* vector = function->feedback_vector();
+ vector->ClearSlots(function->shared());
+ // TODO(mvstanton): I think there is duplication here.
function->ClearTypeFeedbackInfo();
}

Powered by Google App Engine
This is Rietveld 408576698