From: kmillikin@chromium.org Date: Tue, 9 Mar 2010 06:38:33 +0000 (+0000) Subject: Small simplification of #include dependencies. X-Git-Tag: upstream/4.7.83~22312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3817a7ba6e5ba9fb03ab053781b6d471f75bad95;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/SConstruct b/SConstruct index d54c29b..f7638e0 100644 --- a/SConstruct +++ b/SConstruct @@ -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 = [] diff --git a/src/accessors.cc b/src/accessors.cc index b05719e..e41db94 100644 --- a/src/accessors.cc +++ b/src/accessors.cc @@ -32,7 +32,6 @@ #include "factory.h" #include "scopeinfo.h" #include "top.h" -#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/api.cc b/src/api.cc index 14b518c..93fce79 100644 --- a/src/api.cc +++ b/src/api.cc @@ -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" diff --git a/src/assembler.h b/src/assembler.h index 004ede3..cde7d69 100644 --- a/src/assembler.h +++ b/src/assembler.h @@ -37,7 +37,6 @@ #include "runtime.h" #include "top.h" -#include "zone-inl.h" #include "token.h" namespace v8 { diff --git a/src/debug.cc b/src/debug.cc index b739498..959bea1 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -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" diff --git a/src/factory.h b/src/factory.h index 2a347cd..36911da 100644 --- a/src/factory.h +++ b/src/factory.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. diff --git a/src/frame-element.cc b/src/frame-element.cc index 1455559..ee7be95 100644 --- a/src/frame-element.cc +++ b/src/frame-element.cc @@ -28,6 +28,7 @@ #include "v8.h" #include "frame-element.h" +#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/frame-element.h b/src/frame-element.h index af53b17..3c5a389 100644 --- a/src/frame-element.h +++ b/src/frame-element.h @@ -30,6 +30,7 @@ #include "number-info.h" #include "macro-assembler.h" +#include "zone.h" namespace v8 { namespace internal { diff --git a/src/frames.cc b/src/frames.cc index 5d88265..3bf4c93 100644 --- a/src/frames.cc +++ b/src/frames.cc @@ -32,7 +32,6 @@ #include "scopeinfo.h" #include "string-stream.h" #include "top.h" -#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc index 3cb65ee..90544f1 100644 --- a/src/heap-profiler.cc +++ b/src/heap-profiler.cc @@ -31,6 +31,7 @@ #include "frames-inl.h" #include "global-handles.h" #include "string-stream.h" +#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/heap-profiler.h b/src/heap-profiler.h index c615942..d6f2650 100644 --- a/src/heap-profiler.h +++ b/src/heap-profiler.h @@ -28,6 +28,8 @@ #ifndef V8_HEAP_PROFILER_H_ #define V8_HEAP_PROFILER_H_ +#include "zone.h" + namespace v8 { namespace internal { diff --git a/src/heap.h b/src/heap.h index 5cb896c..39ce9c5 100644 --- a/src/heap.h +++ b/src/heap.h @@ -31,12 +31,14 @@ #include #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 */ \ diff --git a/src/jsregexp.h b/src/jsregexp.h index b99a89e..aaab746 100644 --- a/src/jsregexp.h +++ b/src/jsregexp.h @@ -29,6 +29,7 @@ #define V8_JSREGEXP_H_ #include "macro-assembler.h" +#include "zone.h" namespace v8 { namespace internal { diff --git a/src/jump-target.h b/src/jump-target.h index dd291c6..db7c115 100644 --- a/src/jump-target.h +++ b/src/jump-target.h @@ -29,6 +29,7 @@ #define V8_JUMP_TARGET_H_ #include "macro-assembler.h" +#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/messages.cc b/src/messages.cc index e16b1b2..7cb1d20 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -30,6 +30,7 @@ #include "api.h" #include "execution.h" +#include "messages.h" #include "spaces-inl.h" #include "top.h" diff --git a/src/parser.cc b/src/parser.cc index 7906a7a..dd72669 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -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" diff --git a/src/scopeinfo.h b/src/scopeinfo.h index 28d169a..927ac66 100644 --- a/src/scopeinfo.h +++ b/src/scopeinfo.h @@ -29,6 +29,7 @@ #define V8_SCOPEINFO_H_ #include "variables.h" +#include "zone-inl.h" namespace v8 { namespace internal { diff --git a/src/top.cc b/src/top.cc index b9db4be..7c8a1c9 100644 --- a/src/top.cc +++ b/src/top.cc @@ -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" diff --git a/src/v8.h b/src/v8.h index b3624c5..d58f30f 100644 --- 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 {