Revision: 4058
Author: [email protected]
Date: Mon Mar  8 22:38:33 2010
Log: 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
http://code.google.com/p/v8/source/detail?r=4058

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

=======================================
--- /branches/bleeding_edge/SConstruct  Tue Feb 23 07:22:48 2010
+++ /branches/bleeding_edge/SConstruct  Mon Mar  8 22:38:33 2010
@@ -46,8 +46,8 @@
# 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 = []
=======================================
--- /branches/bleeding_edge/src/accessors.cc    Wed Feb 10 06:44:15 2010
+++ /branches/bleeding_edge/src/accessors.cc    Mon Mar  8 22:38:33 2010
@@ -32,7 +32,6 @@
 #include "factory.h"
 #include "scopeinfo.h"
 #include "top.h"
-#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/api.cc  Mon Mar  8 03:19:20 2010
+++ /branches/bleeding_edge/src/api.cc  Mon Mar  8 22:38:33 2010
@@ -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"
=======================================
--- /branches/bleeding_edge/src/assembler.h     Tue Mar  2 03:54:11 2010
+++ /branches/bleeding_edge/src/assembler.h     Mon Mar  8 22:38:33 2010
@@ -37,7 +37,6 @@

 #include "runtime.h"
 #include "top.h"
-#include "zone-inl.h"
 #include "token.h"

 namespace v8 {
=======================================
--- /branches/bleeding_edge/src/debug.cc        Fri Mar  5 14:08:58 2010
+++ /branches/bleeding_edge/src/debug.cc        Mon Mar  8 22:38:33 2010
@@ -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"
=======================================
--- /branches/bleeding_edge/src/factory.h       Fri Mar  5 04:30:59 2010
+++ /branches/bleeding_edge/src/factory.h       Mon Mar  8 22:38:33 2010
@@ -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.

=======================================
--- /branches/bleeding_edge/src/frame-element.cc        Tue Feb 16 05:03:16 2010
+++ /branches/bleeding_edge/src/frame-element.cc        Mon Mar  8 22:38:33 2010
@@ -28,6 +28,7 @@
 #include "v8.h"

 #include "frame-element.h"
+#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/frame-element.h Fri Mar  5 15:54:13 2010
+++ /branches/bleeding_edge/src/frame-element.h Mon Mar  8 22:38:33 2010
@@ -30,6 +30,7 @@

 #include "number-info.h"
 #include "macro-assembler.h"
+#include "zone.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/frames.cc       Mon Feb  8 05:44:49 2010
+++ /branches/bleeding_edge/src/frames.cc       Mon Mar  8 22:38:33 2010
@@ -32,7 +32,6 @@
 #include "scopeinfo.h"
 #include "string-stream.h"
 #include "top.h"
-#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/heap-profiler.cc        Mon Jan 25 14:53:18 2010
+++ /branches/bleeding_edge/src/heap-profiler.cc        Mon Mar  8 22:38:33 2010
@@ -31,6 +31,7 @@
 #include "frames-inl.h"
 #include "global-handles.h"
 #include "string-stream.h"
+#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/heap-profiler.h Thu Dec 17 01:16:44 2009
+++ /branches/bleeding_edge/src/heap-profiler.h Mon Mar  8 22:38:33 2010
@@ -28,6 +28,8 @@
 #ifndef V8_HEAP_PROFILER_H_
 #define V8_HEAP_PROFILER_H_

+#include "zone.h"
+
 namespace v8 {
 namespace internal {

=======================================
--- /branches/bleeding_edge/src/heap.h  Mon Mar  8 03:19:20 2010
+++ /branches/bleeding_edge/src/heap.h  Mon Mar  8 22:38:33 2010
@@ -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 */ \
=======================================
--- /branches/bleeding_edge/src/jsregexp.h      Thu Jan  7 11:01:23 2010
+++ /branches/bleeding_edge/src/jsregexp.h      Mon Mar  8 22:38:33 2010
@@ -29,6 +29,7 @@
 #define V8_JSREGEXP_H_

 #include "macro-assembler.h"
+#include "zone.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/jump-target.h   Mon Dec 21 07:04:00 2009
+++ /branches/bleeding_edge/src/jump-target.h   Mon Mar  8 22:38:33 2010
@@ -29,6 +29,7 @@
 #define V8_JUMP_TARGET_H_

 #include "macro-assembler.h"
+#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/messages.cc     Wed Aug 19 08:14:11 2009
+++ /branches/bleeding_edge/src/messages.cc     Mon Mar  8 22:38:33 2010
@@ -30,6 +30,7 @@

 #include "api.h"
 #include "execution.h"
+#include "messages.h"
 #include "spaces-inl.h"
 #include "top.h"

=======================================
--- /branches/bleeding_edge/src/parser.cc       Mon Mar  8 05:01:24 2010
+++ /branches/bleeding_edge/src/parser.cc       Mon Mar  8 22:38:33 2010
@@ -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"
=======================================
--- /branches/bleeding_edge/src/scopeinfo.h     Mon Jun 22 01:09:57 2009
+++ /branches/bleeding_edge/src/scopeinfo.h     Mon Mar  8 22:38:33 2010
@@ -29,6 +29,7 @@
 #define V8_SCOPEINFO_H_

 #include "variables.h"
+#include "zone-inl.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/bleeding_edge/src/top.cc  Tue Feb  9 08:14:14 2010
+++ /branches/bleeding_edge/src/top.cc  Mon Mar  8 22:38:33 2010
@@ -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"
=======================================
--- /branches/bleeding_edge/src/v8.h    Mon Nov 16 04:08:40 2009
+++ /branches/bleeding_edge/src/v8.h    Mon Mar  8 22:38:33 2010
@@ -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 {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to