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

Unified Diff: src/mark-compact.cc

Issue 67125: Verify the symbol table contents before and after all... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 1698)
+++ src/mark-compact.cc (working copy)
@@ -96,24 +96,6 @@
}
-#ifdef DEBUG
-// Helper class for verifying the symbol table.
-class SymbolTableVerifier : public ObjectVisitor {
- public:
- SymbolTableVerifier() { }
- void VisitPointers(Object** start, Object** end) {
- // Visit all HeapObject pointers in [start, end).
- for (Object** p = start; p < end; p++) {
- if ((*p)->IsHeapObject()) {
- // Check that the symbol is actually a symbol.
- ASSERT((*p)->IsNull() || (*p)->IsUndefined() || (*p)->IsSymbol());
- }
- }
- }
-};
-#endif // DEBUG
-
-
void MarkCompactCollector::Prepare(GCTracer* tracer) {
// Rather than passing the tracer around we stash it in a static member
// variable.
@@ -166,10 +148,6 @@
}
#ifdef DEBUG
- SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table());
- SymbolTableVerifier v;
- symbol_table->IterateElements(&v);
-
live_bytes_ = 0;
live_young_objects_ = 0;
live_old_pointer_objects_ = 0;
@@ -183,10 +161,6 @@
void MarkCompactCollector::Finish() {
#ifdef DEBUG
- SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table());
- SymbolTableVerifier v;
- symbol_table->IterateElements(&v);
-
ASSERT(state_ == SWEEP_SPACES || state_ == REBUILD_RSETS);
state_ = IDLE;
#endif
@@ -246,14 +220,8 @@
MapWord map_word = object->map_word();
map_word.ClearMark();
InstanceType type = map_word.ToMap()->instance_type();
- if (type >= FIRST_NONSTRING_TYPE || (type & kIsSymbolMask) != 0) {
- return object;
- }
+ if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object;
- StringRepresentationTag rep =
- static_cast<StringRepresentationTag>(type & kStringRepresentationMask);
- if (rep != kConsStringTag) return object;
-
Object* second = reinterpret_cast<ConsString*>(object)->unchecked_second();
if (reinterpret_cast<String*>(second) != Heap::empty_string()) return object;
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698