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/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 ProcessMarkingDeque(); | 1937 ProcessMarkingDeque(); |
1938 } | 1938 } |
1939 | 1939 |
1940 | 1940 |
1941 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) { | 1941 void MarkCompactCollector::MarkAllocationSite(AllocationSite* site) { |
1942 MarkBit mark_bit = Marking::MarkBitFrom(site); | 1942 MarkBit mark_bit = Marking::MarkBitFrom(site); |
1943 SetMark(site, mark_bit); | 1943 SetMark(site, mark_bit); |
1944 } | 1944 } |
1945 | 1945 |
1946 | 1946 |
1947 bool MarkCompactCollector::IsMarkingDequeEmpty() { | |
1948 return marking_deque_.IsEmpty(); | |
1949 } | |
1950 | |
1951 | |
1952 void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) { | 1947 void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) { |
1953 // Mark the heap roots including global variables, stack variables, | 1948 // Mark the heap roots including global variables, stack variables, |
1954 // etc., and all objects reachable from them. | 1949 // etc., and all objects reachable from them. |
1955 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); | 1950 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); |
1956 | 1951 |
1957 // Handle the string table specially. | 1952 // Handle the string table specially. |
1958 MarkStringTable(visitor); | 1953 MarkStringTable(visitor); |
1959 | 1954 |
1960 MarkWeakObjectToCodeTable(); | 1955 MarkWeakObjectToCodeTable(); |
1961 | 1956 |
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4411 SlotsBuffer* buffer = *buffer_address; | 4406 SlotsBuffer* buffer = *buffer_address; |
4412 while (buffer != NULL) { | 4407 while (buffer != NULL) { |
4413 SlotsBuffer* next_buffer = buffer->next(); | 4408 SlotsBuffer* next_buffer = buffer->next(); |
4414 DeallocateBuffer(buffer); | 4409 DeallocateBuffer(buffer); |
4415 buffer = next_buffer; | 4410 buffer = next_buffer; |
4416 } | 4411 } |
4417 *buffer_address = NULL; | 4412 *buffer_address = NULL; |
4418 } | 4413 } |
4419 } | 4414 } |
4420 } // namespace v8::internal | 4415 } // namespace v8::internal |
OLD | NEW |