Commit 6475ae20 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

Remove left-over handling for StaticVisitors

Bug: chromium:738368
Change-Id: I4867b90c639d8d5315e0caa22285e7ddbdab44f9
Reviewed-on: https://chromium-review.googlesource.com/632682
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47580}
parent f6a83e36
......@@ -179,24 +179,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE) {
StaticVisitor::VisitInternalReference(this);
} else if (RelocInfo::IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) {
rm_ = no_reg;
value_.immediate = immediate;
......
......@@ -837,24 +837,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE) {
StaticVisitor::VisitInternalReference(this);
} else if (RelocInfo::IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
LoadStoreOp Assembler::LoadOpFor(const CPURegister& rt) {
DCHECK(rt.IsValid());
if (rt.IsRegister()) {
......
......@@ -596,8 +596,6 @@ class RelocInfo {
// reproducible.
INLINE(void WipeOut(Isolate* isolate));
template<typename StaticVisitor> inline void Visit(Heap* heap);
template <typename ObjectVisitor>
inline void Visit(Isolate* isolate, ObjectVisitor* v);
......
......@@ -177,26 +177,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address));
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE) {
StaticVisitor::VisitInternalReference(this);
} else if (IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
Immediate::Immediate(int x) {
value_.immediate = x;
rmode_ = RelocInfo::NONE32;
......
......@@ -308,25 +308,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE ||
mode == RelocInfo::INTERNAL_REFERENCE_ENCODED) {
StaticVisitor::VisitInternalReference(this);
} else if (RelocInfo::IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
// -----------------------------------------------------------------------------
// Assembler.
......
......@@ -283,25 +283,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE ||
mode == RelocInfo::INTERNAL_REFERENCE_ENCODED) {
StaticVisitor::VisitInternalReference(this);
} else if (RelocInfo::IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
// -----------------------------------------------------------------------------
// Assembler.
......
This diff is collapsed.
......@@ -26,30 +26,16 @@ namespace internal {
// template <typename ObjectVisitor>
// static inline void IterateBody(HeapObject* obj, int object_size,
// ObjectVisitor* v);
//
//
// 3) Iterate object's body using stateless object visitor.
//
// template <typename StaticVisitor>
// static inline void IterateBody(HeapObject* obj, int object_size);
//
class BodyDescriptorBase BASE_EMBEDDED {
public:
template <typename ObjectVisitor>
static inline void IteratePointers(HeapObject* obj, int start_offset,
int end_offset, ObjectVisitor* v);
template <typename StaticVisitor>
static inline void IteratePointers(Heap* heap, HeapObject* obj,
int start_offset, int end_offset);
template <typename ObjectVisitor>
static inline void IteratePointer(HeapObject* obj, int offset,
ObjectVisitor* v);
template <typename StaticVisitor>
static inline void IteratePointer(Heap* heap, HeapObject* obj, int offset);
protected:
// Returns true for all header and embedder fields.
static inline bool IsValidSlotImpl(HeapObject* obj, int offset);
......@@ -58,11 +44,6 @@ class BodyDescriptorBase BASE_EMBEDDED {
template <typename ObjectVisitor>
static inline void IterateBodyImpl(HeapObject* obj, int start_offset,
int end_offset, ObjectVisitor* v);
// Treats all header and embedder fields in the range as tagged.
template <typename StaticVisitor>
static inline void IterateBodyImpl(Heap* heap, HeapObject* obj,
int start_offset, int end_offset);
};
......@@ -91,17 +72,6 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
IterateBody(obj, v);
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj) {
Heap* heap = obj->GetHeap();
IteratePointers<StaticVisitor>(heap, obj, start_offset, end_offset);
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
IterateBody<StaticVisitor>(obj);
}
static inline int SizeOf(Map* map, HeapObject* object) { return kSize; }
};
......@@ -124,12 +94,6 @@ class FlexibleBodyDescriptor final : public BodyDescriptorBase {
IteratePointers(obj, start_offset, object_size, v);
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
Heap* heap = obj->GetHeap();
IteratePointers<StaticVisitor>(heap, obj, start_offset, object_size);
}
static inline int SizeOf(Map* map, HeapObject* object);
};
......
......@@ -254,24 +254,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template <typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE ||
mode == RelocInfo::INTERNAL_REFERENCE_ENCODED) {
StaticVisitor::VisitInternalReference(this);
} else if (IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
Operand::Operand(intptr_t immediate, RelocInfo::Mode rmode) {
rm_ = no_reg;
value_.immediate = immediate;
......
......@@ -1320,7 +1320,7 @@ void V8HeapExplorer::ExtractAllocationSiteReferences(int entry,
TagObject(site->dependent_code(), "(dependent code)");
SetInternalReference(site, entry, "dependent_code", site->dependent_code(),
AllocationSite::kDependentCodeOffset);
// Do not visit weak_next as it is not visited by the StaticVisitor,
// Do not visit weak_next as it is not visited by the ObjectVisitor,
// and we're not very interested in weak_next field here.
STATIC_ASSERT(AllocationSite::kWeakNextOffset >=
AllocationSite::kPointerFieldsEndOffset);
......
......@@ -232,22 +232,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template <typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE) {
StaticVisitor::VisitInternalReference(this);
} else if (IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
// Operand constructors
Operand::Operand(intptr_t immediate, RelocInfo::Mode rmode) {
rm_ = no_reg;
......
......@@ -446,25 +446,6 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
}
}
template<typename StaticVisitor>
void RelocInfo::Visit(Heap* heap) {
RelocInfo::Mode mode = rmode();
if (mode == RelocInfo::EMBEDDED_OBJECT) {
StaticVisitor::VisitEmbeddedPointer(heap, this);
Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address));
} else if (RelocInfo::IsCodeTarget(mode)) {
StaticVisitor::VisitCodeTarget(heap, this);
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
StaticVisitor::VisitExternalReference(this);
} else if (mode == RelocInfo::INTERNAL_REFERENCE) {
StaticVisitor::VisitInternalReference(this);
} else if (RelocInfo::IsRuntimeEntry(mode)) {
StaticVisitor::VisitRuntimeEntry(this);
}
}
// -----------------------------------------------------------------------------
// Implementation of Operand
......
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