OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HEAP_SPACES_H_ | 5 #ifndef V8_HEAP_SPACES_H_ |
6 #define V8_HEAP_SPACES_H_ | 6 #define V8_HEAP_SPACES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 } | 515 } |
516 } | 516 } |
517 | 517 |
518 bool IsLeftOfProgressBar(Object** slot) { | 518 bool IsLeftOfProgressBar(Object** slot) { |
519 Address slot_address = reinterpret_cast<Address>(slot); | 519 Address slot_address = reinterpret_cast<Address>(slot); |
520 DCHECK(slot_address > this->address()); | 520 DCHECK(slot_address > this->address()); |
521 return (slot_address - (this->address() + kObjectStartOffset)) < | 521 return (slot_address - (this->address() + kObjectStartOffset)) < |
522 progress_bar(); | 522 progress_bar(); |
523 } | 523 } |
524 | 524 |
525 static void IncrementLiveBytesFromGC(Address address, int by) { | 525 static void IncrementLiveBytesFromGC(HeapObject* object, int by) { |
526 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); | 526 MemoryChunk::FromAddress(object->address())->IncrementLiveBytes(by); |
527 } | 527 } |
528 | 528 |
529 static void IncrementLiveBytesFromMutator(Address address, int by); | 529 static void IncrementLiveBytesFromMutator(HeapObject* object, int by); |
530 | 530 |
531 static const intptr_t kAlignment = | 531 static const intptr_t kAlignment = |
532 (static_cast<uintptr_t>(1) << kPageSizeBits); | 532 (static_cast<uintptr_t>(1) << kPageSizeBits); |
533 | 533 |
534 static const intptr_t kAlignmentMask = kAlignment - 1; | 534 static const intptr_t kAlignmentMask = kAlignment - 1; |
535 | 535 |
536 static const intptr_t kSizeOffset = 0; | 536 static const intptr_t kSizeOffset = 0; |
537 | 537 |
538 static const intptr_t kLiveBytesOffset = | 538 static const intptr_t kLiveBytesOffset = |
539 kSizeOffset + kPointerSize + kPointerSize + kPointerSize + kPointerSize + | 539 kSizeOffset + kPointerSize + kPointerSize + kPointerSize + kPointerSize + |
(...skipping 2359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 count = 0; | 2899 count = 0; |
2900 } | 2900 } |
2901 // Must be small, since an iteration is used for lookup. | 2901 // Must be small, since an iteration is used for lookup. |
2902 static const int kMaxComments = 64; | 2902 static const int kMaxComments = 64; |
2903 }; | 2903 }; |
2904 #endif | 2904 #endif |
2905 } | 2905 } |
2906 } // namespace v8::internal | 2906 } // namespace v8::internal |
2907 | 2907 |
2908 #endif // V8_HEAP_SPACES_H_ | 2908 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |