Commit 8e7241fd authored by marja's avatar marja Committed by Commit bot

Include only stuff you need, part 6: Fix cctest.h.

Rebuilding (after touching certain files) is crazy slow because
includes are out of control. Many of these files we need to rebuild are
cctests which pull in more includes than they need.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2304553002
Cr-Commit-Position: refs/heads/master@{#39080}
parent c2369e9e
...@@ -105,6 +105,27 @@ void CcTest::Run() { ...@@ -105,6 +105,27 @@ void CcTest::Run() {
} }
} }
i::Heap* CcTest::heap() { return i_isolate()->heap(); }
v8::base::RandomNumberGenerator* CcTest::random_number_generator() {
return InitIsolateOnce()->random_number_generator();
}
v8::Local<v8::Object> CcTest::global() {
return isolate()->GetCurrentContext()->Global();
}
void CcTest::InitializeVM() {
CHECK(!v8::base::NoBarrier_Load(&isolate_used_));
CHECK(!initialize_called_);
initialize_called_ = true;
v8::HandleScope handle_scope(CcTest::isolate());
v8::Context::New(CcTest::isolate())->Enter();
}
void CcTest::TearDown() {
if (isolate_ != NULL) isolate_->Dispose();
}
v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions, v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions,
v8::Isolate* isolate) { v8::Isolate* isolate) {
...@@ -126,6 +147,47 @@ void CcTest::DisableAutomaticDispose() { ...@@ -126,6 +147,47 @@ void CcTest::DisableAutomaticDispose() {
disable_automatic_dispose_ = true; disable_automatic_dispose_ = true;
} }
LocalContext::~LocalContext() {
v8::HandleScope scope(isolate_);
v8::Local<v8::Context>::New(isolate_, context_)->Exit();
context_.Reset();
}
void LocalContext::Initialize(v8::Isolate* isolate,
v8::ExtensionConfiguration* extensions,
v8::Local<v8::ObjectTemplate> global_template,
v8::Local<v8::Value> global_object) {
v8::HandleScope scope(isolate);
v8::Local<v8::Context> context =
v8::Context::New(isolate, extensions, global_template, global_object);
context_.Reset(isolate, context);
context->Enter();
// We can't do this later perhaps because of a fatal error.
isolate_ = isolate;
}
// This indirection is needed because HandleScopes cannot be heap-allocated, and
// we don't want any unnecessary #includes in cctest.h.
class InitializedHandleScopeImpl {
public:
explicit InitializedHandleScopeImpl(i::Isolate* isolate)
: handle_scope_(isolate) {}
private:
i::HandleScope handle_scope_;
};
InitializedHandleScope::InitializedHandleScope()
: main_isolate_(CcTest::InitIsolateOnce()),
initialized_handle_scope_impl_(
new InitializedHandleScopeImpl(main_isolate_)) {}
InitializedHandleScope::~InitializedHandleScope() {}
HandleAndZoneScope::HandleAndZoneScope()
: main_zone_(new i::Zone(&allocator_)) {}
HandleAndZoneScope::~HandleAndZoneScope() {}
static void PrintTestList(CcTest* current) { static void PrintTestList(CcTest* current) {
if (current == NULL) return; if (current == NULL) return;
......
...@@ -28,11 +28,30 @@ ...@@ -28,11 +28,30 @@
#ifndef CCTEST_H_ #ifndef CCTEST_H_
#define CCTEST_H_ #define CCTEST_H_
#include <memory>
#include "include/libplatform/libplatform.h" #include "include/libplatform/libplatform.h"
#include "src/isolate-inl.h" // TODO(everyone): Make cctest IWYU. #include "include/v8-debug.h"
#include "src/objects-inl.h" // TODO(everyone): Make cctest IWYU. #include "src/base/accounting-allocator.h"
#include "src/utils.h"
#include "src/v8.h" #include "src/v8.h"
namespace v8 {
namespace base {
class RandomNumberGenerator;
} // namespace base
namespace internal {
class HandleScope;
class Zone;
} // namespace internal
} // namespace v8
#ifndef TEST #ifndef TEST
#define TEST(Name) \ #define TEST(Name) \
static void Test##Name(); \ static void Test##Name(); \
...@@ -104,17 +123,11 @@ class CcTest { ...@@ -104,17 +123,11 @@ class CcTest {
return reinterpret_cast<i::Isolate*>(isolate()); return reinterpret_cast<i::Isolate*>(isolate());
} }
static i::Heap* heap() { static i::Heap* heap();
return i_isolate()->heap();
}
static v8::base::RandomNumberGenerator* random_number_generator() { static v8::base::RandomNumberGenerator* random_number_generator();
return InitIsolateOnce()->random_number_generator();
}
static v8::Local<v8::Object> global() { static v8::Local<v8::Object> global();
return isolate()->GetCurrentContext()->Global();
}
static v8::ArrayBuffer::Allocator* array_buffer_allocator() { static v8::ArrayBuffer::Allocator* array_buffer_allocator() {
return allocator_; return allocator_;
...@@ -127,13 +140,7 @@ class CcTest { ...@@ -127,13 +140,7 @@ class CcTest {
// TODO(dcarney): Remove. // TODO(dcarney): Remove.
// This must be called first in a test. // This must be called first in a test.
static void InitializeVM() { static void InitializeVM();
CHECK(!v8::base::NoBarrier_Load(&isolate_used_));
CHECK(!initialize_called_);
initialize_called_ = true;
v8::HandleScope handle_scope(CcTest::isolate());
v8::Context::New(CcTest::isolate())->Enter();
}
// Only for UNINITIALIZED_TESTs // Only for UNINITIALIZED_TESTs
static void DisableAutomaticDispose(); static void DisableAutomaticDispose();
...@@ -144,9 +151,7 @@ class CcTest { ...@@ -144,9 +151,7 @@ class CcTest {
CcTestExtensionFlags extensions, CcTestExtensionFlags extensions,
v8::Isolate* isolate = CcTest::isolate()); v8::Isolate* isolate = CcTest::isolate());
static void TearDown() { static void TearDown();
if (isolate_ != NULL) isolate_->Dispose();
}
private: private:
friend int main(int argc, char** argv); friend int main(int argc, char** argv);
...@@ -269,11 +274,7 @@ class LocalContext { ...@@ -269,11 +274,7 @@ class LocalContext {
Initialize(CcTest::isolate(), extensions, global_template, global_object); Initialize(CcTest::isolate(), extensions, global_template, global_object);
} }
virtual ~LocalContext() { virtual ~LocalContext();
v8::HandleScope scope(isolate_);
v8::Local<v8::Context>::New(isolate_, context_)->Exit();
context_.Reset();
}
v8::Context* operator->() { v8::Context* operator->() {
return *reinterpret_cast<v8::Context**>(&context_); return *reinterpret_cast<v8::Context**>(&context_);
...@@ -288,17 +289,7 @@ class LocalContext { ...@@ -288,17 +289,7 @@ class LocalContext {
private: private:
void Initialize(v8::Isolate* isolate, v8::ExtensionConfiguration* extensions, void Initialize(v8::Isolate* isolate, v8::ExtensionConfiguration* extensions,
v8::Local<v8::ObjectTemplate> global_template, v8::Local<v8::ObjectTemplate> global_template,
v8::Local<v8::Value> global_object) { v8::Local<v8::Value> global_object);
v8::HandleScope scope(isolate);
v8::Local<v8::Context> context = v8::Context::New(isolate,
extensions,
global_template,
global_object);
context_.Reset(isolate, context);
context->Enter();
// We can't do this later perhaps because of a fatal error.
isolate_ = isolate;
}
v8::Persistent<v8::Context> context_; v8::Persistent<v8::Context> context_;
v8::Isolate* isolate_; v8::Isolate* isolate_;
...@@ -567,32 +558,33 @@ static inline void EmptyMessageQueues(v8::Isolate* isolate) { ...@@ -567,32 +558,33 @@ static inline void EmptyMessageQueues(v8::Isolate* isolate) {
} }
} }
class InitializedHandleScopeImpl;
class InitializedHandleScope { class InitializedHandleScope {
public: public:
InitializedHandleScope() InitializedHandleScope();
: main_isolate_(CcTest::InitIsolateOnce()), ~InitializedHandleScope();
handle_scope_(main_isolate_) {}
// Prefixing the below with main_ reduces a lot of naming clashes. // Prefixing the below with main_ reduces a lot of naming clashes.
i::Isolate* main_isolate() { return main_isolate_; } i::Isolate* main_isolate() { return main_isolate_; }
private: private:
i::Isolate* main_isolate_; i::Isolate* main_isolate_;
i::HandleScope handle_scope_; std::unique_ptr<InitializedHandleScopeImpl> initialized_handle_scope_impl_;
}; };
class HandleAndZoneScope : public InitializedHandleScope { class HandleAndZoneScope : public InitializedHandleScope {
public: public:
HandleAndZoneScope() : main_zone_(&allocator_) {} HandleAndZoneScope();
~HandleAndZoneScope();
// Prefixing the below with main_ reduces a lot of naming clashes. // Prefixing the below with main_ reduces a lot of naming clashes.
i::Zone* main_zone() { return &main_zone_; } i::Zone* main_zone() { return main_zone_.get(); }
private: private:
v8::base::AccountingAllocator allocator_; v8::base::AccountingAllocator allocator_;
i::Zone main_zone_; std::unique_ptr<i::Zone> main_zone_;
}; };
#endif // ifndef CCTEST_H_ #endif // ifndef CCTEST_H_
...@@ -98,6 +98,23 @@ v8::Local<v8::Message> FunctionTester::CheckThrowsReturnMessage( ...@@ -98,6 +98,23 @@ v8::Local<v8::Message> FunctionTester::CheckThrowsReturnMessage(
return try_catch.Message(); return try_catch.Message();
} }
void FunctionTester::CheckCall(Handle<Object> expected, Handle<Object> a,
Handle<Object> b, Handle<Object> c,
Handle<Object> d) {
Handle<Object> result = Call(a, b, c, d).ToHandleChecked();
CHECK(expected->SameValue(*result));
}
Handle<JSFunction> FunctionTester::NewFunction(const char* source) {
return Handle<JSFunction>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Function>::Cast(CompileRun(source))));
}
Handle<JSObject> FunctionTester::NewObject(const char* source) {
return Handle<JSObject>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(CompileRun(source))));
}
Handle<String> FunctionTester::Val(const char* string) { Handle<String> FunctionTester::Val(const char* string) {
return isolate->factory()->InternalizeUtf8String(string); return isolate->factory()->InternalizeUtf8String(string);
} }
...@@ -130,6 +147,16 @@ Handle<Object> FunctionTester::false_value() { ...@@ -130,6 +147,16 @@ Handle<Object> FunctionTester::false_value() {
return isolate->factory()->false_value(); return isolate->factory()->false_value();
} }
Handle<JSFunction> FunctionTester::ForMachineGraph(Graph* graph,
int param_count) {
JSFunction* p = NULL;
{ // because of the implicit handle scope of FunctionTester.
FunctionTester f(graph, param_count);
p = *f.function;
}
return Handle<JSFunction>(p); // allocated in outer handle scope.
}
Handle<JSFunction> FunctionTester::Compile(Handle<JSFunction> function) { Handle<JSFunction> FunctionTester::Compile(Handle<JSFunction> function) {
Zone zone(function->GetIsolate()->allocator()); Zone zone(function->GetIsolate()->allocator());
ParseInfo parse_info(&zone, function); ParseInfo parse_info(&zone, function);
......
...@@ -43,10 +43,7 @@ class FunctionTester : public InitializedHandleScope { ...@@ -43,10 +43,7 @@ class FunctionTester : public InitializedHandleScope {
v8::Local<v8::Message> CheckThrowsReturnMessage(Handle<Object> a, v8::Local<v8::Message> CheckThrowsReturnMessage(Handle<Object> a,
Handle<Object> b); Handle<Object> b);
void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b, void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b,
Handle<Object> c, Handle<Object> d) { Handle<Object> c, Handle<Object> d);
Handle<Object> result = Call(a, b, c, d).ToHandleChecked();
CHECK(expected->SameValue(*result));
}
void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b, void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b,
Handle<Object> c) { Handle<Object> c) {
...@@ -96,15 +93,8 @@ class FunctionTester : public InitializedHandleScope { ...@@ -96,15 +93,8 @@ class FunctionTester : public InitializedHandleScope {
CheckCall(false_value(), Val(a), Val(b)); CheckCall(false_value(), Val(a), Val(b));
} }
Handle<JSFunction> NewFunction(const char* source) { Handle<JSFunction> NewFunction(const char* source);
return Handle<JSFunction>::cast(v8::Utils::OpenHandle( Handle<JSObject> NewObject(const char* source);
*v8::Local<v8::Function>::Cast(CompileRun(source))));
}
Handle<JSObject> NewObject(const char* source) {
return Handle<JSObject>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Object>::Cast(CompileRun(source))));
}
Handle<String> Val(const char* string); Handle<String> Val(const char* string);
Handle<Object> Val(double value); Handle<Object> Val(double value);
...@@ -116,14 +106,7 @@ class FunctionTester : public InitializedHandleScope { ...@@ -116,14 +106,7 @@ class FunctionTester : public InitializedHandleScope {
Handle<Object> true_value(); Handle<Object> true_value();
Handle<Object> false_value(); Handle<Object> false_value();
static Handle<JSFunction> ForMachineGraph(Graph* graph, int param_count) { static Handle<JSFunction> ForMachineGraph(Graph* graph, int param_count);
JSFunction* p = NULL;
{ // because of the implicit handle scope of FunctionTester.
FunctionTester f(graph, param_count);
p = *f.function;
}
return Handle<JSFunction>(p); // allocated in outer handle scope.
}
private: private:
uint32_t flags_; uint32_t flags_;
......
...@@ -5,6 +5,14 @@ ...@@ -5,6 +5,14 @@
#include "src/assembler.h" #include "src/assembler.h"
#include "src/compiler/js-graph.h" #include "src/compiler/js-graph.h"
#include "src/compiler/node-properties.h" #include "src/compiler/node-properties.h"
#include "src/factory.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h" #include "test/cctest/compiler/value-helper.h"
......
...@@ -11,6 +11,13 @@ ...@@ -11,6 +11,13 @@
#include "src/compiler/operator-properties.h" #include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h" #include "src/compiler/simplified-operator.h"
#include "src/compiler/typer.h" #include "src/compiler/typer.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/objects-inl.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/api.h"
#include "src/contexts.h"
#include "src/flags.h"
#include "src/objects.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/objects-inl.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/objects-inl.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/isolate.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
#if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM) || \ #if defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM) || \
defined(V8_TARGET_ARCH_ARM64) defined(V8_TARGET_ARCH_ARM64)
#include "src/flags.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/unicode-cache.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/api.h"
#include "test/cctest/compiler/function-tester.h" #include "test/cctest/compiler/function-tester.h"
namespace v8 { namespace v8 {
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/api.h"
#include "src/heap/array-buffer-tracker.h" #include "src/heap/array-buffer-tracker.h"
#include "src/isolate.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
......
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/factory.h"
#include "src/heap/mark-compact.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-tester.h" #include "test/cctest/heap/heap-tester.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#include "src/heap/heap.h" #include "src/heap/heap.h"
#include "src/heap/spaces.h" #include "src/heap/spaces.h"
#include "src/heap/spaces-inl.h" #include "src/heap/spaces-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
namespace v8 { namespace v8 {
......
...@@ -2,7 +2,17 @@ ...@@ -2,7 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/factory.h"
#include "src/heap/array-buffer-tracker.h" #include "src/heap/array-buffer-tracker.h"
#include "src/heap/spaces-inl.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
#include <stdlib.h> #include <stdlib.h>
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/heap/spaces-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/snapshot/snapshot.h" #include "src/snapshot/snapshot.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "src/libsampler/sampler.h" #include "src/libsampler/sampler.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/base/platform/time.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/api.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/vm-state.h" #include "src/vm-state.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/factory.h" #include "src/factory.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
namespace { namespace {
......
...@@ -4,8 +4,17 @@ ...@@ -4,8 +4,17 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/list.h" #include "src/list.h"
#include "src/objects.h" #include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
namespace v8 { namespace v8 {
......
...@@ -2,7 +2,16 @@ ...@@ -2,7 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects.h" #include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -27,9 +27,20 @@ ...@@ -27,9 +27,20 @@
#include <stdlib.h> #include <stdlib.h>
#include "src/v8.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/conversions.h"
#include "src/factory.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "src/unicode-cache.h"
#include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -25,9 +25,10 @@ ...@@ -25,9 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/v8.h" #include "src/date.h"
#include "src/global-handles.h" #include "src/global-handles.h"
#include "src/isolate.h"
#include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap.h" #include "src/heap/heap.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "src/flags.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -25,8 +25,11 @@ ...@@ -25,8 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/api.h"
#include "src/factory.h"
#include "src/global-handles.h" #include "src/global-handles.h"
#include "src/isolate.h"
#include "src/objects.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -2,11 +2,19 @@ ...@@ -2,11 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/v8.h" #include "src/factory.h"
#include "src/identity-map.h" #include "src/identity-map.h"
#include "src/isolate.h"
#include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "src/v8.h"
#include "src/zone.h" #include "src/zone.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
namespace v8 { namespace v8 {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "src/list-inl.h"
#include "src/list.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
#include <cmath> #include <cmath>
#endif // __linux__ #endif // __linux__
#include "src/v8.h" #include "src/api.h"
#include "src/log.h"
#include "src/log-utils.h" #include "src/log-utils.h"
#include "src/log.h"
#include "src/profiler/cpu-profiler.h" #include "src/profiler/cpu-profiler.h"
#include "src/snapshot/natives.h" #include "src/snapshot/natives.h"
#include "src/utils.h" #include "src/utils.h"
#include "src/v8.h"
#include "src/v8threads.h" #include "src/v8threads.h"
#include "src/version.h" #include "src/version.h"
#include "src/vm-state-inl.h" #include "src/vm-state-inl.h"
......
...@@ -25,6 +25,16 @@ ...@@ -25,6 +25,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/factory.h"
#include "src/heap/heap.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/factory.h"
#include "src/handles-inl.h"
#include "src/handles.h"
#include "src/isolate.h"
#include "src/objects.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
// //
// Tests of profiles generator and utilities. // Tests of profiles generator and utilities.
#include "src/v8.h"
#include "include/v8-profiler.h" #include "include/v8-profiler.h"
#include "src/api.h"
#include "src/profiler/cpu-profiler.h" #include "src/profiler/cpu-profiler.h"
#include "src/profiler/profile-generator-inl.h" #include "src/profiler/profile-generator-inl.h"
#include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/profiler-extension.h" #include "test/cctest/profiler-extension.h"
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/flags.h"
#include "src/isolate.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <map> #include <map>
#include <string> #include <string>
#include "include/v8.h" #include "include/v8.h"
#include "src/flags.h"
#include "src/simulator.h" #include "src/simulator.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -4,8 +4,17 @@ ...@@ -4,8 +4,17 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects.h" #include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/ostreams.h" #include "src/ostreams.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -30,10 +30,18 @@ ...@@ -30,10 +30,18 @@
// of ConsStrings. These operations may not be very fast, but they // of ConsStrings. These operations may not be very fast, but they
// should be possible without getting errors due to too deep recursion. // should be possible without getting errors due to too deep recursion.
#include "src/v8.h" #include "src/factory.h"
#include "src/isolate.h"
#include "src/objects.h" #include "src/objects.h"
#include "src/ostreams.h" #include "src/ostreams.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/api.h"
#include "src/isolate.h"
#include "src/v8.h" #include "src/v8.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/list-inl.h"
class ThreadIdValidationThread : public v8::base::Thread { class ThreadIdValidationThread : public v8::base::Thread {
public: public:
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
#include "src/factory.h" #include "src/factory.h"
#include "src/field-type.h" #include "src/field-type.h"
#include "src/global-handles.h" #include "src/global-handles.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/field-type.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/transitions.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -5,7 +5,17 @@ ...@@ -5,7 +5,17 @@
#include <vector> #include <vector>
#include "src/crankshaft/hydrogen-types.h" #include "src/crankshaft/hydrogen-types.h"
#include "src/factory.h"
#include "src/heap/heap.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/types.h" #include "src/types.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/types-fuzz.h" #include "test/cctest/types-fuzz.h"
......
...@@ -32,6 +32,13 @@ ...@@ -32,6 +32,13 @@
#include "src/crankshaft/unique.h" #include "src/crankshaft/unique.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/global-handles.h" #include "src/global-handles.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/collector.h" #include "src/collector.h"
#include "src/conversions.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using namespace v8::internal; using namespace v8::internal;
......
...@@ -29,7 +29,16 @@ ...@@ -29,7 +29,16 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/factory.h"
#include "src/global-handles.h" #include "src/global-handles.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
......
...@@ -29,7 +29,16 @@ ...@@ -29,7 +29,16 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/factory.h"
#include "src/global-handles.h" #include "src/global-handles.h"
#include "src/isolate.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h" #include "test/cctest/heap/heap-utils.h"
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#define V8_TEST_CCTEST_TYPES_H_ #define V8_TEST_CCTEST_TYPES_H_
#include "src/base/utils/random-number-generator.h" #include "src/base/utils/random-number-generator.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/v8.h" #include "src/v8.h"
namespace v8 { namespace v8 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment