Index: src/mark-compact.cc |
=================================================================== |
--- src/mark-compact.cc (revision 2356) |
+++ src/mark-compact.cc (working copy) |
@@ -224,7 +224,10 @@ |
if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object; |
Object* second = reinterpret_cast<ConsString*>(object)->unchecked_second(); |
- if (reinterpret_cast<String*>(second) != Heap::empty_string()) return object; |
+ if (reinterpret_cast<String*>(second) != |
Kasper Lund
2009/07/08 12:42:37
Why is the reinterpret_cast necessary here? It's r
Erik Corry
2009/07/08 14:19:50
It wasn't necessary.
|
+ Heap::raw_unchecked_empty_string()) { |
+ return object; |
+ } |
// Since we don't have the object's start, it is impossible to update the |
// remembered set. Therefore, we only replace the string with its left |
@@ -421,7 +424,7 @@ |
} |
} |
// Set the entry to null_value (as deleted). |
- *p = Heap::null_value(); |
+ *p = Heap::raw_unchecked_null_value(); |
pointers_removed_++; |
} |
} |
@@ -475,7 +478,7 @@ |
DescriptorArray* descriptors) { |
if (descriptors->IsMarked()) return; |
// Empty descriptor array is marked as a root before any maps are marked. |
- ASSERT(descriptors != Heap::empty_descriptor_array()); |
+ ASSERT(descriptors != Heap::raw_unchecked_empty_descriptor_array()); |
SetMark(descriptors); |
FixedArray* contents = reinterpret_cast<FixedArray*>( |
@@ -590,7 +593,8 @@ |
// and if it is a sliced string or a cons string backed by an |
// external string (even indirectly), then the external string does |
// not receive a weak reference callback. |
- SymbolTable* symbol_table = SymbolTable::cast(Heap::symbol_table()); |
+ SymbolTable* symbol_table = |
+ reinterpret_cast<SymbolTable*>(Heap::raw_unchecked_symbol_table()); |
Kasper Lund
2009/07/08 12:42:37
Doesn't raw_unchecked_symbol_table return somethin
|
// Mark the symbol table itself. |
SetMark(symbol_table); |
// Explicitly mark the prefix. |
@@ -783,7 +787,7 @@ |
// symbol table. Cannot use SymbolTable::cast here because the symbol |
// table is marked. |
SymbolTable* symbol_table = |
- reinterpret_cast<SymbolTable*>(Heap::symbol_table()); |
+ reinterpret_cast<SymbolTable*>(Heap::raw_unchecked_symbol_table()); |
Kasper Lund
2009/07/08 12:42:37
Do you need reinterpret_cast here?
|
SymbolTableCleaner v; |
symbol_table->IterateElements(&v); |
symbol_table->ElementsRemoved(v.PointersRemoved()); |
@@ -1142,11 +1146,11 @@ |
// since their existing map might not be live after the collection. |
int size = object->Size(); |
if (size >= ByteArray::kHeaderSize) { |
- object->set_map(Heap::byte_array_map()); |
+ object->set_map(Heap::raw_unchecked_byte_array_map()); |
ByteArray::cast(object)->set_length(ByteArray::LengthFor(size)); |
} else { |
ASSERT(size == kPointerSize); |
- object->set_map(Heap::one_word_filler_map()); |
+ object->set_map(Heap::raw_unchecked_one_word_filler_map()); |
} |
ASSERT(object->Size() == size); |
} |