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

Side by Side Diff: src/serialize.cc

Issue 876613002: Only use FreeSpace objects in the free list. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 void Deserializer::Deserialize(Isolate* isolate) { 658 void Deserializer::Deserialize(Isolate* isolate) {
659 Initialize(isolate); 659 Initialize(isolate);
660 if (!ReserveSpace()) FatalProcessOutOfMemory("deserializing context"); 660 if (!ReserveSpace()) FatalProcessOutOfMemory("deserializing context");
661 // No active threads. 661 // No active threads.
662 DCHECK_EQ(NULL, isolate_->thread_manager()->FirstThreadStateInUse()); 662 DCHECK_EQ(NULL, isolate_->thread_manager()->FirstThreadStateInUse());
663 // No active handles. 663 // No active handles.
664 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); 664 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty());
665 isolate_->heap()->IterateSmiRoots(this); 665 isolate_->heap()->IterateSmiRoots(this);
666 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); 666 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG);
667 isolate_->heap()->RepairFreeListsAfterBoot(); 667 isolate_->heap()->RepairFreeListsAfterDeserialization();
668 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); 668 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL);
669 669
670 isolate_->heap()->set_native_contexts_list( 670 isolate_->heap()->set_native_contexts_list(
671 isolate_->heap()->undefined_value()); 671 isolate_->heap()->undefined_value());
672 isolate_->heap()->set_array_buffers_list( 672 isolate_->heap()->set_array_buffers_list(
673 isolate_->heap()->undefined_value()); 673 isolate_->heap()->undefined_value());
674 674
675 // The allocation site list is build during root iteration, but if no sites 675 // The allocation site list is build during root iteration, but if no sites
676 // were encountered then it needs to be initialized to undefined. 676 // were encountered then it needs to be initialized to undefined.
677 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { 677 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) {
(...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 return GetHeaderValue(kNumInternalizedStringsOffset); 2548 return GetHeaderValue(kNumInternalizedStringsOffset);
2549 } 2549 }
2550 2550
2551 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const { 2551 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const {
2552 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size; 2552 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size;
2553 const byte* start = data_ + kHeaderSize + reservations_size; 2553 const byte* start = data_ + kHeaderSize + reservations_size;
2554 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start), 2554 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start),
2555 GetHeaderValue(kNumCodeStubKeysOffset)); 2555 GetHeaderValue(kNumCodeStubKeysOffset));
2556 } 2556 }
2557 } } // namespace v8::internal 2557 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698