Reviewers: Benedikt Meurer,

https://codereview.chromium.org/1321223002/diff/1/src/unique.h
File src/unique.h (left):

https://codereview.chromium.org/1321223002/diff/1/src/unique.h#oldcode12
src/unique.h:12: #include "src/objects-inl.h"  // TODO(everyone): Fix
our inl.h crap
Please appreciate this part of the change. :)

Description:
[turbofan] Remove obsolete unique.h includes in TurboFan.

Now that it is no longer needed, this also removes the invalid inclusion
of "object-inl.h" within the "unique.h" header file.

Note that this change still leaves 2 violations of that rule in the
code, checked with the "tools/check-inline-includes.sh" tool.

R=bmeu...@chromium.org

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

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

Affected files (+38, -17 lines):
  M src/compiler/common-operator.h
  M src/compiler/common-operator.cc
  M src/compiler/interpreter-assembler.h
  M src/compiler/js-builtin-reducer.cc
  M src/compiler/js-context-specialization.cc
  M src/compiler/js-generic-lowering.cc
  M src/compiler/js-graph.h
  M src/compiler/js-inlining.h
  M src/compiler/js-inlining.cc
  M src/compiler/js-intrinsic-lowering.cc
  M src/compiler/js-operator.h
  M src/compiler/js-operator.cc
  M src/compiler/js-type-feedback-lowering.cc
  M src/compiler/node-matchers.h
  M src/compiler/raw-machine-assembler.h
  M src/compiler/simplified-operator-reducer.cc
  M src/compiler/typer.cc
  M src/compiler/verifier.cc
  M src/frames-inl.h
  M src/unique.h
  M test/unittests/compiler/graph-unittest.cc
  M test/unittests/compiler/interpreter-assembler-unittest.cc
  M test/unittests/compiler/machine-operator-reducer-unittest.cc
  M test/unittests/compiler/node-test-utils.cc
  M test/unittests/compiler/simplified-operator-reducer-unittest.cc


Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc index 28784562adfe1b95211b54d87530f5c7597a3e03..bacaae980f918eddf24abbca60e2f16657a6a499 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -9,7 +9,7 @@
 #include "src/compiler/linkage.h"
 #include "src/compiler/opcodes.h"
 #include "src/compiler/operator.h"
-#include "src/unique.h"
+#include "src/handles-inl.h"
 #include "src/zone.h"

 namespace v8 {
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 2c3d34c3d78a9a10b767401ace6d62df1fc0440b..22490f7fe1ad682b7b67280642d0758d15fd5497 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -7,7 +7,7 @@

 #include "src/compiler/frame-states.h"
 #include "src/compiler/machine-type.h"
-#include "src/unique.h"
+#include "src/zone-containers.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/interpreter-assembler.h
diff --git a/src/compiler/interpreter-assembler.h b/src/compiler/interpreter-assembler.h index b0ec37d0a664b8121c835f57b39d722172c91925..bb771eb2163f9323826ecc7e930640ba27e391fc 100644
--- a/src/compiler/interpreter-assembler.h
+++ b/src/compiler/interpreter-assembler.h
@@ -12,7 +12,6 @@
 #include "src/builtins.h"
 #include "src/frames.h"
 #include "src/interpreter/bytecodes.h"
-#include "src/unique.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/js-builtin-reducer.cc
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc index 97e1de098c614827fe67af1305fc9e813ea381fb..eb24bc2b8aaff5d8c745b1d8d3456a84fde2b409 100644
--- a/src/compiler/js-builtin-reducer.cc
+++ b/src/compiler/js-builtin-reducer.cc
@@ -7,6 +7,7 @@
 #include "src/compiler/js-graph.h"
 #include "src/compiler/node-matchers.h"
 #include "src/compiler/node-properties.h"
+#include "src/objects-inl.h"
 #include "src/types.h"

 namespace v8 {
Index: src/compiler/js-context-specialization.cc
diff --git a/src/compiler/js-context-specialization.cc b/src/compiler/js-context-specialization.cc index 66780c2ac3834a1c829917c100236cf3e065d7c2..496d014546252282f99270137197f377c8cccaaa 100644
--- a/src/compiler/js-context-specialization.cc
+++ b/src/compiler/js-context-specialization.cc
@@ -10,6 +10,7 @@
 #include "src/compiler/node-matchers.h"
 #include "src/compiler/node-properties.h"
 #include "src/contexts.h"
+#include "src/objects-inl.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc index 34721c00660c146b5209d68dd0682382904a5215..436da4c7e5b518f3fdcd5ba6360c51a5bb98e5c8 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -11,7 +11,6 @@
 #include "src/compiler/node-matchers.h"
 #include "src/compiler/node-properties.h"
 #include "src/compiler/operator-properties.h"
-#include "src/unique.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/js-graph.h
diff --git a/src/compiler/js-graph.h b/src/compiler/js-graph.h
index a22a93f4f703567f6855bffa959e490241cba5fb..4f23773259df561aae3f1e1aec6496b7a4d60dde 100644
--- a/src/compiler/js-graph.h
+++ b/src/compiler/js-graph.h
@@ -11,6 +11,7 @@
 #include "src/compiler/js-operator.h"
 #include "src/compiler/machine-operator.h"
 #include "src/compiler/node-properties.h"
+#include "src/isolate.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index f7457e706d6874c49f3c7520b9bde05a6318402b..03e6384080ccba3dbb4b5b87a2065c78b4b0f036 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -6,6 +6,7 @@

 #include "src/ast.h"
 #include "src/ast-numbering.h"
+#include "src/compiler.h"
 #include "src/compiler/all-nodes.h"
 #include "src/compiler/ast-graph-builder.h"
 #include "src/compiler/common-operator.h"
Index: src/compiler/js-inlining.h
diff --git a/src/compiler/js-inlining.h b/src/compiler/js-inlining.h
index b075024dd372f440cfaf634a902f00613f2f0b41..21057e61e40612154c61f75e6d81614263eb770e 100644
--- a/src/compiler/js-inlining.h
+++ b/src/compiler/js-inlining.h
@@ -10,8 +10,13 @@

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

+// Forward declarations.
 class JSCallFunctionAccessor;

 class JSInliner final : public AdvancedReducer {
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc index 068dbec23f07c6c948b2d6ae8362bd059ff294bf..2b889b27ee9aa4b9685812e4ea2793528ae0ceeb 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -11,6 +11,8 @@
 #include "src/compiler/node-matchers.h"
 #include "src/compiler/node-properties.h"
 #include "src/compiler/operator-properties.h"
+#include "src/counters.h"
+#include "src/objects-inl.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index f96584a837ffc8d8ad022c5f9b825edb0bae17d7..3ab2a21977ec8b165eaeb1a6fd2d328eb421da34 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -9,11 +9,19 @@
 #include "src/base/lazy-instance.h"
 #include "src/compiler/opcodes.h"
 #include "src/compiler/operator.h"
+#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!
+#include "src/type-feedback-vector-inl.h"

 namespace v8 {
 namespace internal {
 namespace compiler {

+int VectorSlotPair::index() const {
+  Handle<TypeFeedbackVector> vector;
+  return vector_.ToHandle(&vector) ? vector->GetIndex(slot_) : -1;
+}
+
+
 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) {
   return lhs.slot() == rhs.slot() && lhs.vector() == rhs.vector();
 }
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index 0f4fd3572029a0e44931c3ff128b1c2dbb227c8c..c5e60709697356265f53ffd511abb9e918110e33 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -6,7 +6,6 @@
 #define V8_COMPILER_JS_OPERATOR_H_

 #include "src/runtime/runtime.h"
-#include "src/unique.h"

 namespace v8 {
 namespace internal {
@@ -30,10 +29,7 @@ class VectorSlotPair {
   MaybeHandle<TypeFeedbackVector> vector() const { return vector_; }
   FeedbackVectorICSlot slot() const { return slot_; }

-  int index() const {
-    Handle<TypeFeedbackVector> vector;
-    return vector_.ToHandle(&vector) ? vector->GetIndex(slot_) : -1;
-  }
+  int index() const;

  private:
   const MaybeHandle<TypeFeedbackVector> vector_;
Index: src/compiler/js-type-feedback-lowering.cc
diff --git a/src/compiler/js-type-feedback-lowering.cc b/src/compiler/js-type-feedback-lowering.cc index 2f106df21ea341a276e8bdc1f5cdb74904354375..7967b47c0fb853fec4e99a647a4a2348856093a3 100644
--- a/src/compiler/js-type-feedback-lowering.cc
+++ b/src/compiler/js-type-feedback-lowering.cc
@@ -7,6 +7,8 @@
 #include "src/compiler/access-builder.h"
 #include "src/compiler/js-graph.h"
 #include "src/compiler/node-properties.h"
+#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!
+#include "src/type-feedback-vector.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/node-matchers.h
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
index 054aee9c1a4fbb29959494ef3498b58b80dc7a78..3fe7db5e0dcc20d76933b57875f5923070e9100c 100644
--- a/src/compiler/node-matchers.h
+++ b/src/compiler/node-matchers.h
@@ -11,7 +11,6 @@
 #include "src/assembler.h"
 #include "src/compiler/node.h"
 #include "src/compiler/operator.h"
-#include "src/unique.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/raw-machine-assembler.h
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h index 994f0d9f09265be59ef49e8b256b89ebeb351dda..6e081ccaacd8f115ed3a7c697771eb25c4251158 100644
--- a/src/compiler/raw-machine-assembler.h
+++ b/src/compiler/raw-machine-assembler.h
@@ -12,6 +12,7 @@
 #include "src/compiler/machine-operator.h"
 #include "src/compiler/node.h"
 #include "src/compiler/operator.h"
+#include "src/factory.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/simplified-operator-reducer.cc
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc index e8e579202431c05b5c383199e86d0b11b39a3e21..30bf47e29363fb076b6685bc342dc5b7dd0820b0 100644
--- a/src/compiler/simplified-operator-reducer.cc
+++ b/src/compiler/simplified-operator-reducer.cc
@@ -8,6 +8,7 @@
 #include "src/compiler/machine-operator.h"
 #include "src/compiler/node-matchers.h"
 #include "src/compiler/operator-properties.h"
+#include "src/conversions-inl.h"

 namespace v8 {
 namespace internal {
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index a6c69bbd2e9810b2755d8ea6eb03aa05f57ab3a0..a51334b20d6117a1e25923fe7ee8cea21c66c3e0 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -13,6 +13,7 @@
 #include "src/compiler/node.h"
 #include "src/compiler/node-properties.h"
 #include "src/compiler/simplified-operator.h"
+#include "src/objects-inl.h"
 #include "src/zone-type-cache.h"

 namespace v8 {
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index 690fd045779fa7486282d88eed39b2ad21a061fb..10f47556d2252168d5097e1b75dedca88cbc5538 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -22,6 +22,7 @@
 #include "src/compiler/schedule.h"
 #include "src/compiler/simplified-operator.h"
 #include "src/ostreams.h"
+#include "src/types-inl.h"

 namespace v8 {
 namespace internal {
Index: src/frames-inl.h
diff --git a/src/frames-inl.h b/src/frames-inl.h
index e69bcd90338dd8f56fe7c87c5c5f0194f499ff38..cccd4d191a9b26d87d28311eef733969af887008 100644
--- a/src/frames-inl.h
+++ b/src/frames-inl.h
@@ -7,6 +7,7 @@

 #include "src/frames.h"
 #include "src/isolate.h"
+#include "src/objects-inl.h"
 #include "src/v8memory.h"

 #if V8_TARGET_ARCH_IA32
Index: src/unique.h
diff --git a/src/unique.h b/src/unique.h
index 68a45963b860ed8ff0d50e14f679ff2b5698e4a7..8805218b1ff280229ba7c938feeed0179cdb3a52 100644
--- a/src/unique.h
+++ b/src/unique.h
@@ -2,14 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.

-#ifndef V8_HYDROGEN_UNIQUE_H_
-#define V8_HYDROGEN_UNIQUE_H_
+#ifndef V8_UNIQUE_H_
+#define V8_UNIQUE_H_

 #include <ostream>  // NOLINT(readability/streams)

 #include "src/base/functional.h"
 #include "src/handles.h"
-#include "src/objects-inl.h"  // TODO(everyone): Fix our inl.h crap
 #include "src/utils.h"
 #include "src/zone.h"

@@ -358,4 +357,4 @@ class UniqueSet final : public ZoneObject {

 } }  // namespace v8::internal

-#endif  // V8_HYDROGEN_UNIQUE_H_
+#endif  // V8_UNIQUE_H_
Index: test/unittests/compiler/graph-unittest.cc
diff --git a/test/unittests/compiler/graph-unittest.cc b/test/unittests/compiler/graph-unittest.cc index 2b297100c2cd0cc94fd09687cc1a01c2f2aee129..991ecc2f7c2f5de94b9695e7b9852bef7fbed31d 100644
--- a/test/unittests/compiler/graph-unittest.cc
+++ b/test/unittests/compiler/graph-unittest.cc
@@ -5,6 +5,8 @@
 #include "test/unittests/compiler/graph-unittest.h"

 #include "src/compiler/node-properties.h"
+#include "src/factory.h"
+#include "src/objects-inl.h" // TODO(everyone): Make typer.h IWYU compliant.
 #include "test/unittests/compiler/node-test-utils.h"

 namespace v8 {
Index: test/unittests/compiler/interpreter-assembler-unittest.cc
diff --git a/test/unittests/compiler/interpreter-assembler-unittest.cc b/test/unittests/compiler/interpreter-assembler-unittest.cc index b4dfc4a59bad4918effffdd9c40f2c73bde4c6e9..e1d19338e7cbe0e6aecaedeef413a1ea8639952c 100644
--- a/test/unittests/compiler/interpreter-assembler-unittest.cc
+++ b/test/unittests/compiler/interpreter-assembler-unittest.cc
@@ -6,7 +6,7 @@

 #include "src/compiler/graph.h"
 #include "src/compiler/node.h"
-#include "src/unique.h"
+#include "src/isolate.h"
 #include "test/unittests/compiler/compiler-test-utils.h"
 #include "test/unittests/compiler/node-test-utils.h"

Index: test/unittests/compiler/machine-operator-reducer-unittest.cc
diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc index b14e9d392d8bb649376f8721de52f497c05568ab..8ca815be851a4485836226166b7839bd582b7194 100644
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc
@@ -7,6 +7,7 @@
 #include "src/compiler/js-graph.h"
 #include "src/compiler/machine-operator-reducer.h"
 #include "src/compiler/typer.h"
+#include "src/conversions-inl.h"
 #include "test/unittests/compiler/graph-unittest.h"
 #include "test/unittests/compiler/node-test-utils.h"
 #include "testing/gmock-support.h"
Index: test/unittests/compiler/node-test-utils.cc
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc index 7d91588cd2b07808cbcdb0b3fbe3cfae249558b0..d401532e826f22ef8e111c894c559280a89b1bf4 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -11,7 +11,7 @@
 #include "src/compiler/js-operator.h"
 #include "src/compiler/node-properties.h"
 #include "src/compiler/simplified-operator.h"
-#include "src/unique.h"
+#include "src/handles-inl.h"

 using testing::_;
 using testing::MakeMatcher;
Index: test/unittests/compiler/simplified-operator-reducer-unittest.cc
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc index b625d12888e0f0e41daa1d94b53fdbc6efeb94ce..79e530f22830a7291f3e5a9a6b168dd31848d0f3 100644
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc
@@ -7,7 +7,7 @@
 #include "src/compiler/node-properties.h"
 #include "src/compiler/simplified-operator.h"
 #include "src/compiler/simplified-operator-reducer.h"
-#include "src/conversions.h"
+#include "src/conversions-inl.h"
 #include "src/types.h"
 #include "test/unittests/compiler/graph-unittest.h"
 #include "test/unittests/compiler/node-test-utils.h"


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to