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

Side by Side Diff: src/snapshot/deserializer.cc

Issue 2237883002: [serializer] checksum a larger part of the code snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 4 years, 4 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/snapshot/code-serializer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/snapshot/deserializer.h" 5 #include "src/snapshot/deserializer.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/external-reference-table.h" 8 #include "src/external-reference-table.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 isolate->heap()->RegisterReservationsForBlackAllocation(reservations_); 156 isolate->heap()->RegisterReservationsForBlackAllocation(reservations_);
157 } 157 }
158 CommitPostProcessedObjects(isolate); 158 CommitPostProcessedObjects(isolate);
159 return scope.CloseAndEscape(result); 159 return scope.CloseAndEscape(result);
160 } 160 }
161 } 161 }
162 162
163 Deserializer::~Deserializer() { 163 Deserializer::~Deserializer() {
164 // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. 164 // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed.
165 // DCHECK(source_.AtEOF()); 165 // DCHECK(source_.AtEOF());
166 #ifdef DEBUG
166 for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) { 167 for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) {
167 int chunk_index = current_chunk_[space]; 168 int chunk_index = current_chunk_[space];
168 CHECK_EQ(reservations_[space].length(), chunk_index + 1); 169 CHECK_EQ(reservations_[space].length(), chunk_index + 1);
169 CHECK_EQ(reservations_[space][chunk_index].end, high_water_[space]); 170 CHECK_EQ(reservations_[space][chunk_index].end, high_water_[space]);
170 } 171 }
171 CHECK_EQ(allocated_maps_.length(), next_map_index_); 172 CHECK_EQ(allocated_maps_.length(), next_map_index_);
173 #endif // DEBUG
172 } 174 }
173 175
174 // This is called on the roots. It is the driver of the deserialization 176 // This is called on the roots. It is the driver of the deserialization
175 // process. It is also called on the body of each function. 177 // process. It is also called on the body of each function.
176 void Deserializer::VisitPointers(Object** start, Object** end) { 178 void Deserializer::VisitPointers(Object** start, Object** end) {
177 // The space must be new space. Any other space would cause ReadChunk to try 179 // The space must be new space. Any other space would cause ReadChunk to try
178 // to update the remembered using NULL as the address. 180 // to update the remembered using NULL as the address.
179 ReadData(start, end, NEW_SPACE, NULL); 181 ReadData(start, end, NEW_SPACE, NULL);
180 } 182 }
181 183
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 824
823 default: 825 default:
824 CHECK(false); 826 CHECK(false);
825 } 827 }
826 } 828 }
827 CHECK_EQ(limit, current); 829 CHECK_EQ(limit, current);
828 return true; 830 return true;
829 } 831 }
830 } // namespace internal 832 } // namespace internal
831 } // namespace v8 833 } // namespace v8
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698