Small simplification of #include dependencies.

Remove messages.h from v8.h and include it explicitly in only the few places
it is needed.  Many files relied on getting handles-inl.h implicitly from
messages.h through v8.h, so include handles-inl.h explicitly in v8.h
instead.

Remove zone-inl.h from header files where it is not needed, can be replaced
by a forward declaration, or can be replaced by zone.h (specifically,
factory.h and heap.h).  Include zone.h or zone-inl.h in header files where
it was implicitly included via heap.h or factory.h.  Prefer zone.h over
zone-inl.h in header files where possible by including zone-inl.h in .cc
files.

Review URL: http://codereview.chromium.org/668248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b1bac8ce
......@@ -46,8 +46,8 @@ if ANDROID_TOP is None:
# on linux we need these compiler flags to avoid crashes in the v8 test suite
# and avoid dtoa.c strict aliasing issues
if os.environ.get('GCC_VERSION') == '44':
GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp']
GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp', '-fno-strict-aliasing']
GCC_DTOA_EXTRA_CCFLAGS = []
else:
GCC_EXTRA_CCFLAGS = []
GCC_DTOA_EXTRA_CCFLAGS = []
......
......@@ -32,7 +32,6 @@
#include "factory.h"
#include "scopeinfo.h"
#include "top.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -34,9 +34,11 @@
#include "debug.h"
#include "execution.h"
#include "global-handles.h"
#include "messages.h"
#include "platform.h"
#include "serialize.h"
#include "snapshot.h"
#include "top.h"
#include "utils.h"
#include "v8threads.h"
#include "version.h"
......
......@@ -37,7 +37,6 @@
#include "runtime.h"
#include "top.h"
#include "zone-inl.h"
#include "token.h"
namespace v8 {
......
......@@ -39,6 +39,7 @@
#include "global-handles.h"
#include "ic.h"
#include "ic-inl.h"
#include "messages.h"
#include "natives.h"
#include "stub-cache.h"
#include "log.h"
......
......@@ -30,11 +30,12 @@
#include "globals.h"
#include "heap.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
// Forward declarations.
class ZoneScopeInfo;
// Interface for handle based allocation.
......
......@@ -28,6 +28,7 @@
#include "v8.h"
#include "frame-element.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -30,6 +30,7 @@
#include "number-info.h"
#include "macro-assembler.h"
#include "zone.h"
namespace v8 {
namespace internal {
......
......@@ -32,7 +32,6 @@
#include "scopeinfo.h"
#include "string-stream.h"
#include "top.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -31,6 +31,7 @@
#include "frames-inl.h"
#include "global-handles.h"
#include "string-stream.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -28,6 +28,8 @@
#ifndef V8_HEAP_PROFILER_H_
#define V8_HEAP_PROFILER_H_
#include "zone.h"
namespace v8 {
namespace internal {
......
......@@ -31,12 +31,14 @@
#include <math.h>
#include "splay-tree-inl.h"
#include "zone-inl.h"
#include "v8-counters.h"
namespace v8 {
namespace internal {
// Forward declarations.
class ZoneScopeInfo;
// Defines all the roots in Heap.
#define UNCONDITIONAL_STRONG_ROOT_LIST(V) \
/* Put the byte array map early. We need it to be in place by the time */ \
......
......@@ -29,6 +29,7 @@
#define V8_JSREGEXP_H_
#include "macro-assembler.h"
#include "zone.h"
namespace v8 {
namespace internal {
......
......@@ -29,6 +29,7 @@
#define V8_JUMP_TARGET_H_
#include "macro-assembler.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -30,6 +30,7 @@
#include "api.h"
#include "execution.h"
#include "messages.h"
#include "spaces-inl.h"
#include "top.h"
......
......@@ -31,6 +31,7 @@
#include "ast.h"
#include "bootstrapper.h"
#include "compiler.h"
#include "messages.h"
#include "platform.h"
#include "runtime.h"
#include "parser.h"
......
......@@ -29,6 +29,7 @@
#define V8_SCOPEINFO_H_
#include "variables.h"
#include "zone-inl.h"
namespace v8 {
namespace internal {
......
......@@ -31,6 +31,7 @@
#include "bootstrapper.h"
#include "debug.h"
#include "execution.h"
#include "messages.h"
#include "platform.h"
#include "simulator.h"
#include "string-stream.h"
......
......@@ -67,7 +67,7 @@
#include "spaces-inl.h"
#include "heap-inl.h"
#include "log-inl.h"
#include "messages.h"
#include "handles-inl.h"
namespace v8 {
namespace internal {
......
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