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

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: Review comments. 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
« no previous file with comments | « 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..4b06b9a6874a6461b859eca6e304a1f864daf47a 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.
+ if (object_->RequiredAlignment() == kDoubleAligned) {
// Add wriggle room for double alignment padding.
back_reference = serializer_->Allocate(space, size + kPointerSize);
needs_double_align = true;
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698