Reviewers: titzer,

Message:
The actual change is in src/compiler/node.h, the rest is fallout from missing
IWYU in other files.

Description:
Remove inline header includes from non-inline headers (2).

This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.

Note that this change still leaves 5 violations of that rule in the
code. It only tackles "node.h" including "types-inl.h".

[email protected]

Please review this at https://codereview.chromium.org/1288053004/

Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-includes-object

Affected files (+20, -4 lines):
  M src/compiler/common-node-cache.cc
  M src/compiler/js-frame-specialization.h
  M src/compiler/js-type-feedback-lowering.h
  M src/compiler/linkage.h
  M src/compiler/node.h
  M src/compiler/source-position.cc
  M src/conversions.h
  M src/conversions-inl.h
  M src/isolate.h
  M src/sampler.h


Index: src/compiler/common-node-cache.cc
diff --git a/src/compiler/common-node-cache.cc b/src/compiler/common-node-cache.cc index e7f7436a0bd76624ce182e3dc4797b31b361c88a..b005c952dd0e0b40fc046fa76f08d5ebf1d3f915 100644
--- a/src/compiler/common-node-cache.cc
+++ b/src/compiler/common-node-cache.cc
@@ -6,6 +6,7 @@

 #include "src/assembler.h"
 #include "src/compiler/node.h"
+#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!

 namespace v8 {
 namespace internal {
Index: src/compiler/js-frame-specialization.h
diff --git a/src/compiler/js-frame-specialization.h b/src/compiler/js-frame-specialization.h index c6fc561c5cfe479711b9bc182d8f45512e6a25b5..90b3ca5e39b97515aa83cbda80e94f001511a45c 100644
--- a/src/compiler/js-frame-specialization.h
+++ b/src/compiler/js-frame-specialization.h
@@ -9,6 +9,10 @@

 namespace v8 {
 namespace internal {
+
+// Forward declarations.
+class JavaScriptFrame;
+
 namespace compiler {

 // Forward declarations.
Index: src/compiler/js-type-feedback-lowering.h
diff --git a/src/compiler/js-type-feedback-lowering.h b/src/compiler/js-type-feedback-lowering.h index 19f4df0ffa1845ede72d94c37ce1a3bf1d55e486..db0fbdd626a050bd738e7d41516f7916588d00f1 100644
--- a/src/compiler/js-type-feedback-lowering.h
+++ b/src/compiler/js-type-feedback-lowering.h
@@ -11,6 +11,10 @@

 namespace v8 {
 namespace internal {
+
+// Forward declarations.
+class Factory;
+
 namespace compiler {

 // Forward declarations.
Index: src/compiler/linkage.h
diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h
index 9f8b2d76f39d399c24cd083b7df78aee3a71e646..623c9109d96b93b271c61daf5d811b2d694933cf 100644
--- a/src/compiler/linkage.h
+++ b/src/compiler/linkage.h
@@ -17,6 +17,7 @@ namespace v8 {
 namespace internal {

 class CallInterfaceDescriptor;
+class CompilationInfo;

 namespace compiler {

Index: src/compiler/node.h
diff --git a/src/compiler/node.h b/src/compiler/node.h
index 6557635a2ecfb76e60865795604316d9e2c49556..a638df343df61c1063785ee446e769b3522f1fa7 100644
--- a/src/compiler/node.h
+++ b/src/compiler/node.h
@@ -7,7 +7,7 @@

 #include "src/compiler/opcodes.h"
 #include "src/compiler/operator.h"
-#include "src/types-inl.h"
+#include "src/types.h"
 #include "src/zone-containers.h"

 namespace v8 {
Index: src/compiler/source-position.cc
diff --git a/src/compiler/source-position.cc b/src/compiler/source-position.cc index 48361ecac771d92a2899fae83dcc014b02002424..aba77b36f37895550dffe6c52104aa541b0c2d99 100644
--- a/src/compiler/source-position.cc
+++ b/src/compiler/source-position.cc
@@ -5,6 +5,7 @@
 #include "src/compiler/source-position.h"
 #include "src/compiler/graph.h"
 #include "src/compiler/node-aux-data.h"
+#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!

 namespace v8 {
 namespace internal {
Index: src/conversions-inl.h
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index d9f16ade2eda6b69e2d2c2e3892acc0bd5ffea63..42d617d01720346d7a1667a127ffc643fe4f18b4 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -160,6 +160,11 @@ size_t NumberToSize(Isolate* isolate, Object* number) {
 }


+uint32_t DoubleToUint32(double x) {
+  return static_cast<uint32_t>(DoubleToInt32(x));
+}
+
+
 template <class Iterator, class EndMark>
 bool SubStringEquals(Iterator* current,
                      EndMark end,
Index: src/conversions.h
diff --git a/src/conversions.h b/src/conversions.h
index 666c2efb12d51c410a4baa9eace09fe339c923bd..2ff3c24efa1c30943f0749e8d8722f984d65590d 100644
--- a/src/conversions.h
+++ b/src/conversions.h
@@ -89,9 +89,7 @@ inline int32_t DoubleToInt32(double x);


 // This function should match the exact semantics of ECMA-262 9.6.
-inline uint32_t DoubleToUint32(double x) {
-  return static_cast<uint32_t>(DoubleToInt32(x));
-}
+inline uint32_t DoubleToUint32(double x);


 // Enumeration for allowing octals and ignoring junk when converting
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 0445fbe1ef35c14d8d40ff953e478452f21c2905..bb1fa417b26244136fd47faf537ef0b5d589c81b 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -64,6 +64,7 @@ class HStatistics;
 class HTracer;
 class InlineRuntimeFunctionsTable;
 class InnerPointerToCodeCache;
+class Logger;
 class MaterializedObjectStore;
 class CodeAgingHelper;
 class RegExpStack;
Index: src/sampler.h
diff --git a/src/sampler.h b/src/sampler.h
index 120260dbf55203bc6712d429ddc55c9a35c9bb1e..bfdf9612291164a3a07c5e7bbc0a9f03673b79fc 100644
--- a/src/sampler.h
+++ b/src/sampler.h
@@ -8,6 +8,7 @@
 #include "include/v8.h"

 #include "src/base/atomicops.h"
+#include "src/base/platform/time.h"
 #include "src/frames.h"
 #include "src/globals.h"



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to