Commit 56b32678 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[heap] Remove unused IntrusiveMarking class.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/1278113004

Cr-Commit-Position: refs/heads/master@{#30068}
parent a039ff29
......@@ -113,7 +113,6 @@ Heap::Heap()
inline_allocation_disabled_(false),
store_buffer_rebuilder_(store_buffer()),
hidden_string_(NULL),
gc_safe_size_of_old_object_(NULL),
total_regexp_code_generated_(0),
tracer_(this),
high_survival_rate_period_length_(0),
......@@ -247,14 +246,6 @@ bool Heap::HasBeenSetUp() {
}
int Heap::GcSafeSizeOfOldObject(HeapObject* object) {
if (IntrusiveMarking::IsMarked(object)) {
return IntrusiveMarking::SizeOfMarkedObject(object);
}
return object->SizeFromMap(object->map());
}
GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
const char** reason) {
// Is global GC requested?
......@@ -5759,8 +5750,6 @@ bool Heap::SetUp() {
base::CallOnce(&initialize_gc_once, &InitializeGCOnce);
MarkMapPointersAsEncoded(false);
// Set up memory allocator.
if (!isolate_->memory_allocator()->SetUp(MaxReserved(), MaxExecutableSize()))
return false;
......
......@@ -1007,13 +1007,6 @@ class Heap {
roots_[kCodeStubsRootIndex] = value;
}
// Support for computing object sizes for old objects during GCs. Returns
// a function that is guaranteed to be safe for computing object sizes in
// the current GC phase.
HeapObjectCallback GcSafeSizeOfOldObjectFunction() {
return gc_safe_size_of_old_object_;
}
// Sets the non_monomorphic_cache_ (only used when expanding the dictionary).
void public_set_non_monomorphic_cache(UnseededNumberDictionary* value) {
roots_[kNonMonomorphicCacheRootIndex] = value;
......@@ -1901,16 +1894,6 @@ class Heap {
};
List<GCEpilogueCallbackPair> gc_epilogue_callbacks_;
// Support for computing object sizes during GC.
HeapObjectCallback gc_safe_size_of_old_object_;
static int GcSafeSizeOfOldObject(HeapObject* object);
// Update the GC state. Called from the mark-compact collector.
void MarkMapPointersAsEncoded(bool encoded) {
DCHECK(!encoded);
gc_safe_size_of_old_object_ = &GcSafeSizeOfOldObject;
}
// Code that should be run before and after each GC. Includes some
// reporting/verification activities when compiled with DEBUG set.
void GarbageCollectionPrologue();
......@@ -2749,46 +2732,6 @@ class WeakObjectRetainer {
};
// Intrusive object marking uses least significant bit of
// heap object's map word to mark objects.
// Normally all map words have least significant bit set
// because they contain tagged map pointer.
// If the bit is not set object is marked.
// All objects should be unmarked before resuming
// JavaScript execution.
class IntrusiveMarking {
public:
static bool IsMarked(HeapObject* object) {
return (object->map_word().ToRawValue() & kNotMarkedBit) == 0;
}
static void ClearMark(HeapObject* object) {
uintptr_t map_word = object->map_word().ToRawValue();
object->set_map_word(MapWord::FromRawValue(map_word | kNotMarkedBit));
DCHECK(!IsMarked(object));
}
static void SetMark(HeapObject* object) {
uintptr_t map_word = object->map_word().ToRawValue();
object->set_map_word(MapWord::FromRawValue(map_word & ~kNotMarkedBit));
DCHECK(IsMarked(object));
}
static Map* MapOfMarkedObject(HeapObject* object) {
uintptr_t map_word = object->map_word().ToRawValue();
return MapWord::FromRawValue(map_word | kNotMarkedBit).ToMap();
}
static int SizeOfMarkedObject(HeapObject* object) {
return object->SizeFromMap(MapOfMarkedObject(object));
}
private:
static const uintptr_t kNotMarkedBit = 0x1;
STATIC_ASSERT((kHeapObjectTag & kNotMarkedBit) != 0); // NOLINT
};
#ifdef DEBUG
// Helper class for tracing paths to a search target Object from all roots.
// The TracePathFrom() method can be used to trace paths from a specific
......
......@@ -3140,14 +3140,14 @@ void Page::Print() {
PrintF("Page@%p in %s\n", this->address(),
AllocationSpaceName(this->owner()->identity()));
printf(" --------------------------------------\n");
HeapObjectIterator objects(this, heap()->GcSafeSizeOfOldObjectFunction());
HeapObjectIterator objects(this, nullptr);
unsigned mark_size = 0;
for (HeapObject* object = objects.Next(); object != NULL;
object = objects.Next()) {
bool is_marked = Marking::IsBlackOrGrey(Marking::MarkBitFrom(object));
PrintF(" %c ", (is_marked ? '!' : ' ')); // Indent a little.
if (is_marked) {
mark_size += heap()->GcSafeSizeOfOldObjectFunction()(object);
mark_size += object->Size();
}
object->ShortPrint();
PrintF("\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment