OLD | NEW |
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/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/hashmap.h" | 9 #include "src/hashmap.h" |
10 #include "src/heap-profiler.h" | 10 #include "src/heap-profiler.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 // Fills in some heap data in an area from start to end (non-inclusive). The | 274 // Fills in some heap data in an area from start to end (non-inclusive). The |
275 // space id is used for the write barrier. The object_address is the address | 275 // space id is used for the write barrier. The object_address is the address |
276 // of the object we are writing into, or NULL if we are not writing into an | 276 // of the object we are writing into, or NULL if we are not writing into an |
277 // object, i.e. if we are writing a series of tagged values that are not on | 277 // object, i.e. if we are writing a series of tagged values that are not on |
278 // the heap. | 278 // the heap. |
279 void ReadChunk( | 279 void ReadChunk( |
280 Object** start, Object** end, int space, Address object_address); | 280 Object** start, Object** end, int space, Address object_address); |
281 void ReadObject(int space_number, Object** write_back); | 281 void ReadObject(int space_number, Object** write_back); |
282 | 282 |
283 HeapObject* ProcessObjectFromSerializedCode(HeapObject* obj); | 283 // Special handling for serialized code like hooking up internalized strings. |
| 284 HeapObject* ProcessNewObjectFromSerializedCode(HeapObject* obj); |
| 285 Object* ProcessBackRefInSerializedCode(Object* obj); |
284 | 286 |
285 // This routine both allocates a new object, and also keeps | 287 // This routine both allocates a new object, and also keeps |
286 // track of where objects have been allocated so that we can | 288 // track of where objects have been allocated so that we can |
287 // fix back references when deserializing. | 289 // fix back references when deserializing. |
288 Address Allocate(int space_index, int size) { | 290 Address Allocate(int space_index, int size) { |
289 Address address = high_water_[space_index]; | 291 Address address = high_water_[space_index]; |
290 high_water_[space_index] = address + size; | 292 high_water_[space_index] = address + size; |
291 return address; | 293 return address; |
292 } | 294 } |
293 | 295 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 static const int kCheckSumOffset = 0; | 667 static const int kCheckSumOffset = 0; |
666 static const int kReservationsOffset = 1; | 668 static const int kReservationsOffset = 1; |
667 static const int kHeaderEntries = 8; | 669 static const int kHeaderEntries = 8; |
668 | 670 |
669 ScriptData* script_data_; | 671 ScriptData* script_data_; |
670 bool owns_script_data_; | 672 bool owns_script_data_; |
671 }; | 673 }; |
672 } } // namespace v8::internal | 674 } } // namespace v8::internal |
673 | 675 |
674 #endif // V8_SERIALIZE_H_ | 676 #endif // V8_SERIALIZE_H_ |
OLD | NEW |