| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 f(13, 28) \ | 203 f(13, 28) \ |
| 204 f(14, 32) \ | 204 f(14, 32) \ |
| 205 f(15, 36) | 205 f(15, 36) |
| 206 | 206 |
| 207 // The Serializer/Deserializer class is a common superclass for Serializer and | 207 // The Serializer/Deserializer class is a common superclass for Serializer and |
| 208 // Deserializer which is used to store common constants and methods used by | 208 // Deserializer which is used to store common constants and methods used by |
| 209 // both. | 209 // both. |
| 210 class SerializerDeserializer: public ObjectVisitor { | 210 class SerializerDeserializer: public ObjectVisitor { |
| 211 public: | 211 public: |
| 212 static void Iterate(ObjectVisitor* visitor); | 212 static void Iterate(ObjectVisitor* visitor); |
| 213 static void SetSnapshotCacheSize(int size); | |
| 214 | 213 |
| 215 protected: | 214 protected: |
| 216 // Where the pointed-to object can be found: | 215 // Where the pointed-to object can be found: |
| 217 enum Where { | 216 enum Where { |
| 218 kNewObject = 0, // Object is next in snapshot. | 217 kNewObject = 0, // Object is next in snapshot. |
| 219 // 1-8 One per space. | 218 // 1-8 One per space. |
| 220 kRootArray = 0x9, // Object is found in root array. | 219 kRootArray = 0x9, // Object is found in root array. |
| 221 kPartialSnapshotCache = 0xa, // Object is in the cache. | 220 kPartialSnapshotCache = 0xa, // Object is in the cache. |
| 222 kExternalReference = 0xb, // Pointer to an external reference. | 221 kExternalReference = 0xb, // Pointer to an external reference. |
| 223 kSkip = 0xc, // Skip a pointer sized cell. | 222 kSkip = 0xc, // Skip a pointer sized cell. |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 private: | 642 private: |
| 644 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 643 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 645 return false; | 644 return false; |
| 646 } | 645 } |
| 647 }; | 646 }; |
| 648 | 647 |
| 649 | 648 |
| 650 } } // namespace v8::internal | 649 } } // namespace v8::internal |
| 651 | 650 |
| 652 #endif // V8_SERIALIZE_H_ | 651 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |