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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compilation-cache.h" | 9 #include "src/compilation-cache.h" |
10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2008 | 2008 |
2009 offset++; | 2009 offset++; |
2010 current_cell >>= 1; | 2010 current_cell >>= 1; |
2011 | 2011 |
2012 // TODO(hpayer): Refactor EvacuateObject and call this function instead. | 2012 // TODO(hpayer): Refactor EvacuateObject and call this function instead. |
2013 if (heap()->ShouldBePromoted(object->address(), size) && | 2013 if (heap()->ShouldBePromoted(object->address(), size) && |
2014 TryPromoteObject(object, size)) { | 2014 TryPromoteObject(object, size)) { |
2015 continue; | 2015 continue; |
2016 } | 2016 } |
2017 | 2017 |
2018 // Promotion failed. Just migrate object to another semispace. | |
Hannes Payer (out of office)
2014/06/24 14:20:40
Removed the outdated comment.
Note, here the inva
| |
2019 AllocationResult allocation = new_space->AllocateRaw(size); | 2018 AllocationResult allocation = new_space->AllocateRaw(size); |
2020 if (allocation.IsRetry()) { | 2019 if (allocation.IsRetry()) { |
2021 if (!new_space->AddFreshPage()) { | 2020 if (!new_space->AddFreshPage()) { |
2022 // Shouldn't happen. We are sweeping linearly, and to-space | 2021 // Shouldn't happen. We are sweeping linearly, and to-space |
2023 // has the same number of pages as from-space, so there is | 2022 // has the same number of pages as from-space, so there is |
2024 // always room. | 2023 // always room. |
2025 UNREACHABLE(); | 2024 UNREACHABLE(); |
2026 } | 2025 } |
2027 allocation = new_space->AllocateRaw(size); | 2026 allocation = new_space->AllocateRaw(size); |
2028 ASSERT(!allocation.IsRetry()); | 2027 ASSERT(!allocation.IsRetry()); |
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4482 while (buffer != NULL) { | 4481 while (buffer != NULL) { |
4483 SlotsBuffer* next_buffer = buffer->next(); | 4482 SlotsBuffer* next_buffer = buffer->next(); |
4484 DeallocateBuffer(buffer); | 4483 DeallocateBuffer(buffer); |
4485 buffer = next_buffer; | 4484 buffer = next_buffer; |
4486 } | 4485 } |
4487 *buffer_address = NULL; | 4486 *buffer_address = NULL; |
4488 } | 4487 } |
4489 | 4488 |
4490 | 4489 |
4491 } } // namespace v8::internal | 4490 } } // namespace v8::internal |
OLD | NEW |