From 374a4da83e6f4e05d31640b23b5ca92f0bbf0586 Mon Sep 17 00:00:00 2001 From: mstarzinger Date: Fri, 14 Aug 2015 02:41:32 -0700 Subject: [PATCH] Remove grab-bag includes of v8.h from several files. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1297583002 Cr-Commit-Position: refs/heads/master@{#30172} --- src/accessors.cc | 3 +-- src/allocation-tracker.h | 13 +++++++++++-- src/arguments.cc | 4 ++-- src/ast-literal-reindexer.cc | 4 ++-- src/ast-numbering.cc | 3 ++- src/ast-numbering.h | 10 ++++++++-- src/bignum-dtoa.cc | 7 +++---- src/bignum-dtoa.h | 2 ++ src/bignum.cc | 2 -- src/bignum.h | 2 ++ src/cached-powers.cc | 3 ++- src/code-factory.cc | 3 +-- src/codegen.cc | 3 +-- src/compilation-dependencies.cc | 4 ++-- src/compilation-dependencies.h | 3 +++ src/contexts.cc | 2 +- src/disassembler.cc | 3 +-- src/diy-fp.cc | 5 ++--- src/diy-fp.h | 4 ++++ src/frames.cc | 2 -- src/func-name-inferrer.cc | 3 +-- src/gdb-jit.cc | 3 +-- src/heap-snapshot-generator.h | 1 + src/log-utils.cc | 7 +++++-- src/log-utils.h | 2 ++ src/modules.cc | 2 -- src/parser.cc | 3 +-- src/rewriter.cc | 3 +-- src/safepoint-table.cc | 2 -- src/scopes.cc | 3 +-- src/strtod.cc | 5 ++--- src/strtod.h | 2 ++ src/utils.cc | 5 ++--- src/variables.cc | 3 +-- 34 files changed, 70 insertions(+), 56 deletions(-) diff --git a/src/accessors.cc b/src/accessors.cc index 9850cd388e..8d5615278b 100644 --- a/src/accessors.cc +++ b/src/accessors.cc @@ -2,9 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/accessors.h" + #include "src/api.h" #include "src/contexts.h" #include "src/deoptimizer.h" diff --git a/src/allocation-tracker.h b/src/allocation-tracker.h index f3788b91a6..c409f2437b 100644 --- a/src/allocation-tracker.h +++ b/src/allocation-tracker.h @@ -7,12 +7,21 @@ #include +#include "include/v8-profiler.h" +#include "src/handles.h" +#include "src/hashmap.h" +#include "src/list.h" +#include "src/vector.h" + namespace v8 { namespace internal { -class HeapObjectsMap; - +// Forward declarations. class AllocationTraceTree; +class AllocationTracker; +class HeapObjectsMap; +class SharedFunctionInfo; +class StringsStorage; class AllocationTraceNode { public: diff --git a/src/arguments.cc b/src/arguments.cc index e7e51fed1f..a783357896 100644 --- a/src/arguments.cc +++ b/src/arguments.cc @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/arguments.h" + +#include "src/api.h" #include "src/vm-state-inl.h" namespace v8 { diff --git a/src/ast-literal-reindexer.cc b/src/ast-literal-reindexer.cc index 50729be251..860a3961f0 100644 --- a/src/ast-literal-reindexer.cc +++ b/src/ast-literal-reindexer.cc @@ -1,10 +1,10 @@ // Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" + +#include "src/ast-literal-reindexer.h" #include "src/ast.h" -#include "src/ast-literal-reindexer.h" #include "src/scopes.h" namespace v8 { diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc index 1f3268ca29..dc0528caa0 100644 --- a/src/ast-numbering.cc +++ b/src/ast-numbering.cc @@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/ast.h" #include "src/ast-numbering.h" + +#include "src/ast.h" #include "src/scopes.h" namespace v8 { diff --git a/src/ast-numbering.h b/src/ast-numbering.h index c068c2f286..57c750cf64 100644 --- a/src/ast-numbering.h +++ b/src/ast-numbering.h @@ -8,12 +8,18 @@ namespace v8 { namespace internal { +// Forward declarations. +class FunctionLiteral; +class Isolate; +class Zone; + namespace AstNumbering { // Assign type feedback IDs and bailout IDs to an AST node tree. // bool Renumber(Isolate* isolate, Zone* zone, FunctionLiteral* function); } -} -} // namespace v8::internal + +} // namespace internal +} // namespace v8 #endif // V8_AST_NUMBERING_H_ diff --git a/src/bignum-dtoa.cc b/src/bignum-dtoa.cc index ace9e37193..78ee7aa3e5 100644 --- a/src/bignum-dtoa.cc +++ b/src/bignum-dtoa.cc @@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/bignum-dtoa.h" + #include #include "src/base/logging.h" -#include "src/utils.h" - -#include "src/bignum-dtoa.h" - #include "src/bignum.h" #include "src/double.h" +#include "src/utils.h" namespace v8 { namespace internal { diff --git a/src/bignum-dtoa.h b/src/bignum-dtoa.h index fc160aecd4..d42801bd69 100644 --- a/src/bignum-dtoa.h +++ b/src/bignum-dtoa.h @@ -5,6 +5,8 @@ #ifndef V8_BIGNUM_DTOA_H_ #define V8_BIGNUM_DTOA_H_ +#include "src/vector.h" + namespace v8 { namespace internal { diff --git a/src/bignum.cc b/src/bignum.cc index e70987a82d..9baf77e7f2 100644 --- a/src/bignum.cc +++ b/src/bignum.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/bignum.h" #include "src/utils.h" diff --git a/src/bignum.h b/src/bignum.h index 744768f874..7ebdae47bc 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -5,6 +5,8 @@ #ifndef V8_BIGNUM_H_ #define V8_BIGNUM_H_ +#include "src/vector.h" + namespace v8 { namespace internal { diff --git a/src/cached-powers.cc b/src/cached-powers.cc index 5bd0884eba..52fff7e145 100644 --- a/src/cached-powers.cc +++ b/src/cached-powers.cc @@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/cached-powers.h" + #include #include #include #include #include "src/base/logging.h" -#include "src/cached-powers.h" #include "src/globals.h" namespace v8 { diff --git a/src/code-factory.cc b/src/code-factory.cc index acbf515c21..f6a8014b2e 100644 --- a/src/code-factory.cc +++ b/src/code-factory.cc @@ -2,10 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/code-factory.h" #include "src/bootstrapper.h" -#include "src/code-factory.h" #include "src/ic/ic.h" namespace v8 { diff --git a/src/codegen.cc b/src/codegen.cc index 6eb1ff1155..f0eec3f176 100644 --- a/src/codegen.cc +++ b/src/codegen.cc @@ -2,13 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/codegen.h" #if defined(V8_OS_AIX) #include #endif #include "src/bootstrapper.h" -#include "src/codegen.h" #include "src/compiler.h" #include "src/cpu-profiler.h" #include "src/debug/debug.h" diff --git a/src/compilation-dependencies.cc b/src/compilation-dependencies.cc index e20015ca2f..643b88ab0e 100644 --- a/src/compilation-dependencies.cc +++ b/src/compilation-dependencies.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/compilation-dependencies.h" + #include "src/factory.h" #include "src/handles-inl.h" #include "src/isolate.h" #include "src/objects-inl.h" #include "src/zone.h" -#include "src/compilation-dependencies.h" - namespace v8 { namespace internal { diff --git a/src/compilation-dependencies.h b/src/compilation-dependencies.h index 1ed6e5d9ba..c14220880f 100644 --- a/src/compilation-dependencies.h +++ b/src/compilation-dependencies.h @@ -5,6 +5,9 @@ #ifndef V8_DEPENDENCIES_H_ #define V8_DEPENDENCIES_H_ +#include "src/handles.h" +#include "src/objects.h" + namespace v8 { namespace internal { diff --git a/src/contexts.cc b/src/contexts.cc index 9f39aecd54..ef850452ce 100644 --- a/src/contexts.cc +++ b/src/contexts.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/contexts.h" #include "src/bootstrapper.h" #include "src/debug/debug.h" diff --git a/src/disassembler.cc b/src/disassembler.cc index 2f6e67ce25..411b09fcaa 100644 --- a/src/disassembler.cc +++ b/src/disassembler.cc @@ -2,14 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/disassembler.h" #include "src/code-stubs.h" #include "src/codegen.h" #include "src/debug/debug.h" #include "src/deoptimizer.h" #include "src/disasm.h" -#include "src/disassembler.h" #include "src/macro-assembler.h" #include "src/snapshot/serialize.h" #include "src/string-stream.h" diff --git a/src/diy-fp.cc b/src/diy-fp.cc index b64f3407f8..44a9bb122e 100644 --- a/src/diy-fp.cc +++ b/src/diy-fp.cc @@ -2,10 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include -#include "src/base/logging.h" #include "src/diy-fp.h" -#include "src/globals.h" + +#include namespace v8 { namespace internal { diff --git a/src/diy-fp.h b/src/diy-fp.h index 31f787265e..e0daf27a1e 100644 --- a/src/diy-fp.h +++ b/src/diy-fp.h @@ -5,6 +5,10 @@ #ifndef V8_DIY_FP_H_ #define V8_DIY_FP_H_ +#include + +#include "src/base/logging.h" + namespace v8 { namespace internal { diff --git a/src/frames.cc b/src/frames.cc index c4a93c87e5..0b2a6b6449 100644 --- a/src/frames.cc +++ b/src/frames.cc @@ -6,8 +6,6 @@ #include -#include "src/v8.h" - #include "src/ast.h" #include "src/base/bits.h" #include "src/deoptimizer.h" diff --git a/src/func-name-inferrer.cc b/src/func-name-inferrer.cc index 9415b8985d..5006c03eb6 100644 --- a/src/func-name-inferrer.cc +++ b/src/func-name-inferrer.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/func-name-inferrer.h" #include "src/ast.h" #include "src/ast-value-factory.h" -#include "src/func-name-inferrer.h" #include "src/list-inl.h" namespace v8 { diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc index efe83d243e..d0fd8223e1 100644 --- a/src/gdb-jit.cc +++ b/src/gdb-jit.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/gdb-jit.h" #include "src/base/bits.h" #include "src/base/platform/platform.h" @@ -10,7 +10,6 @@ #include "src/compiler.h" #include "src/frames-inl.h" #include "src/frames.h" -#include "src/gdb-jit.h" #include "src/global-handles.h" #include "src/messages.h" #include "src/objects.h" diff --git a/src/heap-snapshot-generator.h b/src/heap-snapshot-generator.h index ed0ca89839..5693cc16c3 100644 --- a/src/heap-snapshot-generator.h +++ b/src/heap-snapshot-generator.h @@ -5,6 +5,7 @@ #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_ #define V8_HEAP_SNAPSHOT_GENERATOR_H_ +#include "src/base/platform/time.h" #include "src/strings-storage.h" namespace v8 { diff --git a/src/log-utils.cc b/src/log-utils.cc index 835ed8e21e..ff9af685d1 100644 --- a/src/log-utils.cc +++ b/src/log-utils.cc @@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/log-utils.h" + +#include "src/assert-scope.h" +#include "src/base/platform/platform.h" +#include "src/objects-inl.h" #include "src/string-stream.h" +#include "src/utils.h" #include "src/version.h" namespace v8 { diff --git a/src/log-utils.h b/src/log-utils.h index afc3521c60..87dab52406 100644 --- a/src/log-utils.h +++ b/src/log-utils.h @@ -6,6 +6,8 @@ #define V8_LOG_UTILS_H_ #include "src/allocation.h" +#include "src/base/platform/mutex.h" +#include "src/flags.h" namespace v8 { namespace internal { diff --git a/src/modules.cc b/src/modules.cc index 2e6cfc0723..f72693cd66 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/modules.h" #include "src/ast-value-factory.h" diff --git a/src/parser.cc b/src/parser.cc index 11c91e21e5..301bda94c4 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/parser.h" #include "src/api.h" #include "src/ast.h" @@ -14,7 +14,6 @@ #include "src/codegen.h" #include "src/compiler.h" #include "src/messages.h" -#include "src/parser.h" #include "src/preparser.h" #include "src/runtime/runtime.h" #include "src/scanner-character-streams.h" diff --git a/src/rewriter.cc b/src/rewriter.cc index c901653a2b..d34ca5cf64 100644 --- a/src/rewriter.cc +++ b/src/rewriter.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/rewriter.h" #include "src/ast.h" #include "src/parser.h" -#include "src/rewriter.h" #include "src/scopes.h" namespace v8 { diff --git a/src/safepoint-table.cc b/src/safepoint-table.cc index 89fd724cb6..4c1c02ac0d 100644 --- a/src/safepoint-table.cc +++ b/src/safepoint-table.cc @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" - #include "src/safepoint-table.h" #include "src/deoptimizer.h" diff --git a/src/scopes.cc b/src/scopes.cc index 8ce28bd6ab..466ed9ab63 100644 --- a/src/scopes.cc +++ b/src/scopes.cc @@ -2,14 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/scopes.h" #include "src/accessors.h" #include "src/bootstrapper.h" #include "src/messages.h" #include "src/parser.h" #include "src/scopeinfo.h" -#include "src/scopes.h" namespace v8 { namespace internal { diff --git a/src/strtod.cc b/src/strtod.cc index ec26845f51..31dab94f12 100644 --- a/src/strtod.cc +++ b/src/strtod.cc @@ -2,16 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/strtod.h" + #include #include -#include "src/v8.h" - #include "src/bignum.h" #include "src/cached-powers.h" #include "src/double.h" #include "src/globals.h" -#include "src/strtod.h" #include "src/utils.h" namespace v8 { diff --git a/src/strtod.h b/src/strtod.h index f4ce731a17..737b5484c5 100644 --- a/src/strtod.h +++ b/src/strtod.h @@ -5,6 +5,8 @@ #ifndef V8_STRTOD_H_ #define V8_STRTOD_H_ +#include "src/vector.h" + namespace v8 { namespace internal { diff --git a/src/utils.cc b/src/utils.cc index 9f502bde3e..bbfdc74ad2 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/utils.h" + #include #include -#include "src/v8.h" - #include "src/base/functional.h" #include "src/base/logging.h" #include "src/base/platform/platform.h" -#include "src/utils.h" namespace v8 { namespace internal { diff --git a/src/variables.cc b/src/variables.cc index 5833d860aa..f4f7a7a917 100644 --- a/src/variables.cc +++ b/src/variables.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/v8.h" +#include "src/variables.h" #include "src/ast.h" #include "src/scopes.h" -#include "src/variables.h" namespace v8 { namespace internal {