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

Side by Side Diff: src/serialize.h

Issue 375223002: Flush ICache after deserializing code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/serialize.cc » ('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 #ifndef V8_SERIALIZE_H_ 5 #ifndef V8_SERIALIZE_H_
6 #define V8_SERIALIZE_H_ 6 #define V8_SERIALIZE_H_
7 7
8 #include "src/hashmap.h" 8 #include "src/hashmap.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Deserialize a single object and the objects reachable from it. 243 // Deserialize a single object and the objects reachable from it.
244 void DeserializePartial(Isolate* isolate, Object** root); 244 void DeserializePartial(Isolate* isolate, Object** root);
245 245
246 void set_reservation(int space_number, int reservation) { 246 void set_reservation(int space_number, int reservation) {
247 ASSERT(space_number >= 0); 247 ASSERT(space_number >= 0);
248 ASSERT(space_number <= LAST_SPACE); 248 ASSERT(space_number <= LAST_SPACE);
249 reservations_[space_number] = reservation; 249 reservations_[space_number] = reservation;
250 } 250 }
251 251
252 void FlushICacheForNewCodeObjects();
253
252 private: 254 private:
253 virtual void VisitPointers(Object** start, Object** end); 255 virtual void VisitPointers(Object** start, Object** end);
254 256
255 virtual void VisitRuntimeEntry(RelocInfo* rinfo) { 257 virtual void VisitRuntimeEntry(RelocInfo* rinfo) {
256 UNREACHABLE(); 258 UNREACHABLE();
257 } 259 }
258 260
259 // Allocation sites are present in the snapshot, and must be linked into 261 // Allocation sites are present in the snapshot, and must be linked into
260 // a list at deserialization time. 262 // a list at deserialization time.
261 void RelinkAllocationSite(AllocationSite* site); 263 void RelinkAllocationSite(AllocationSite* site);
(...skipping 17 matching lines...) Expand all
279 } 281 }
280 282
281 // This returns the address of an object that has been described in the 283 // This returns the address of an object that has been described in the
282 // snapshot as being offset bytes back in a particular space. 284 // snapshot as being offset bytes back in a particular space.
283 HeapObject* GetAddressFromEnd(int space) { 285 HeapObject* GetAddressFromEnd(int space) {
284 int offset = source_->GetInt(); 286 int offset = source_->GetInt();
285 offset <<= kObjectAlignmentBits; 287 offset <<= kObjectAlignmentBits;
286 return HeapObject::FromAddress(high_water_[space] - offset); 288 return HeapObject::FromAddress(high_water_[space] - offset);
287 } 289 }
288 290
289 void FlushICacheForNewCodeObjects();
290
291 // Cached current isolate. 291 // Cached current isolate.
292 Isolate* isolate_; 292 Isolate* isolate_;
293 293
294 SnapshotByteSource* source_; 294 SnapshotByteSource* source_;
295 // This is the address of the next object that will be allocated in each 295 // This is the address of the next object that will be allocated in each
296 // space. It is used to calculate the addresses of back-references. 296 // space. It is used to calculate the addresses of back-references.
297 Address high_water_[LAST_SPACE + 1]; 297 Address high_water_[LAST_SPACE + 1];
298 298
299 int reservations_[LAST_SPACE + 1]; 299 int reservations_[LAST_SPACE + 1];
300 static const intptr_t kUninitializedReservation = -1; 300 static const intptr_t kUninitializedReservation = -1;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // [1] length in bytes 572 // [1] length in bytes
573 // [2..8] reservation sizes for spaces from NEW_SPACE to PROPERTY_CELL_SPACE. 573 // [2..8] reservation sizes for spaces from NEW_SPACE to PROPERTY_CELL_SPACE.
574 static const int kHeaderSize = 9; 574 static const int kHeaderSize = 9;
575 static const int kVersionHashOffset = 0; 575 static const int kVersionHashOffset = 0;
576 static const int kPayloadLengthOffset = 1; 576 static const int kPayloadLengthOffset = 1;
577 static const int kReservationsOffset = 2; 577 static const int kReservationsOffset = 2;
578 }; 578 };
579 } } // namespace v8::internal 579 } } // namespace v8::internal
580 580
581 #endif // V8_SERIALIZE_H_ 581 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « no previous file | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698