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

Side by Side Diff: src/serialize.cc

Issue 325553002: --verify-predictable mode added for ensuring that GC behaves deterministically. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/serialize.h ('k') | src/spaces-inl.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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // This routine writes the new object into the pointer provided and then 843 // This routine writes the new object into the pointer provided and then
844 // returns true if the new object was in young space and false otherwise. 844 // returns true if the new object was in young space and false otherwise.
845 // The reason for this strange interface is that otherwise the object is 845 // The reason for this strange interface is that otherwise the object is
846 // written very late, which means the FreeSpace map is not set up by the 846 // written very late, which means the FreeSpace map is not set up by the
847 // time we need to use it to mark the space at the end of a page free. 847 // time we need to use it to mark the space at the end of a page free.
848 void Deserializer::ReadObject(int space_number, 848 void Deserializer::ReadObject(int space_number,
849 Object** write_back) { 849 Object** write_back) {
850 int size = source_->GetInt() << kObjectAlignmentBits; 850 int size = source_->GetInt() << kObjectAlignmentBits;
851 Address address = Allocate(space_number, size); 851 Address address = Allocate(space_number, size);
852 HeapObject* obj = HeapObject::FromAddress(address); 852 HeapObject* obj = HeapObject::FromAddress(address);
853 isolate_->heap()->OnAllocationEvent(obj, size);
853 *write_back = obj; 854 *write_back = obj;
854 Object** current = reinterpret_cast<Object**>(address); 855 Object** current = reinterpret_cast<Object**>(address);
855 Object** limit = current + (size >> kPointerSizeLog2); 856 Object** limit = current + (size >> kPointerSizeLog2);
856 if (FLAG_log_snapshot_positions) { 857 if (FLAG_log_snapshot_positions) {
857 LOG(isolate_, SnapshotPositionEvent(address, source_->position())); 858 LOG(isolate_, SnapshotPositionEvent(address, source_->position()));
858 } 859 }
859 ReadChunk(current, limit, space_number, address); 860 ReadChunk(current, limit, space_number, address);
860 861
861 // TODO(mvstanton): consider treating the heap()->allocation_sites_list() 862 // TODO(mvstanton): consider treating the heap()->allocation_sites_list()
862 // as a (weak) root. If this root is relocated correctly, 863 // as a (weak) root. If this root is relocated correctly,
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 } 1814 }
1814 1815
1815 1816
1816 void Serializer::InitializeCodeAddressMap() { 1817 void Serializer::InitializeCodeAddressMap() {
1817 isolate_->InitializeLoggingAndCounters(); 1818 isolate_->InitializeLoggingAndCounters();
1818 code_address_map_ = new CodeAddressMap(isolate_); 1819 code_address_map_ = new CodeAddressMap(isolate_);
1819 } 1820 }
1820 1821
1821 1822
1822 } } // namespace v8::internal 1823 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | src/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698