Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/mark-compact.cc

Issue 548136: Merge r3643 and r3659 from bleeding_edge to trunk to... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic.h ('k') | src/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 void UpdateMapPointersInRoots() { 1284 void UpdateMapPointersInRoots() {
1285 Heap::IterateRoots(&map_updating_visitor_, VISIT_ONLY_STRONG); 1285 Heap::IterateRoots(&map_updating_visitor_, VISIT_ONLY_STRONG);
1286 GlobalHandles::IterateWeakRoots(&map_updating_visitor_); 1286 GlobalHandles::IterateWeakRoots(&map_updating_visitor_);
1287 } 1287 }
1288 1288
1289 void FinishMapSpace() { 1289 void FinishMapSpace() {
1290 // Iterate through to space and finish move. 1290 // Iterate through to space and finish move.
1291 MapIterator it; 1291 MapIterator it;
1292 HeapObject* o = it.next(); 1292 HeapObject* o = it.next();
1293 for (; o != first_map_to_evacuate_; o = it.next()) { 1293 for (; o != first_map_to_evacuate_; o = it.next()) {
1294 it.has_next(); // Must be called for side-effects, see bug 586.
1295 ASSERT(it.has_next());
1294 Map* map = reinterpret_cast<Map*>(o); 1296 Map* map = reinterpret_cast<Map*>(o);
1295 ASSERT(!map->IsMarked()); 1297 ASSERT(!map->IsMarked());
1296 ASSERT(!map->IsOverflowed()); 1298 ASSERT(!map->IsOverflowed());
1297 ASSERT(map->IsMap()); 1299 ASSERT(map->IsMap());
1298 Heap::UpdateRSet(map); 1300 Heap::UpdateRSet(map);
1299 } 1301 }
1300 } 1302 }
1301 1303
1302 void UpdateMapPointersInPagedSpace(PagedSpace* space) { 1304 void UpdateMapPointersInPagedSpace(PagedSpace* space) {
1303 ASSERT(space != Heap::map_space()); 1305 ASSERT(space != Heap::map_space());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 if (!map_word.IsOverflowed()) return; 1357 if (!map_word.IsOverflowed()) return;
1356 1358
1357 *p = GetForwardedMap(map_word); 1359 *p = GetForwardedMap(map_word);
1358 } 1360 }
1359 }; 1361 };
1360 1362
1361 static MapUpdatingVisitor map_updating_visitor_; 1363 static MapUpdatingVisitor map_updating_visitor_;
1362 1364
1363 static Map* NextMap(MapIterator* it, HeapObject* last, bool live) { 1365 static Map* NextMap(MapIterator* it, HeapObject* last, bool live) {
1364 while (true) { 1366 while (true) {
1367 it->has_next(); // Must be called for side-effects, see bug 586.
1365 ASSERT(it->has_next()); 1368 ASSERT(it->has_next());
1366 HeapObject* next = it->next(); 1369 HeapObject* next = it->next();
1367 if (next == last) 1370 if (next == last)
1368 return NULL; 1371 return NULL;
1369 ASSERT(!next->IsOverflowed()); 1372 ASSERT(!next->IsOverflowed());
1370 ASSERT(!next->IsMarked()); 1373 ASSERT(!next->IsMarked());
1371 ASSERT(next->IsMap() || FreeListNode::IsFreeListNode(next)); 1374 ASSERT(next->IsMap() || FreeListNode::IsFreeListNode(next));
1372 if (next->IsMap() == live) 1375 if (next->IsMap() == live)
1373 return reinterpret_cast<Map*>(next); 1376 return reinterpret_cast<Map*>(next);
1374 } 1377 }
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 1998
1996 void MarkCompactCollector::RebuildRSets() { 1999 void MarkCompactCollector::RebuildRSets() {
1997 #ifdef DEBUG 2000 #ifdef DEBUG
1998 ASSERT(state_ == RELOCATE_OBJECTS); 2001 ASSERT(state_ == RELOCATE_OBJECTS);
1999 state_ = REBUILD_RSETS; 2002 state_ = REBUILD_RSETS;
2000 #endif 2003 #endif
2001 Heap::RebuildRSets(); 2004 Heap::RebuildRSets();
2002 } 2005 }
2003 2006
2004 } } // namespace v8::internal 2007 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698