[heap] Avoid overzealous inclusion of heap internal headers.
This is a first step towards constraining down the heap interface to just the heap.h file. Note that many includes still leak through that file to the global "src" directory, but there now is a single place controlling which declarations leak that way. Especially inclusion of inline header files within "heap" has been limited drastically. R=hpayer@chromium.org,mlippautz@chromium.org Review URL: https://codereview.chromium.org/1281233003 Cr-Commit-Position: refs/heads/master@{#30092}
This commit is contained in:
parent
71409be539
commit
65c8ecc65e
12
src/DEPS
12
src/DEPS
@ -2,6 +2,9 @@ include_rules = [
|
|||||||
"+src",
|
"+src",
|
||||||
"-src/compiler",
|
"-src/compiler",
|
||||||
"+src/compiler/pipeline.h",
|
"+src/compiler/pipeline.h",
|
||||||
|
"-src/heap",
|
||||||
|
"+src/heap/heap.h",
|
||||||
|
"+src/heap/heap-inl.h",
|
||||||
"-src/interpreter",
|
"-src/interpreter",
|
||||||
"+src/interpreter/bytecodes.h",
|
"+src/interpreter/bytecodes.h",
|
||||||
"+src/interpreter/interpreter.h",
|
"+src/interpreter/interpreter.h",
|
||||||
@ -13,4 +16,13 @@ specific_include_rules = {
|
|||||||
"d8\.cc": [
|
"d8\.cc": [
|
||||||
"+include/libplatform/libplatform.h",
|
"+include/libplatform/libplatform.h",
|
||||||
],
|
],
|
||||||
|
# TODO(mstarzinger): Get rid of grab-bag includes from heap in v8.h soon.
|
||||||
|
"v8\.h": [
|
||||||
|
"+src/heap/spaces-inl.h",
|
||||||
|
"+src/heap/incremental-marking-inl.h",
|
||||||
|
],
|
||||||
|
# TODO(mstarzinger): Only needed because of Code::CodeIterateBody cyclicity.
|
||||||
|
"objects\.cc": [
|
||||||
|
"+src/heap/objects-visiting-inl.h",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include "src/deoptimizer.h"
|
#include "src/deoptimizer.h"
|
||||||
#include "src/execution.h"
|
#include "src/execution.h"
|
||||||
#include "src/global-handles.h"
|
#include "src/global-handles.h"
|
||||||
#include "src/heap/spaces.h"
|
|
||||||
#include "src/heap-profiler.h"
|
#include "src/heap-profiler.h"
|
||||||
#include "src/heap-snapshot-generator-inl.h"
|
#include "src/heap-snapshot-generator-inl.h"
|
||||||
#include "src/icu_util.h"
|
#include "src/icu_util.h"
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "src/cpu-profiler.h"
|
#include "src/cpu-profiler.h"
|
||||||
#include "src/elements.h"
|
#include "src/elements.h"
|
||||||
#include "src/gdb-jit.h"
|
#include "src/gdb-jit.h"
|
||||||
#include "src/heap/mark-compact.h"
|
|
||||||
#include "src/heap-profiler.h"
|
#include "src/heap-profiler.h"
|
||||||
#include "src/ic/handler-compiler.h"
|
#include "src/ic/handler-compiler.h"
|
||||||
#include "src/ic/ic.h"
|
#include "src/ic/ic.h"
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "src/deoptimizer.h"
|
#include "src/deoptimizer.h"
|
||||||
#include "src/frames-inl.h"
|
#include "src/frames-inl.h"
|
||||||
#include "src/full-codegen/full-codegen.h"
|
#include "src/full-codegen/full-codegen.h"
|
||||||
#include "src/heap/mark-compact.h"
|
|
||||||
#include "src/safepoint-table.h"
|
#include "src/safepoint-table.h"
|
||||||
#include "src/scopeinfo.h"
|
#include "src/scopeinfo.h"
|
||||||
#include "src/string-stream.h"
|
#include "src/string-stream.h"
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "src/global-handles.h"
|
#include "src/global-handles.h"
|
||||||
#include "src/heap/gc-idle-time-handler.h"
|
#include "src/heap/gc-idle-time-handler.h"
|
||||||
#include "src/heap/incremental-marking.h"
|
#include "src/heap/incremental-marking.h"
|
||||||
|
#include "src/heap/mark-compact-inl.h"
|
||||||
#include "src/heap/mark-compact.h"
|
#include "src/heap/mark-compact.h"
|
||||||
#include "src/heap/memory-reducer.h"
|
#include "src/heap/memory-reducer.h"
|
||||||
#include "src/heap/objects-visiting-inl.h"
|
#include "src/heap/objects-visiting-inl.h"
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "src/code-stubs.h"
|
#include "src/code-stubs.h"
|
||||||
#include "src/compilation-cache.h"
|
#include "src/compilation-cache.h"
|
||||||
#include "src/conversions.h"
|
#include "src/conversions.h"
|
||||||
|
#include "src/heap/mark-compact-inl.h"
|
||||||
#include "src/heap/objects-visiting.h"
|
#include "src/heap/objects-visiting.h"
|
||||||
#include "src/heap/objects-visiting-inl.h"
|
#include "src/heap/objects-visiting-inl.h"
|
||||||
|
|
||||||
|
@ -13,12 +13,6 @@ namespace v8 {
|
|||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
|
||||||
MarkBit Marking::MarkBitFrom(Address addr) {
|
|
||||||
MemoryChunk* p = MemoryChunk::FromAddress(addr);
|
|
||||||
return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MarkCompactCollector::SetFlags(int flags) {
|
void MarkCompactCollector::SetFlags(int flags) {
|
||||||
reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0);
|
reduce_memory_footprint_ = ((flags & Heap::kReduceMemoryFootprintMask) != 0);
|
||||||
abort_incremental_marking_ =
|
abort_incremental_marking_ =
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "src/global-handles.h"
|
#include "src/global-handles.h"
|
||||||
#include "src/heap/incremental-marking.h"
|
#include "src/heap/incremental-marking.h"
|
||||||
#include "src/heap/mark-compact.h"
|
#include "src/heap/mark-compact.h"
|
||||||
|
#include "src/heap/mark-compact-inl.h"
|
||||||
#include "src/heap/objects-visiting.h"
|
#include "src/heap/objects-visiting.h"
|
||||||
#include "src/heap/objects-visiting-inl.h"
|
#include "src/heap/objects-visiting-inl.h"
|
||||||
#include "src/heap/spaces-inl.h"
|
#include "src/heap/spaces-inl.h"
|
||||||
|
@ -28,7 +28,10 @@ class RootMarkingVisitor;
|
|||||||
|
|
||||||
class Marking : public AllStatic {
|
class Marking : public AllStatic {
|
||||||
public:
|
public:
|
||||||
INLINE(static MarkBit MarkBitFrom(Address addr));
|
INLINE(static MarkBit MarkBitFrom(Address addr)) {
|
||||||
|
MemoryChunk* p = MemoryChunk::FromAddress(addr);
|
||||||
|
return p->markbits()->MarkBitFromIndex(p->AddressToMarkbitIndex(addr));
|
||||||
|
}
|
||||||
|
|
||||||
INLINE(static MarkBit MarkBitFrom(HeapObject* obj)) {
|
INLINE(static MarkBit MarkBitFrom(HeapObject* obj)) {
|
||||||
return MarkBitFrom(reinterpret_cast<Address>(obj));
|
return MarkBitFrom(reinterpret_cast<Address>(obj));
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "src/v8.h"
|
#include "src/v8.h"
|
||||||
|
|
||||||
|
#include "src/heap/mark-compact-inl.h"
|
||||||
#include "src/heap/objects-visiting.h"
|
#include "src/heap/objects-visiting.h"
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "src/cpu-profiler.h"
|
#include "src/cpu-profiler.h"
|
||||||
#include "src/debug/debug.h"
|
#include "src/debug/debug.h"
|
||||||
#include "src/deoptimizer.h"
|
#include "src/deoptimizer.h"
|
||||||
#include "src/heap/spaces.h"
|
|
||||||
#include "src/heap-profiler.h"
|
#include "src/heap-profiler.h"
|
||||||
#include "src/hydrogen.h"
|
#include "src/hydrogen.h"
|
||||||
#include "src/ic/stub-cache.h"
|
#include "src/ic/stub-cache.h"
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#include "src/char-predicates-inl.h"
|
#include "src/char-predicates-inl.h"
|
||||||
#include "src/conversions.h"
|
#include "src/conversions.h"
|
||||||
#include "src/heap/spaces-inl.h"
|
|
||||||
#include "src/messages.h"
|
#include "src/messages.h"
|
||||||
#include "src/token.h"
|
#include "src/token.h"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "src/api.h"
|
#include "src/api.h"
|
||||||
#include "src/execution.h"
|
#include "src/execution.h"
|
||||||
#include "src/heap/spaces-inl.h"
|
|
||||||
#include "src/messages.h"
|
#include "src/messages.h"
|
||||||
#include "src/string-builder.h"
|
#include "src/string-builder.h"
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "src/disasm.h"
|
#include "src/disasm.h"
|
||||||
#include "src/disassembler.h"
|
#include "src/disassembler.h"
|
||||||
#include "src/heap/objects-visiting.h"
|
|
||||||
#include "src/jsregexp.h"
|
#include "src/jsregexp.h"
|
||||||
#include "src/macro-assembler.h"
|
#include "src/macro-assembler.h"
|
||||||
#include "src/ostreams.h"
|
#include "src/ostreams.h"
|
||||||
|
@ -20,10 +20,6 @@
|
|||||||
#include "src/field-index-inl.h"
|
#include "src/field-index-inl.h"
|
||||||
#include "src/heap/heap-inl.h"
|
#include "src/heap/heap-inl.h"
|
||||||
#include "src/heap/heap.h"
|
#include "src/heap/heap.h"
|
||||||
#include "src/heap/incremental-marking.h"
|
|
||||||
#include "src/heap/objects-visiting.h"
|
|
||||||
#include "src/heap/spaces.h"
|
|
||||||
#include "src/heap/store-buffer.h"
|
|
||||||
#include "src/isolate.h"
|
#include "src/isolate.h"
|
||||||
#include "src/layout-descriptor-inl.h"
|
#include "src/layout-descriptor-inl.h"
|
||||||
#include "src/lookup.h"
|
#include "src/lookup.h"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include "src/disasm.h"
|
#include "src/disasm.h"
|
||||||
#include "src/disassembler.h"
|
#include "src/disassembler.h"
|
||||||
#include "src/heap/objects-visiting.h"
|
|
||||||
#include "src/interpreter/bytecodes.h"
|
#include "src/interpreter/bytecodes.h"
|
||||||
#include "src/jsregexp.h"
|
#include "src/jsregexp.h"
|
||||||
#include "src/ostreams.h"
|
#include "src/ostreams.h"
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "src/field-index-inl.h"
|
#include "src/field-index-inl.h"
|
||||||
#include "src/field-index.h"
|
#include "src/field-index.h"
|
||||||
#include "src/full-codegen/full-codegen.h"
|
#include "src/full-codegen/full-codegen.h"
|
||||||
#include "src/heap/mark-compact.h"
|
|
||||||
#include "src/heap/objects-visiting-inl.h"
|
#include "src/heap/objects-visiting-inl.h"
|
||||||
#include "src/hydrogen.h"
|
#include "src/hydrogen.h"
|
||||||
#include "src/ic/ic.h"
|
#include "src/ic/ic.h"
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "src/execution.h"
|
#include "src/execution.h"
|
||||||
#include "src/full-codegen/full-codegen.h"
|
#include "src/full-codegen/full-codegen.h"
|
||||||
#include "src/global-handles.h"
|
#include "src/global-handles.h"
|
||||||
#include "src/heap/mark-compact.h"
|
|
||||||
#include "src/scopeinfo.h"
|
#include "src/scopeinfo.h"
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "src/deoptimizer.h"
|
#include "src/deoptimizer.h"
|
||||||
#include "src/elements.h"
|
#include "src/elements.h"
|
||||||
#include "src/frames.h"
|
#include "src/frames.h"
|
||||||
#include "src/heap/store-buffer.h"
|
|
||||||
#include "src/heap-profiler.h"
|
#include "src/heap-profiler.h"
|
||||||
#include "src/hydrogen.h"
|
#include "src/hydrogen.h"
|
||||||
#include "src/isolate.h"
|
#include "src/isolate.h"
|
||||||
|
2
src/v8.h
2
src/v8.h
@ -38,9 +38,7 @@
|
|||||||
// Objects & heap
|
// Objects & heap
|
||||||
#include "src/objects-inl.h" // NOLINT
|
#include "src/objects-inl.h" // NOLINT
|
||||||
#include "src/heap/spaces-inl.h" // NOLINT
|
#include "src/heap/spaces-inl.h" // NOLINT
|
||||||
#include "src/heap/heap-inl.h" // NOLINT
|
|
||||||
#include "src/heap/incremental-marking-inl.h" // NOLINT
|
#include "src/heap/incremental-marking-inl.h" // NOLINT
|
||||||
#include "src/heap/mark-compact-inl.h" // NOLINT
|
|
||||||
#include "src/log-inl.h" // NOLINT
|
#include "src/log-inl.h" // NOLINT
|
||||||
#include "src/handles-inl.h" // NOLINT
|
#include "src/handles-inl.h" // NOLINT
|
||||||
#include "src/types-inl.h" // NOLINT
|
#include "src/types-inl.h" // NOLINT
|
||||||
|
Loading…
Reference in New Issue
Block a user