OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 static bool enabled() { return serialization_enabled_; } | 149 static bool enabled() { return serialization_enabled_; } |
150 | 150 |
151 static void Enable() { serialization_enabled_ = true; } | 151 static void Enable() { serialization_enabled_ = true; } |
152 static void Disable() { serialization_enabled_ = false; } | 152 static void Disable() { serialization_enabled_ = false; } |
153 | 153 |
154 private: | 154 private: |
155 friend class ReferenceUpdater; | 155 friend class ReferenceUpdater; |
156 | 156 |
157 virtual void VisitPointers(Object** start, Object** end); | 157 virtual void VisitPointers(Object** start, Object** end); |
158 | 158 virtual void VisitCodeTarget(RelocInfo* rinfo); |
159 bool IsVisited(HeapObject* obj); | 159 bool IsVisited(HeapObject* obj); |
160 | 160 |
161 Address GetSavedAddress(HeapObject* obj); | 161 Address GetSavedAddress(HeapObject* obj); |
162 | 162 |
163 void SaveAddress(HeapObject* obj, Address addr); | 163 void SaveAddress(HeapObject* obj, Address addr); |
164 | 164 |
165 void PutEncodedAddress(Address addr); | 165 void PutEncodedAddress(Address addr); |
166 // Write the global flags into the file. | 166 // Write the global flags into the file. |
167 void PutFlags(); | 167 void PutFlags(); |
168 // Write global information into the header of the file. | 168 // Write global information into the header of the file. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 int roots() { return roots_; } | 282 int roots() { return roots_; } |
283 int objects() { return objects_; } | 283 int objects() { return objects_; } |
284 | 284 |
285 #ifdef DEBUG | 285 #ifdef DEBUG |
286 // Check for the presence of "tag" in the serialized stream | 286 // Check for the presence of "tag" in the serialized stream |
287 virtual void Synchronize(const char* tag); | 287 virtual void Synchronize(const char* tag); |
288 #endif | 288 #endif |
289 | 289 |
290 private: | 290 private: |
291 virtual void VisitPointers(Object** start, Object** end); | 291 virtual void VisitPointers(Object** start, Object** end); |
| 292 virtual void VisitCodeTarget(RelocInfo* rinfo); |
292 virtual void VisitExternalReferences(Address* start, Address* end); | 293 virtual void VisitExternalReferences(Address* start, Address* end); |
293 virtual void VisitRuntimeEntry(RelocInfo* rinfo); | 294 virtual void VisitRuntimeEntry(RelocInfo* rinfo); |
294 | 295 |
295 Address GetEncodedAddress(); | 296 Address GetEncodedAddress(); |
296 | 297 |
297 // Read other global information (except flags) from the header of the file. | 298 // Read other global information (except flags) from the header of the file. |
298 void GetHeader(); | 299 void GetHeader(); |
299 // Read a stack of handles from the file bottom first. | 300 // Read a stack of handles from the file bottom first. |
300 void GetGlobalHandleStack(List<Handle<Object> >* stack); | 301 void GetGlobalHandleStack(List<Handle<Object> >* stack); |
301 // Read the context stack from the file. | 302 // Read the context stack from the file. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 #ifdef DEBUG | 335 #ifdef DEBUG |
335 bool expect_debug_information_; | 336 bool expect_debug_information_; |
336 #endif | 337 #endif |
337 | 338 |
338 DISALLOW_COPY_AND_ASSIGN(Deserializer); | 339 DISALLOW_COPY_AND_ASSIGN(Deserializer); |
339 }; | 340 }; |
340 | 341 |
341 } } // namespace v8::internal | 342 } } // namespace v8::internal |
342 | 343 |
343 #endif // V8_SERIALIZE_H_ | 344 #endif // V8_SERIALIZE_H_ |
OLD | NEW |