OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 } | 1720 } |
1721 return allocation; | 1721 return allocation; |
1722 } | 1722 } |
1723 | 1723 |
1724 inline AllocationResult AllocateInOldSpace(int size_in_bytes, | 1724 inline AllocationResult AllocateInOldSpace(int size_in_bytes, |
1725 AllocationAlignment alignment) { | 1725 AllocationAlignment alignment) { |
1726 AllocationResult allocation = | 1726 AllocationResult allocation = |
1727 compaction_spaces_->Get(OLD_SPACE)->AllocateRaw(size_in_bytes, | 1727 compaction_spaces_->Get(OLD_SPACE)->AllocateRaw(size_in_bytes, |
1728 alignment); | 1728 alignment); |
1729 if (allocation.IsRetry()) { | 1729 if (allocation.IsRetry()) { |
1730 FatalProcessOutOfMemory( | 1730 v8::internal::Heap::FatalProcessOutOfMemory( |
1731 "MarkCompactCollector: semi-space copy, fallback in old gen\n"); | 1731 "MarkCompactCollector: semi-space copy, fallback in old gen", true); |
1732 } | 1732 } |
1733 return allocation; | 1733 return allocation; |
1734 } | 1734 } |
1735 | 1735 |
1736 inline AllocationResult AllocateInLab(int size_in_bytes, | 1736 inline AllocationResult AllocateInLab(int size_in_bytes, |
1737 AllocationAlignment alignment) { | 1737 AllocationAlignment alignment) { |
1738 AllocationResult allocation; | 1738 AllocationResult allocation; |
1739 if (!buffer_.IsValid()) { | 1739 if (!buffer_.IsValid()) { |
1740 if (!NewLocalAllocationBuffer()) { | 1740 if (!NewLocalAllocationBuffer()) { |
1741 space_to_allocate_ = OLD_SPACE; | 1741 space_to_allocate_ = OLD_SPACE; |
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3806 MarkBit mark_bit = Marking::MarkBitFrom(host); | 3806 MarkBit mark_bit = Marking::MarkBitFrom(host); |
3807 if (Marking::IsBlack(mark_bit)) { | 3807 if (Marking::IsBlack(mark_bit)) { |
3808 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); | 3808 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
3809 RecordRelocSlot(host, &rinfo, target); | 3809 RecordRelocSlot(host, &rinfo, target); |
3810 } | 3810 } |
3811 } | 3811 } |
3812 } | 3812 } |
3813 | 3813 |
3814 } // namespace internal | 3814 } // namespace internal |
3815 } // namespace v8 | 3815 } // namespace v8 |
OLD | NEW |