Reviewers: ulan,
Description:
Version 4.3.61.36
Disable alignment handling in the serializer/deserializer.
[email protected]
BUG=v8:4291
Please review this at https://codereview.chromium.org/1223263002/
Base URL: https://chromium.googlesource.com/v8/[email protected]
Affected files (+3, -23 lines):
M include/v8-version.h
M src/snapshot/serialize.cc
Index: include/v8-version.h
diff --git a/include/v8-version.h b/include/v8-version.h
index
6e286caeb93ecc1dcd81e37c17f574fbe286a7e1..a48ec064ff3b36fd0a8bcaaf38230dffbfae09bc
100644
--- a/include/v8-version.h
+++ b/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 3
#define V8_BUILD_NUMBER 61
-#define V8_PATCH_LEVEL 35
+#define V8_PATCH_LEVEL 36
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index
c49c75b1c110d4012434c02a72a202b819185cfd..c6f640926ae870bba5a137fa9a87cf9768518506
100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -792,21 +792,10 @@ void Deserializer::ReadObject(int space_number,
Object** write_back) {
HeapObject* obj;
int next_int = source_.GetInt();
- bool double_align = false;
-#ifndef V8_HOST_ARCH_64_BIT
- double_align = next_int == kDoubleAlignmentSentinel;
- if (double_align) next_int = source_.GetInt();
-#endif
-
DCHECK_NE(kDoubleAlignmentSentinel, next_int);
int size = next_int << kObjectAlignmentBits;
- int reserved_size = size + (double_align ? kPointerSize : 0);
- address = Allocate(space_number, reserved_size);
+ address = Allocate(space_number, size);
obj = HeapObject::FromAddress(address);
- if (double_align) {
- obj = isolate_->heap()->DoubleAlignForDeserialization(obj,
reserved_size);
- address = obj->address();
- }
isolate_->heap()->OnAllocationEvent(obj, size);
Object** current = reinterpret_cast<Object**>(address);
@@ -1682,17 +1671,8 @@ void
Serializer::ObjectSerializer::SerializePrologue(AllocationSpace space,
}
back_reference = serializer_->AllocateLargeObject(size);
} else {
- bool needs_double_align = false;
- if (object_->NeedsToEnsureDoubleAlignment()) {
- // Add wriggle room for double alignment padding.
- back_reference = serializer_->Allocate(space, size + kPointerSize);
- needs_double_align = true;
- } else {
- back_reference = serializer_->Allocate(space, size);
- }
+ back_reference = serializer_->Allocate(space, size);
sink_->Put(kNewObject + reference_representation_ +
space, "NewObject");
- if (needs_double_align)
- sink_->PutInt(kDoubleAlignmentSentinel, "DoubleAlignSentinel");
int encoded_size = size >> kObjectAlignmentBits;
DCHECK_NE(kDoubleAlignmentSentinel, encoded_size);
sink_->PutInt(encoded_size, "ObjectSizeInWords");
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.