| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // A bitmask for getting the space out of an instruction. | 242 // A bitmask for getting the space out of an instruction. |
| 243 static const int kSpaceMask = 15; | 243 static const int kSpaceMask = 15; |
| 244 | 244 |
| 245 static inline bool SpaceIsLarge(int space) { return space >= kLargeData; } | 245 static inline bool SpaceIsLarge(int space) { return space >= kLargeData; } |
| 246 static inline bool SpaceIsPaged(int space) { | 246 static inline bool SpaceIsPaged(int space) { |
| 247 return space >= FIRST_PAGED_SPACE && space <= LAST_PAGED_SPACE; | 247 return space >= FIRST_PAGED_SPACE && space <= LAST_PAGED_SPACE; |
| 248 } | 248 } |
| 249 | 249 |
| 250 static int partial_snapshot_cache_length_; | 250 static int partial_snapshot_cache_length_; |
| 251 static const int kPartialSnapshotCacheCapacity = 1300; | 251 static const int kPartialSnapshotCacheCapacity = 1350; |
| 252 static Object* partial_snapshot_cache_[]; | 252 static Object* partial_snapshot_cache_[]; |
| 253 }; | 253 }; |
| 254 | 254 |
| 255 | 255 |
| 256 int SnapshotByteSource::GetInt() { | 256 int SnapshotByteSource::GetInt() { |
| 257 // A little unwind to catch the really small ints. | 257 // A little unwind to catch the really small ints. |
| 258 int snapshot_byte = Get(); | 258 int snapshot_byte = Get(); |
| 259 if ((snapshot_byte & 0x80) == 0) { | 259 if ((snapshot_byte & 0x80) == 0) { |
| 260 return snapshot_byte; | 260 return snapshot_byte; |
| 261 } | 261 } |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } | 572 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } |
| 573 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 573 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 574 return false; | 574 return false; |
| 575 } | 575 } |
| 576 }; | 576 }; |
| 577 | 577 |
| 578 | 578 |
| 579 } } // namespace v8::internal | 579 } } // namespace v8::internal |
| 580 | 580 |
| 581 #endif // V8_SERIALIZE_H_ | 581 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |