| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 331 } |
| 332 | 332 |
| 333 void set_owner(Space* space) { | 333 void set_owner(Space* space) { |
| 334 ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0); | 334 ASSERT((reinterpret_cast<intptr_t>(space) & kFailureTagMask) == 0); |
| 335 owner_ = reinterpret_cast<Address>(space) + kFailureTag; | 335 owner_ = reinterpret_cast<Address>(space) + kFailureTag; |
| 336 ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == | 336 ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) == |
| 337 kFailureTag); | 337 kFailureTag); |
| 338 } | 338 } |
| 339 | 339 |
| 340 bool scan_on_scavenge() { return scan_on_scavenge_; } | 340 bool scan_on_scavenge() { return scan_on_scavenge_; } |
| 341 void set_scan_on_scavenge(bool scan) { scan_on_scavenge_ = scan; } | 341 void initialize_scan_on_scavenge(bool scan) { scan_on_scavenge_ = scan; } |
| 342 inline void set_scan_on_scavenge(bool scan); |
| 342 | 343 |
| 343 int store_buffer_counter() { return store_buffer_counter_; } | 344 int store_buffer_counter() { return store_buffer_counter_; } |
| 344 void set_store_buffer_counter(int counter) { | 345 void set_store_buffer_counter(int counter) { |
| 345 store_buffer_counter_ = counter; | 346 store_buffer_counter_ = counter; |
| 346 } | 347 } |
| 347 | 348 |
| 348 Address body() { return address() + kObjectStartOffset; } | 349 Address body() { return address() + kObjectStartOffset; } |
| 349 | 350 |
| 350 int body_size() { return size() - kObjectStartOffset; } | 351 int body_size() { return size() - kObjectStartOffset; } |
| 351 | 352 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 return static_cast<uint32_t>(offset) >> kPointerSizeLog2; | 436 return static_cast<uint32_t>(offset) >> kPointerSizeLog2; |
| 436 } | 437 } |
| 437 | 438 |
| 438 inline Address MarkbitIndexToAddress(uint32_t index) { | 439 inline Address MarkbitIndexToAddress(uint32_t index) { |
| 439 return this->address() + (index << kPointerSizeLog2); | 440 return this->address() + (index << kPointerSizeLog2); |
| 440 } | 441 } |
| 441 | 442 |
| 442 void InsertAfter(MemoryChunk* other); | 443 void InsertAfter(MemoryChunk* other); |
| 443 void Unlink(); | 444 void Unlink(); |
| 444 | 445 |
| 446 static const int kFlagsOffset = kPointerSize * 3; |
| 447 static const int kScanOnScavengeOffset = kPointerSize * 5; |
| 448 |
| 445 protected: | 449 protected: |
| 446 MemoryChunk* next_chunk_; | 450 MemoryChunk* next_chunk_; |
| 447 MemoryChunk* prev_chunk_; | 451 MemoryChunk* prev_chunk_; |
| 448 size_t size_; | 452 size_t size_; |
| 449 intptr_t flags_; | 453 intptr_t flags_; |
| 450 // The identity of the owning space. This is tagged as a failure pointer, but | 454 // The identity of the owning space. This is tagged as a failure pointer, but |
| 451 // no failure can be in an object, so this can be distinguished from any entry | 455 // no failure can be in an object, so this can be distinguished from any entry |
| 452 // in a fixed array. | 456 // in a fixed array. |
| 453 Address owner_; | 457 Address owner_; |
| 454 // This flag indicates that the page is not being tracked by the store buffer. | 458 // This flag indicates that the page is not being tracked by the store buffer. |
| (...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2116 State state_; | 2120 State state_; |
| 2117 PageIterator old_pointer_iterator_; | 2121 PageIterator old_pointer_iterator_; |
| 2118 PageIterator map_iterator_; | 2122 PageIterator map_iterator_; |
| 2119 LargeObjectIterator lo_iterator_; | 2123 LargeObjectIterator lo_iterator_; |
| 2120 }; | 2124 }; |
| 2121 | 2125 |
| 2122 | 2126 |
| 2123 } } // namespace v8::internal | 2127 } } // namespace v8::internal |
| 2124 | 2128 |
| 2125 #endif // V8_SPACES_H_ | 2129 #endif // V8_SPACES_H_ |
| OLD | NEW |