Version 3.9.10
Fixed V8 issues 1322, 1772 and 1969.
Conformance improvements.
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@10829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/serialize.cc b/src/serialize.cc
index d9fc2b7..81a94dd 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -1088,9 +1088,10 @@
external_reference_encoder_(new ExternalReferenceEncoder),
large_object_total_(0),
root_index_wave_front_(0) {
+ isolate_ = Isolate::Current();
// The serializer is meant to be used only to generate initial heap images
// from a context in which there is only one isolate.
- ASSERT(Isolate::Current()->IsDefaultIsolate());
+ ASSERT(isolate_->IsDefaultIsolate());
for (int i = 0; i <= LAST_SPACE; i++) {
fullness_[i] = 0;
}
@@ -1642,8 +1643,8 @@
// serialized address.
CHECK(IsPowerOf2(Page::kPageSize));
int used_in_this_page = (fullness_[space] & (Page::kPageSize - 1));
- CHECK(size <= Page::kObjectAreaSize);
- if (used_in_this_page + size > Page::kObjectAreaSize) {
+ CHECK(size <= SpaceAreaSize(space));
+ if (used_in_this_page + size > SpaceAreaSize(space)) {
*new_page = true;
fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
}
@@ -1654,4 +1655,13 @@
}
+int Serializer::SpaceAreaSize(int space) {
+ if (space == CODE_SPACE) {
+ return isolate_->memory_allocator()->CodePageAreaSize();
+ } else {
+ return Page::kPageSize - Page::kObjectStartOffset;
+ }
+}
+
+
} } // namespace v8::internal