Small simplification of #include dependencies.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Mar 2010 06:38:33 +0000 (06:38 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Mar 2010 06:38:33 +0000 (06:38 +0000)
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

19 files changed:
SConstruct
src/accessors.cc
src/api.cc
src/assembler.h
src/debug.cc
src/factory.h
src/frame-element.cc
src/frame-element.h
src/frames.cc
src/heap-profiler.cc
src/heap-profiler.h
src/heap.h
src/jsregexp.h
src/jump-target.h
src/messages.cc
src/parser.cc
src/scopeinfo.h
src/top.cc
src/v8.h

index d54c29b..f7638e0 100644 (file)
@@ -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 = []
index b05719e..e41db94 100644 (file)
@@ -32,7 +32,6 @@
 #include "factory.h"
 #include "scopeinfo.h"
 #include "top.h"
-#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index 14b518c..93fce79 100644 (file)
 #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"
index 004ede3..cde7d69 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "runtime.h"
 #include "top.h"
-#include "zone-inl.h"
 #include "token.h"
 
 namespace v8 {
index b739498..959bea1 100644 (file)
@@ -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"
index 2a347cd..36911da 100644 (file)
 
 #include "globals.h"
 #include "heap.h"
-#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
 
+// Forward declarations.
+class ZoneScopeInfo;
 
 // Interface for handle based allocation.
 
index 1455559..ee7be95 100644 (file)
@@ -28,6 +28,7 @@
 #include "v8.h"
 
 #include "frame-element.h"
+#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index af53b17..3c5a389 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "number-info.h"
 #include "macro-assembler.h"
+#include "zone.h"
 
 namespace v8 {
 namespace internal {
index 5d88265..3bf4c93 100644 (file)
@@ -32,7 +32,6 @@
 #include "scopeinfo.h"
 #include "string-stream.h"
 #include "top.h"
-#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index 3cb65ee..90544f1 100644 (file)
@@ -31,6 +31,7 @@
 #include "frames-inl.h"
 #include "global-handles.h"
 #include "string-stream.h"
+#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index c615942..d6f2650 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef V8_HEAP_PROFILER_H_
 #define V8_HEAP_PROFILER_H_
 
+#include "zone.h"
+
 namespace v8 {
 namespace internal {
 
index 5cb896c..39ce9c5 100644 (file)
 #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   */ \
index b99a89e..aaab746 100644 (file)
@@ -29,6 +29,7 @@
 #define V8_JSREGEXP_H_
 
 #include "macro-assembler.h"
+#include "zone.h"
 
 namespace v8 {
 namespace internal {
index dd291c6..db7c115 100644 (file)
@@ -29,6 +29,7 @@
 #define V8_JUMP_TARGET_H_
 
 #include "macro-assembler.h"
+#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index e16b1b2..7cb1d20 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "api.h"
 #include "execution.h"
+#include "messages.h"
 #include "spaces-inl.h"
 #include "top.h"
 
index 7906a7a..dd72669 100644 (file)
@@ -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"
index 28d169a..927ac66 100644 (file)
@@ -29,6 +29,7 @@
 #define V8_SCOPEINFO_H_
 
 #include "variables.h"
+#include "zone-inl.h"
 
 namespace v8 {
 namespace internal {
index b9db4be..7c8a1c9 100644 (file)
@@ -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"
index b3624c5..d58f30f 100644 (file)
--- a/src/v8.h
+++ b/src/v8.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 {