Reduce the number of #includes of compiler.h.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/917583004

Cr-Commit-Position: refs/heads/master@{#26589}
This commit is contained in:
titzer 2015-02-11 07:49:02 -08:00 committed by Commit bot
parent 4c345754b1
commit 02fc74ea63
12 changed files with 26 additions and 21 deletions

View File

@ -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"

View File

@ -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 {

View File

@ -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"

View File

@ -9,8 +9,6 @@
#include "src/compiler/js-graph.h"
#include "src/contexts.h"
#include "src/compiler.h"
namespace v8 {
namespace internal {
namespace compiler {

View File

@ -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 {

View File

@ -7,7 +7,6 @@
#include <iosfwd>
#include "src/compiler.h"
#include "src/hydrogen.h"
#include "src/hydrogen-instructions.h"
#include "src/zone.h"

View File

@ -39,6 +39,7 @@
#include <deque>
#include "src/assembler.h"
#include "src/isolate.h"
#include "src/serialize.h"

View File

@ -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

View File

@ -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;

View File

@ -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"

View File

@ -39,6 +39,7 @@
#include <deque>
#include "src/assembler.h"
#include "src/serialize.h"
namespace v8 {

View File

@ -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"