Reviewers: Michael Starzinger,
Description:
Reduce the number of #includes of compiler.h.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/917583004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+26, -21 lines):
M src/accessors.cc
M src/bit-vector.h
M src/compiler/js-context-specialization.h
M src/compiler/js-context-specialization.cc
M src/compiler/linkage.h
M src/hydrogen-gvn.h
M src/ia32/assembler-ia32.h
M src/serialize.h
M src/serialize.cc
M src/typing.h
M src/x64/assembler-x64.h
M src/x87/assembler-x87.h
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index
0e6a083910e01e5f5a089334b25b8546348805d3..02b96ca6ae696a26b1bbb0c63c07a2772e5aa022
100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -6,7 +6,6 @@
#include "src/accessors.h"
#include "src/api.h"
-#include "src/compiler.h"
#include "src/contexts.h"
#include "src/deoptimizer.h"
#include "src/execution.h"
Index: src/bit-vector.h
diff --git a/src/bit-vector.h b/src/bit-vector.h
index
9e1ce81db9047b921279d0b3da319b1a11a898fd..eeda0e91cb1501a40b3ee80edf5d32ab90d33113
100644
--- a/src/bit-vector.h
+++ b/src/bit-vector.h
@@ -5,11 +5,8 @@
#ifndef V8_DATAFLOW_H_
#define V8_DATAFLOW_H_
-#include "src/v8.h"
-
#include "src/allocation.h"
-#include "src/ast.h"
-#include "src/compiler.h"
+#include "src/zone.h"
namespace v8 {
namespace internal {
Index: src/compiler/js-context-specialization.cc
diff --git a/src/compiler/js-context-specialization.cc
b/src/compiler/js-context-specialization.cc
index
4416878de801dbfe4431e920388f8ca4c7742ebd..ffc8f1cfed5bf2abaaa160f3113d7a9d97c52d85
100644
--- a/src/compiler/js-context-specialization.cc
+++ b/src/compiler/js-context-specialization.cc
@@ -4,7 +4,6 @@
#include "src/compiler/js-context-specialization.h"
-#include "src/compiler.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-matchers.h"
Index: src/compiler/js-context-specialization.h
diff --git a/src/compiler/js-context-specialization.h
b/src/compiler/js-context-specialization.h
index
520a3cf80b9e60db4c2a4f5ed1c731032e74eeac..c524eb7b560f36da73d2920ed917f5d33a3094e4
100644
--- a/src/compiler/js-context-specialization.h
+++ b/src/compiler/js-context-specialization.h
@@ -9,8 +9,6 @@
#include "src/compiler/js-graph.h"
#include "src/contexts.h"
-#include "src/compiler.h"
-
namespace v8 {
namespace internal {
namespace compiler {
Index: src/compiler/linkage.h
diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h
index
5455b2ee69fe2f7d9953516c3dfbf08040afb26e..a3bdbf9d5bc84671a8441f1ca80c7a5c6c728c9f
100644
--- a/src/compiler/linkage.h
+++ b/src/compiler/linkage.h
@@ -9,6 +9,8 @@
#include "src/compiler/frame.h"
#include "src/compiler/machine-type.h"
#include "src/compiler/operator.h"
+#include "src/frames.h"
+#include "src/runtime/runtime.h"
#include "src/zone.h"
namespace v8 {
Index: src/hydrogen-gvn.h
diff --git a/src/hydrogen-gvn.h b/src/hydrogen-gvn.h
index
421c6cc103b8d76eade880204367eba0e3c4e3d0..d04a6eb3aa6029b2c32e121be5f413d1f0feeaea
100644
--- a/src/hydrogen-gvn.h
+++ b/src/hydrogen-gvn.h
@@ -7,7 +7,6 @@
#include <iosfwd>
-#include "src/compiler.h"
#include "src/hydrogen.h"
#include "src/hydrogen-instructions.h"
#include "src/zone.h"
Index: src/ia32/assembler-ia32.h
diff --git a/src/ia32/assembler-ia32.h b/src/ia32/assembler-ia32.h
index
71d894d8708730dfd353ae09195fa2ba49934838..d556e1bcada187df0e5f60ba7fa672423eb09c88
100644
--- a/src/ia32/assembler-ia32.h
+++ b/src/ia32/assembler-ia32.h
@@ -39,6 +39,7 @@
#include <deque>
+#include "src/assembler.h"
#include "src/isolate.h"
#include "src/serialize.h"
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index
b7277b5da563927fcd755ab97f7104feca1106e0..93882cbf0a9ba24b740eae0d87a9e7447d768658
100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -9,6 +9,7 @@
#include "src/base/platform/platform.h"
#include "src/bootstrapper.h"
#include "src/code-stubs.h"
+#include "src/compiler.h"
#include "src/deoptimizer.h"
#include "src/execution.h"
#include "src/global-handles.h"
@@ -2651,4 +2652,19 @@ Vector<const uint32_t>
SerializedCodeData::CodeStubKeys() const {
return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start),
GetHeaderValue(kNumCodeStubKeysOffset));
}
+
+
+SerializedCodeData::SerializedCodeData(ScriptData* data)
+ : SerializedData(const_cast<byte*>(data->data()), data->length()) {}
+
+
+SerializedCodeData* SerializedCodeData::FromCachedData(ScriptData*
cached_data,
+ String* source) {
+ DisallowHeapAllocation no_gc;
+ SerializedCodeData* scd = new SerializedCodeData(cached_data);
+ if (scd->IsSane(source)) return scd;
+ cached_data->Reject();
+ delete scd;
+ return NULL;
+}
} } // namespace v8::internal
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index
2b7f2ade9d79f6bbd02444feb0a40b4424cd4cec..ede57df5cc05d2015eb0b321199f33186851fdee
100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -5,7 +5,6 @@
#ifndef V8_SERIALIZE_H_
#define V8_SERIALIZE_H_
-#include "src/compiler.h"
#include "src/hashmap.h"
#include "src/heap-profiler.h"
#include "src/isolate.h"
@@ -14,6 +13,8 @@
namespace v8 {
namespace internal {
+class ScriptData;
+
// A TypeCode is used to distinguish different kinds of external reference.
// It is a single bit to make testing for types easy.
enum TypeCode {
@@ -931,14 +932,7 @@ class SerializedCodeData : public SerializedData {
public:
// Used when consuming.
static SerializedCodeData* FromCachedData(ScriptData* cached_data,
- String* source) {
- DisallowHeapAllocation no_gc;
- SerializedCodeData* scd = new SerializedCodeData(cached_data);
- if (scd->IsSane(source)) return scd;
- cached_data->Reject();
- delete scd;
- return NULL;
- }
+ String* source);
// Used when producing.
SerializedCodeData(const List<byte>& payload, const CodeSerializer& cs);
@@ -953,8 +947,7 @@ class SerializedCodeData : public SerializedData {
Vector<const uint32_t> CodeStubKeys() const;
private:
- explicit SerializedCodeData(ScriptData* data)
- : SerializedData(const_cast<byte*>(data->data()), data->length()) {}
+ explicit SerializedCodeData(ScriptData* data);
bool IsSane(String* source) const;
Index: src/typing.h
diff --git a/src/typing.h b/src/typing.h
index
b56c878ba8fc918601f8b52be7d78e093672884e..0ca92f3a42343b8549964350ae5251f30bf17225
100644
--- a/src/typing.h
+++ b/src/typing.h
@@ -9,7 +9,6 @@
#include "src/allocation.h"
#include "src/ast.h"
-#include "src/compiler.h"
#include "src/effects.h"
#include "src/scopes.h"
#include "src/type-info.h"
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index
330daf6490cec148186c7089d0dc3d66d602b35c..126de7aaae80a2d0256457f99705aa3078d98151
100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -39,6 +39,7 @@
#include <deque>
+#include "src/assembler.h"
#include "src/serialize.h"
namespace v8 {
Index: src/x87/assembler-x87.h
diff --git a/src/x87/assembler-x87.h b/src/x87/assembler-x87.h
index
94c814f493960a421a57a0cccef37c811775961e..fef6927b80d990b9a65748031963ad9c9f76df9e
100644
--- a/src/x87/assembler-x87.h
+++ b/src/x87/assembler-x87.h
@@ -37,6 +37,7 @@
#ifndef V8_X87_ASSEMBLER_X87_H_
#define V8_X87_ASSEMBLER_X87_H_
+#include "src/assembler.h"
#include "src/isolate.h"
#include "src/serialize.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.