Remove obsolete free-space checks from MarkCompactCollector.
R=danno@chromium.org Review URL: https://codereview.chromium.org/17840004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
f0c7bc37a9
commit
df181f2c11
@ -2391,7 +2391,6 @@ void MarkCompactCollector::ReattachInitialMaps() {
|
|||||||
for (HeapObject* obj = map_iterator.Next();
|
for (HeapObject* obj = map_iterator.Next();
|
||||||
obj != NULL;
|
obj != NULL;
|
||||||
obj = map_iterator.Next()) {
|
obj = map_iterator.Next()) {
|
||||||
if (obj->IsFreeSpace()) continue;
|
|
||||||
Map* map = Map::cast(obj);
|
Map* map = Map::cast(obj);
|
||||||
|
|
||||||
STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
|
STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
|
||||||
@ -2405,21 +2404,19 @@ void MarkCompactCollector::ReattachInitialMaps() {
|
|||||||
|
|
||||||
|
|
||||||
void MarkCompactCollector::ClearNonLiveReferences() {
|
void MarkCompactCollector::ClearNonLiveReferences() {
|
||||||
HeapObjectIterator map_iterator(heap()->map_space());
|
|
||||||
// Iterate over the map space, setting map transitions that go from
|
// Iterate over the map space, setting map transitions that go from
|
||||||
// a marked map to an unmarked map to null transitions. This action
|
// a marked map to an unmarked map to null transitions. This action
|
||||||
// is carried out only on maps of JSObjects and related subtypes.
|
// is carried out only on maps of JSObjects and related subtypes.
|
||||||
|
HeapObjectIterator map_iterator(heap()->map_space());
|
||||||
for (HeapObject* obj = map_iterator.Next();
|
for (HeapObject* obj = map_iterator.Next();
|
||||||
obj != NULL; obj = map_iterator.Next()) {
|
obj != NULL;
|
||||||
Map* map = reinterpret_cast<Map*>(obj);
|
obj = map_iterator.Next()) {
|
||||||
MarkBit map_mark = Marking::MarkBitFrom(map);
|
Map* map = Map::cast(obj);
|
||||||
if (map->IsFreeSpace()) continue;
|
|
||||||
|
|
||||||
ASSERT(map->IsMap());
|
|
||||||
if (!map->CanTransition()) continue;
|
if (!map->CanTransition()) continue;
|
||||||
|
|
||||||
if (map_mark.Get() &&
|
MarkBit map_mark = Marking::MarkBitFrom(map);
|
||||||
map->attached_to_shared_function_info()) {
|
if (map_mark.Get() && map->attached_to_shared_function_info()) {
|
||||||
// This map is used for inobject slack tracking and has been detached
|
// This map is used for inobject slack tracking and has been detached
|
||||||
// from SharedFunctionInfo during the mark phase.
|
// from SharedFunctionInfo during the mark phase.
|
||||||
// Since it survived the GC, reattach it now.
|
// Since it survived the GC, reattach it now.
|
||||||
|
Loading…
Reference in New Issue
Block a user