Commit 0a0285bf authored by marja's avatar marja Committed by Commit bot

include only stuff you need, part 1: ast.h, ast-value-factory.h.

Rebuilding (after touching certain files) is crazy slow because
includes are out of control.

Fixing it:
- Don't include stuff in headers unless necessary.
- Include the stuff you need, not some other stuff that happens to include the
stuff you need.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2246203005
Cr-Commit-Position: refs/heads/master@{#38708}
parent 9324efca
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "src/allocation-site-scopes.h" #include "src/allocation-site-scopes.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
#ifndef V8_ALLOCATION_SITE_SCOPES_H_ #ifndef V8_ALLOCATION_SITE_SCOPES_H_
#define V8_ALLOCATION_SITE_SCOPES_H_ #define V8_ALLOCATION_SITE_SCOPES_H_
#include "src/ast/ast.h"
#include "src/handles.h" #include "src/handles.h"
#include "src/objects.h" #include "src/objects.h"
#include "src/zone.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include "src/asmjs/asm-typer.h" #include "src/asmjs/asm-typer.h"
#include "src/asmjs/asm-wasm-builder.h" #include "src/asmjs/asm-wasm-builder.h"
#include "src/assert-scope.h" #include "src/assert-scope.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/execution.h" #include "src/execution.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/handles.h" #include "src/handles.h"
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "src/ast/variables.h" #include "src/ast/variables.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h" #include "src/ast/scopes.h"
#include "src/globals.h" #include "src/globals.h"
......
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
#include <memory> #include <memory>
#include "src/allocation.h" #include "src/allocation.h"
#include "src/ast/ast.h"
#include "src/bailout-reason.h" #include "src/bailout-reason.h"
#include "src/compilation-dependencies.h" #include "src/compilation-dependencies.h"
#include "src/contexts.h"
#include "src/frames.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/source-position-table.h" #include "src/source-position-table.h"
#include "src/source-position.h" #include "src/source-position.h"
#include "src/zone.h" #include "src/zone.h"
......
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
#ifndef V8_CRANKSHAFT_HYDROGEN_OSR_H_ #ifndef V8_CRANKSHAFT_HYDROGEN_OSR_H_
#define V8_CRANKSHAFT_HYDROGEN_OSR_H_ #define V8_CRANKSHAFT_HYDROGEN_OSR_H_
#include "src/ast/ast.h"
#include "src/crankshaft/hydrogen.h" #include "src/crankshaft/hydrogen.h"
#include "src/zone.h" #include "src/zone.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class IterationStatement;
// Responsible for building graph parts related to OSR and otherwise // Responsible for building graph parts related to OSR and otherwise
// setting up the graph to do an OSR compile. // setting up the graph to do an OSR compile.
class HOsrBuilder : public ZoneObject { class HOsrBuilder : public ZoneObject {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#include "src/allocation.h" #include "src/allocation.h"
#include "src/ast/ast-type-bounds.h" #include "src/ast/ast-type-bounds.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h" #include "src/ast/scopes.h"
#include "src/ast/variables.h"
#include "src/effects.h" #include "src/effects.h"
#include "src/type-info.h" #include "src/type-info.h"
#include "src/types.h" #include "src/types.h"
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class FunctionLiteral;
class AstTyper final : public AstVisitor<AstTyper> { class AstTyper final : public AstVisitor<AstTyper> {
public: public:
AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure, AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include <sstream> #include <sstream>
#include "src/ast/ast.h"
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/deoptimizer.h" #include "src/deoptimizer.h"
#include "src/frames-inl.h" #include "src/frames-inl.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <fstream> // NOLINT(readability/streams) #include <fstream> // NOLINT(readability/streams)
#include <sstream> #include <sstream>
#include "src/ast/ast.h"
#include "src/ast/context-slot-cache.h" #include "src/ast/context-slot-cache.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/base/sys-info.h" #include "src/base/sys-info.h"
......
...@@ -5,11 +5,14 @@ ...@@ -5,11 +5,14 @@
#ifndef V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_ #ifndef V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_
#define V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_ #define V8_PARSING_PARAMETER_EXPRESSION_REWRITER_H_
#include "src/ast/ast.h" #include "src/types.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class Expression;
class Scope;
// When an extra declaration scope needs to be inserted to account for // When an extra declaration scope needs to be inserted to account for
// a sloppy eval in a default parameter or function body, the expressions // a sloppy eval in a default parameter or function body, the expressions
// needs to be in that new inner scope which was added after initial // needs to be in that new inner scope which was added after initial
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <memory> #include <memory>
#include "src/ast/ast.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/compilation-cache.h" #include "src/compilation-cache.h"
#include "src/compiler.h" #include "src/compiler.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "src/allocation-site-scopes.h" #include "src/allocation-site-scopes.h"
#include "src/arguments.h" #include "src/arguments.h"
#include "src/ast/ast.h"
#include "src/isolate-inl.h" #include "src/isolate-inl.h"
#include "src/parsing/parser.h" #include "src/parsing/parser.h"
#include "src/runtime/runtime.h" #include "src/runtime/runtime.h"
......
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