| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 mc_first_forwarded = allocation_watermark; | 107 mc_first_forwarded = allocation_watermark; |
| 108 } | 108 } |
| 109 | 109 |
| 110 | 110 |
| 111 Address Page::CachedAllocationWatermark() { | 111 Address Page::CachedAllocationWatermark() { |
| 112 return mc_first_forwarded; | 112 return mc_first_forwarded; |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 uint32_t Page::GetRegionMarks() { | 116 uint32_t Page::GetRegionMarks() { |
| 117 return dirty_regions_; | 117 return FLAG_new_gc ? kAllRegionsDirtyMarks : dirty_regions_; |
| 118 } | 118 } |
| 119 | 119 |
| 120 | 120 |
| 121 void Page::SetRegionMarks(uint32_t marks) { | 121 void Page::SetRegionMarks(uint32_t marks) { |
| 122 dirty_regions_ = marks; | 122 if (!FLAG_new_gc) dirty_regions_ = marks; |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 int Page::GetRegionNumberForAddress(Address addr) { | 126 int Page::GetRegionNumberForAddress(Address addr) { |
| 127 // Each page is divided into 256 byte regions. Each region has a corresponding | 127 // Each page is divided into 256 byte regions. Each region has a corresponding |
| 128 // dirty mark bit in the page header. Region can contain intergenerational | 128 // dirty mark bit in the page header. Region can contain intergenerational |
| 129 // references iff its dirty mark is set. | 129 // references iff its dirty mark is set. |
| 130 // A normal 8K page contains exactly 32 regions so all region marks fit | 130 // A normal 8K page contains exactly 32 regions so all region marks fit |
| 131 // into 32-bit integer field. To calculate a region number we just divide | 131 // into 32-bit integer field. To calculate a region number we just divide |
| 132 // offset inside page by region size. | 132 // offset inside page by region size. |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 515 |
| 516 bool FreeListNode::IsFreeListNode(HeapObject* object) { | 516 bool FreeListNode::IsFreeListNode(HeapObject* object) { |
| 517 return object->map() == Heap::raw_unchecked_byte_array_map() | 517 return object->map() == Heap::raw_unchecked_byte_array_map() |
| 518 || object->map() == Heap::raw_unchecked_one_pointer_filler_map() | 518 || object->map() == Heap::raw_unchecked_one_pointer_filler_map() |
| 519 || object->map() == Heap::raw_unchecked_two_pointer_filler_map(); | 519 || object->map() == Heap::raw_unchecked_two_pointer_filler_map(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 } } // namespace v8::internal | 522 } } // namespace v8::internal |
| 523 | 523 |
| 524 #endif // V8_SPACES_INL_H_ | 524 #endif // V8_SPACES_INL_H_ |
| OLD | NEW |