[heap,iwyu] Clean up scavenger and related headers
Bug: v8:7490 Change-Id: Id6e50a201732b4ca1fd1f69f8c43298e216ce95b Reviewed-on: https://chromium-review.googlesource.com/1154788 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#54785}
This commit is contained in:
parent
72ab46bd6f
commit
268117f84c
@ -202,5 +202,11 @@ void RootScavengeVisitor::ScavengePointer(Object** p) {
|
||||
reinterpret_cast<HeapObject*>(object));
|
||||
}
|
||||
|
||||
RootScavengeVisitor::RootScavengeVisitor(Scavenger* scavenger)
|
||||
: scavenger_(scavenger) {}
|
||||
|
||||
ScavengeVisitor::ScavengeVisitor(Scavenger* scavenger)
|
||||
: scavenger_(scavenger) {}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -114,7 +114,7 @@ class Scavenger {
|
||||
// filtering out non-HeapObjects and objects which do not reside in new space.
|
||||
class RootScavengeVisitor final : public RootVisitor {
|
||||
public:
|
||||
explicit RootScavengeVisitor(Scavenger* scavenger) : scavenger_(scavenger) {}
|
||||
explicit RootScavengeVisitor(Scavenger* scavenger);
|
||||
|
||||
void VisitRootPointer(Root root, const char* description, Object** p) final;
|
||||
void VisitRootPointers(Root root, const char* description, Object** start,
|
||||
@ -128,7 +128,7 @@ class RootScavengeVisitor final : public RootVisitor {
|
||||
|
||||
class ScavengeVisitor final : public NewSpaceVisitor<ScavengeVisitor> {
|
||||
public:
|
||||
explicit ScavengeVisitor(Scavenger* scavenger) : scavenger_(scavenger) {}
|
||||
explicit ScavengeVisitor(Scavenger* scavenger);
|
||||
|
||||
V8_INLINE void VisitPointers(HeapObject* host, Object** start,
|
||||
Object** end) final;
|
||||
|
@ -205,6 +205,17 @@ LayoutDescriptor* LayoutDescriptor::Initialize(
|
||||
return layout_descriptor;
|
||||
}
|
||||
|
||||
int LayoutDescriptor::number_of_layout_words() {
|
||||
return length() / kUInt32Size;
|
||||
}
|
||||
|
||||
uint32_t LayoutDescriptor::get_layout_word(int index) const {
|
||||
return get_uint32(index);
|
||||
}
|
||||
|
||||
void LayoutDescriptor::set_layout_word(int index, uint32_t value) {
|
||||
set_uint32(index, value);
|
||||
}
|
||||
|
||||
// LayoutDescriptorHelper is a helper class for querying whether inobject
|
||||
// property at offset is Double or not.
|
||||
@ -235,6 +246,7 @@ bool LayoutDescriptorHelper::IsTagged(int offset_in_bytes) {
|
||||
|
||||
return layout_descriptor_->IsTagged(field_index);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -101,9 +101,10 @@ class LayoutDescriptor : public ByteArray {
|
||||
SmiValuesAre32Bits() ? 32 : kSmiValueSize - 1;
|
||||
|
||||
static const int kBitsPerLayoutWord = 32;
|
||||
int number_of_layout_words() { return length() / kUInt32Size; }
|
||||
uint32_t get_layout_word(int index) const { return get_uint32(index); }
|
||||
void set_layout_word(int index, uint32_t value) { set_uint32(index, value); }
|
||||
|
||||
V8_INLINE int number_of_layout_words();
|
||||
V8_INLINE uint32_t get_layout_word(int index) const;
|
||||
V8_INLINE void set_layout_word(int index, uint32_t value);
|
||||
|
||||
V8_INLINE static Handle<LayoutDescriptor> New(Isolate* isolate, int length);
|
||||
V8_INLINE static LayoutDescriptor* FromSmi(Smi* smi);
|
||||
|
@ -50,11 +50,9 @@ AUTO_EXCLUDE = [
|
||||
'src/heap/incremental-marking.h',
|
||||
'src/heap/mark-compact.h',
|
||||
'src/heap/objects-visiting.h',
|
||||
'src/heap/scavenger.h',
|
||||
'src/ic/ic.h',
|
||||
'src/json-stringifier.h',
|
||||
'src/keys.h',
|
||||
'src/layout-descriptor.h',
|
||||
'src/lookup.h',
|
||||
'src/parsing/parse-info.h',
|
||||
'src/parsing/parser.h',
|
||||
|
Loading…
Reference in New Issue
Block a user