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

Unified Diff: src/objects.cc

Issue 2740033002: [serializer] complete slack tracking when creating context snapshot. (Closed)
Patch Set: update comments Created 3 years, 9 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/api.cc ('k') | no next file » | 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 56b666fb8126f7b5d7512c310f3caf1354d620f0..cfc6fe35ae60a602f10229988778c658d4b6b760 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13577,16 +13577,9 @@ void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared,
// to be added later.
if (estimate == 0) estimate = 2;
- // TODO(yangguo): check whether those heuristics are still up-to-date.
- // We do not shrink objects that go into a snapshot (yet), so we adjust
- // the estimate conservatively.
- if (shared->GetIsolate()->serializer_enabled()) {
- estimate += 2;
- } else {
- // Inobject slack tracking will reclaim redundant inobject space later,
- // so we can afford to adjust the estimate generously.
- estimate += 8;
- }
+ // Inobject slack tracking will reclaim redundant inobject space later,
+ // so we can afford to adjust the estimate generously.
+ estimate += 8;
shared->set_expected_nof_properties(estimate);
}
@@ -13639,13 +13632,8 @@ void SharedFunctionInfo::SetConstructStub(Code* code) {
void Map::StartInobjectSlackTracking() {
DCHECK(!IsInobjectSlackTrackingInProgress());
-
- // No tracking during the snapshot construction phase.
Isolate* isolate = GetIsolate();
Toon Verwaest 2017/03/15 12:20:09 unused variable?
- if (isolate->serializer_enabled()) return;
-
if (unused_property_fields() == 0) return;
-
set_construction_counter(Map::kSlackTrackingCounterStart);
}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698