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

Unified Diff: src/snapshot/serialize.cc

Issue 1150953002: Generalize HeapObject alignment requirements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« src/objects-debug.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index b311f9dcda065c2c3b1f8dad3bfafe383e7f2a92..eaebd68e5d78970e888ac75867fa555f98137158 100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -1729,7 +1729,8 @@ void Serializer::ObjectSerializer::SerializePrologue(AllocationSpace space,
back_reference = serializer_->AllocateLargeObject(size);
} else {
bool needs_double_align = false;
- if (object_->NeedsToEnsureDoubleAlignment()) {
+ // TODO(bbudge) Generalize to other alignment constraints.
Hannes Payer (out of office) 2015/05/21 09:53:31 TODO(bbudge): ...
bbudge 2015/05/21 10:02:08 Done.
+ if (object_->RequiredAlignment() == kDoubleAligned) {
// Add wriggle room for double alignment padding.
back_reference = serializer_->Allocate(space, size + kPointerSize);
needs_double_align = true;
« src/objects-debug.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698