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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 #endif | 147 #endif |
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 BeginCodeIteration(Code* code) { } | |
158 virtual void VisitPointers(Object** start, Object** end); | 157 virtual void VisitPointers(Object** start, Object** end); |
159 virtual void VisitCodeTarget(RelocInfo* rinfo); | 158 virtual void VisitCodeTarget(RelocInfo* rinfo); |
160 bool IsVisited(HeapObject* obj); | 159 bool IsVisited(HeapObject* obj); |
161 | 160 |
162 Address GetSavedAddress(HeapObject* obj); | 161 Address GetSavedAddress(HeapObject* obj); |
163 | 162 |
164 void SaveAddress(HeapObject* obj, Address addr); | 163 void SaveAddress(HeapObject* obj, Address addr); |
165 | 164 |
166 void PutEncodedAddress(Address addr); | 165 void PutEncodedAddress(Address addr); |
167 // Write the global flags into the file. | 166 // Write the global flags into the file. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 int roots() { return roots_; } | 282 int roots() { return roots_; } |
284 int objects() { return objects_; } | 283 int objects() { return objects_; } |
285 | 284 |
286 #ifdef DEBUG | 285 #ifdef DEBUG |
287 // Check for the presence of "tag" in the serialized stream | 286 // Check for the presence of "tag" in the serialized stream |
288 virtual void Synchronize(const char* tag); | 287 virtual void Synchronize(const char* tag); |
289 #endif | 288 #endif |
290 | 289 |
291 private: | 290 private: |
292 virtual void VisitPointers(Object** start, Object** end); | 291 virtual void VisitPointers(Object** start, Object** end); |
293 virtual void BeginCodeIteration(Code* code) { } | |
294 virtual void VisitCodeTarget(RelocInfo* rinfo); | 292 virtual void VisitCodeTarget(RelocInfo* rinfo); |
295 virtual void VisitExternalReferences(Address* start, Address* end); | 293 virtual void VisitExternalReferences(Address* start, Address* end); |
296 virtual void VisitRuntimeEntry(RelocInfo* rinfo); | 294 virtual void VisitRuntimeEntry(RelocInfo* rinfo); |
297 | 295 |
298 Address GetEncodedAddress(); | 296 Address GetEncodedAddress(); |
299 | 297 |
300 // 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. |
301 void GetHeader(); | 299 void GetHeader(); |
302 // Read a stack of handles from the file bottom first. | 300 // Read a stack of handles from the file bottom first. |
303 void GetGlobalHandleStack(List<Handle<Object> >* stack); | 301 void GetGlobalHandleStack(List<Handle<Object> >* stack); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 #ifdef DEBUG | 335 #ifdef DEBUG |
338 bool expect_debug_information_; | 336 bool expect_debug_information_; |
339 #endif | 337 #endif |
340 | 338 |
341 DISALLOW_COPY_AND_ASSIGN(Deserializer); | 339 DISALLOW_COPY_AND_ASSIGN(Deserializer); |
342 }; | 340 }; |
343 | 341 |
344 } } // namespace v8::internal | 342 } } // namespace v8::internal |
345 | 343 |
346 #endif // V8_SERIALIZE_H_ | 344 #endif // V8_SERIALIZE_H_ |
OLD | NEW |