| 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 3956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3967 ASSERT((first_set_bit & cell) == first_set_bit); | 3967 ASSERT((first_set_bit & cell) == first_set_bit); |
| 3968 int live_objects = MarkWordToObjectStarts(first_set_bit, offsets); | 3968 int live_objects = MarkWordToObjectStarts(first_set_bit, offsets); |
| 3969 ASSERT(live_objects == 1); | 3969 ASSERT(live_objects == 1); |
| 3970 USE(live_objects); | 3970 USE(live_objects); |
| 3971 return block_address + offsets[0] * kPointerSize; | 3971 return block_address + offsets[0] * kPointerSize; |
| 3972 } | 3972 } |
| 3973 | 3973 |
| 3974 | 3974 |
| 3975 // Force instantiation of templatized SweepConservatively method for | 3975 // Force instantiation of templatized SweepConservatively method for |
| 3976 // SWEEP_ON_MAIN_THREAD mode. | 3976 // SWEEP_ON_MAIN_THREAD mode. |
| 3977 template intptr_t MarkCompactCollector:: | 3977 template int MarkCompactCollector:: |
| 3978 SweepConservatively<MarkCompactCollector::SWEEP_ON_MAIN_THREAD>( | 3978 SweepConservatively<MarkCompactCollector::SWEEP_ON_MAIN_THREAD>( |
| 3979 PagedSpace*, FreeList*, Page*); | 3979 PagedSpace*, FreeList*, Page*); |
| 3980 | 3980 |
| 3981 | 3981 |
| 3982 // Force instantiation of templatized SweepConservatively method for | 3982 // Force instantiation of templatized SweepConservatively method for |
| 3983 // SWEEP_IN_PARALLEL mode. | 3983 // SWEEP_IN_PARALLEL mode. |
| 3984 template intptr_t MarkCompactCollector:: | 3984 template int MarkCompactCollector:: |
| 3985 SweepConservatively<MarkCompactCollector::SWEEP_IN_PARALLEL>( | 3985 SweepConservatively<MarkCompactCollector::SWEEP_IN_PARALLEL>( |
| 3986 PagedSpace*, FreeList*, Page*); | 3986 PagedSpace*, FreeList*, Page*); |
| 3987 | 3987 |
| 3988 | 3988 |
| 3989 // Sweeps a space conservatively. After this has been done the larger free | 3989 // Sweeps a space conservatively. After this has been done the larger free |
| 3990 // spaces have been put on the free list and the smaller ones have been | 3990 // spaces have been put on the free list and the smaller ones have been |
| 3991 // ignored and left untouched. A free space is always either ignored or put | 3991 // ignored and left untouched. A free space is always either ignored or put |
| 3992 // on the free list, never split up into two parts. This is important | 3992 // on the free list, never split up into two parts. This is important |
| 3993 // because it means that any FreeSpace maps left actually describe a region of | 3993 // because it means that any FreeSpace maps left actually describe a region of |
| 3994 // memory that can be ignored when scanning. Dead objects other than free | 3994 // memory that can be ignored when scanning. Dead objects other than free |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4580 while (buffer != NULL) { | 4580 while (buffer != NULL) { |
| 4581 SlotsBuffer* next_buffer = buffer->next(); | 4581 SlotsBuffer* next_buffer = buffer->next(); |
| 4582 DeallocateBuffer(buffer); | 4582 DeallocateBuffer(buffer); |
| 4583 buffer = next_buffer; | 4583 buffer = next_buffer; |
| 4584 } | 4584 } |
| 4585 *buffer_address = NULL; | 4585 *buffer_address = NULL; |
| 4586 } | 4586 } |
| 4587 | 4587 |
| 4588 | 4588 |
| 4589 } } // namespace v8::internal | 4589 } } // namespace v8::internal |
| OLD | NEW |