include fixing: api.h shouldn't include objects-inl.h

Downside: this adds all kinds of weird includes in the .cc files.

(See design doc linked in the bug.)

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2622503002
Cr-Commit-Position: refs/heads/master@{#42140}
This commit is contained in:
marja 2017-01-09 05:43:28 -08:00 committed by Commit bot
parent 7256d90a35
commit 9c7b87269c
90 changed files with 102 additions and 11 deletions

View File

@ -4,6 +4,7 @@
#include "src/api-arguments.h"
#include "src/objects-inl.h"
#include "src/tracing/trace-event.h"
#include "src/vm-state-inl.h"

View File

@ -8,10 +8,11 @@
#include "src/api-experimental.h"
#include "include/v8.h"
#include "include/v8-experimental.h"
#include "include/v8.h"
#include "src/api.h"
#include "src/fast-accessor-assembler.h"
#include "src/objects-inl.h"
namespace {

View File

@ -11,7 +11,6 @@
#include "src/factory.h"
#include "src/isolate.h"
#include "src/list.h"
#include "src/objects-inl.h"
namespace v8 {

View File

@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/ast/ast.h"
#include "src/ast/ast-expression-rewriter.h"
#include "src/ast/ast.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "src/ast/ast-function-literal-id-reindexer.h"
#include "src/objects-inl.h"
#include "src/ast/ast.h"

View File

@ -6,6 +6,7 @@
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -6,6 +6,7 @@
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -7,6 +7,7 @@
#include "src/ast/ast-types.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
namespace v8 {

View File

@ -29,6 +29,7 @@
#include "src/api.h"
#include "src/char-predicates-inl.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/utils.h"

View File

@ -5,6 +5,7 @@
#include "src/ast/modules.h"
#include "src/ast/ast-value-factory.h"
#include "src/ast/scopes.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -10,6 +10,7 @@
#include "src/ast/scopes.h"
#include "src/base/platform/platform.h"
#include "src/globals.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -10,6 +10,8 @@
#include "src/ast/ast.h"
#include "src/bootstrapper.h"
#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/objects/scope-info.h"
#include "src/parsing/parse-info.h"
namespace v8 {

View File

@ -6,6 +6,7 @@
#include "src/ast/scopes.h"
#include "src/globals.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -9,6 +9,7 @@
#include "src/frames.h"
#include "src/handles-inl.h"
#include "src/heap/heap.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -17,6 +17,7 @@
#include "src/compiler/node-properties.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/state-values-utils.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -5,6 +5,7 @@
#include "src/compiler/ast-loop-assignment-analyzer.h"
#include "src/ast/scopes.h"
#include "src/compilation-info.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -11,6 +11,7 @@
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/zone/zone.h"
namespace v8 {

View File

@ -4,6 +4,8 @@
#include "src/compiler/control-builders.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {
namespace compiler {

View File

@ -6,6 +6,7 @@
#include "src/base/functional.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -10,6 +10,7 @@
#include "src/compiler/opcodes.h"
#include "src/compiler/operator.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/type-feedback-vector.h"
namespace v8 {

View File

@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/node-properties.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/verifier.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -7,6 +7,7 @@
#include "src/compiler/types.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
namespace v8 {

View File

@ -6,6 +6,7 @@
#include "src/field-type.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
namespace v8 {

View File

@ -32,6 +32,7 @@
#include "src/basic-block-profiler.h"
#include "src/interpreter/interpreter.h"
#include "src/msan.h"
#include "src/objects-inl.h"
#include "src/snapshot/natives.h"
#include "src/utils.h"
#include "src/v8.h"

View File

@ -7,6 +7,7 @@
#include "src/api.h"
#include "src/base/lazy-instance.h"
#include "src/elements.h"
#include "src/objects-inl.h"
#include "src/objects.h"
namespace v8 {

View File

@ -7,6 +7,7 @@
#include "src/api.h"
#include "src/handles.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -6,6 +6,7 @@
#include "src/ast/ast-types.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
namespace v8 {

View File

@ -12,6 +12,7 @@
#include "src/handles-inl.h"
#include "src/isolate.h"
#include "src/list-inl.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -6,6 +6,7 @@
#include "src/api.h"
#include "src/cancelable-task.h"
#include "src/objects-inl.h"
#include "src/v8.h"
#include "src/vm-state-inl.h"

View File

@ -5,6 +5,8 @@
#ifndef V8_HANDLES_H_
#define V8_HANDLES_H_
#include <type_traits>
#include "include/v8.h"
#include "src/base/functional.h"
#include "src/base/macros.h"
@ -91,11 +93,10 @@ class Handle final : public HandleBase {
public:
V8_INLINE explicit Handle(T** location = nullptr)
: HandleBase(reinterpret_cast<Object**>(location)) {
Object* a = nullptr;
T* b = nullptr;
a = b; // Fake assignment to enforce type checks.
USE(a);
// Type check:
static_assert(std::is_base_of<Object, T>::value, "static type violation");
}
V8_INLINE explicit Handle(T* object) : Handle(object, object->GetIsolate()) {}
V8_INLINE Handle(T* object, Isolate* isolate) : HandleBase(object, isolate) {}

View File

@ -10,6 +10,7 @@
#include "src/api.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "unicode/brkiter.h"
#include "unicode/calendar.h"
#include "unicode/coll.h"

View File

@ -9,6 +9,7 @@
#include "src/interpreter/bytecode-register.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/log.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -5,6 +5,7 @@
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-array-builder.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "src/interpreter/control-flow-builders.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -8,6 +8,7 @@
#include "src/base/bits.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
using v8::base::bits::CountTrailingZeros32;

View File

@ -4,9 +4,10 @@
#include "src/parsing/func-name-inferrer.h"
#include "src/ast/ast.h"
#include "src/ast/ast-value-factory.h"
#include "src/ast/ast.h"
#include "src/list-inl.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -4,9 +4,10 @@
#include "src/parsing/parameter-initializer-rewriter.h"
#include "src/ast/ast.h"
#include "src/ast/ast-traversal-visitor.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -16,6 +16,7 @@
#include "src/base/platform/platform.h"
#include "src/char-predicates-inl.h"
#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/parsing/duplicate-finder.h"
#include "src/parsing/parameter-initializer-rewriter.h"
#include "src/parsing/parse-info.h"

View File

@ -7,6 +7,7 @@
#include <memory>
#include "src/ast/ast.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parser.h"

View File

@ -4,6 +4,7 @@
#include "src/ast/ast.h"
#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/parsing/parameter-initializer-rewriter.h"
#include "src/parsing/parser.h"

View File

@ -6,6 +6,7 @@
#include "src/base/hashmap.h"
#include "src/base/logging.h"
#include "src/globals.h"
#include "src/objects-inl.h"
#include "src/parsing/parser.h"
#include "src/parsing/preparse-data-format.h"

View File

@ -6,6 +6,7 @@
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parser.h"

View File

@ -6,6 +6,7 @@
#include "src/field-type.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/ostreams.h"
namespace v8 {

View File

@ -5,6 +5,7 @@
#include "src/regexp/regexp-macro-assembler-tracer.h"
#include "src/ast/ast.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -10,6 +10,7 @@
#include "src/handles-inl.h"
#include "src/heap/heap.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/runtime/runtime-utils.h"
namespace v8 {

View File

@ -7,7 +7,7 @@
#include "src/base/logging.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -7,6 +7,8 @@
#include <memory>
#include "src/handles-inl.h"
#include "src/log.h"
#include "src/objects-inl.h"
#include "src/prototype.h"
namespace v8 {

View File

@ -14,6 +14,7 @@
#include "src/ast/scopes.h"
#include "src/base/platform/platform.h"
#include "src/compiler.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parser.h"
#include "src/v8.h"

View File

@ -5,6 +5,7 @@
#include "src/ast/scopes.h"
#include "src/compilation-info.h"
#include "src/compiler/ast-loop-assignment-analyzer.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parsing.h"
#include "src/parsing/rewriter.h"

View File

@ -10,6 +10,7 @@
#include "src/handles.h"
#include "src/interpreter/bytecode-array-builder.h"
#include "src/interpreter/interpreter.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "test/cctest/cctest.h"

View File

@ -5,6 +5,7 @@
#include "src/api.h"
#include "src/contexts.h"
#include "src/flags.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "test/cctest/compiler/function-tester.h"

View File

@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "src/api.h"
#include "src/objects-inl.h"
#include "test/cctest/compiler/function-tester.h"
namespace v8 {

View File

@ -30,6 +30,7 @@
#include "src/accessors.h"
#include "src/api.h"
#include "src/objects-inl.h"
#include "src/property.h"
#include "test/cctest/heap/heap-tester.h"
#include "test/cctest/heap/heap-utils.h"

View File

@ -6,6 +6,7 @@
#include "src/heap/array-buffer-tracker.h"
#include "src/heap/spaces.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-utils.h"

View File

@ -4,6 +4,8 @@
#include "test/cctest/interpreter/interpreter-tester.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {
namespace interpreter {

View File

@ -9,6 +9,7 @@
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/interpreter.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/interpreter/bytecode-expectations-printer.h"
#include "test/cctest/test-feedback-vector.h"

View File

@ -12,6 +12,7 @@
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/interpreter.h"
#include "src/objects-inl.h"
#include "src/unicode-cache.h"
#include "test/cctest/cctest.h"
#include "test/cctest/interpreter/interpreter-tester.h"

View File

@ -9,6 +9,7 @@
#include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/interpreter.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/interpreter/source-position-matcher.h"

View File

@ -13,6 +13,7 @@
#include "src/api.h"
#include "src/handles-inl.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"

View File

@ -6,6 +6,7 @@
// Scanner are in cctest/test-parsing.cc, rather than here.
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/parsing/scanner-character-streams.h"
#include "src/parsing/scanner.h"
#include "src/unicode-cache.h"

View File

@ -7,6 +7,7 @@
#include "include/v8-experimental.h"
#include "include/v8.h"
#include "src/api.h"
#include "src/objects-inl.h"
namespace i = v8::internal;

View File

@ -8,6 +8,7 @@
#include "include/v8-experimental.h"
#include "src/api.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
namespace {

View File

@ -30,6 +30,7 @@
#include "src/v8.h"
#include "src/ast/ast.h"
#include "src/objects-inl.h"
#include "src/zone/accounting-allocator.h"
#include "test/cctest/cctest.h"

View File

@ -35,6 +35,7 @@
#include "src/disasm.h"
#include "src/factory.h"
#include "src/interpreter/interpreter.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
using namespace v8::internal;

View File

@ -29,6 +29,7 @@
#include "src/factory.h"
#include "src/global-handles.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "test/cctest/cctest.h"

View File

@ -26,6 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/api.h"
#include "src/objects-inl.h"
#include "src/v8.h"
#include "test/cctest/cctest.h"

View File

@ -7,6 +7,7 @@
#include <utility>
#include "src/api.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/v8.h"

View File

@ -34,6 +34,7 @@
#include "src/compilation-cache.h"
#include "src/execution.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/unicode-inl.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"

View File

@ -36,6 +36,7 @@
#include "src/compilation-cache.h"
#include "src/execution.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/unicode-inl.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"

View File

@ -30,6 +30,7 @@
#include "src/v8.h"
#include "src/debug/liveedit.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"

View File

@ -36,6 +36,7 @@
#include "src/compilation-cache.h"
#include "src/execution.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/unicode-inl.h"
#include "src/utils.h"
#include "test/cctest/cctest.h"

View File

@ -37,6 +37,7 @@
#include "src/api.h"
#include "src/log-utils.h"
#include "src/log.h"
#include "src/objects-inl.h"
#include "src/profiler/cpu-profiler.h"
#include "src/snapshot/natives.h"
#include "src/utils.h"

View File

@ -6,6 +6,7 @@
#include "src/handles-inl.h"
#include "src/handles.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/v8.h"
#include "test/cctest/cctest.h"

View File

@ -40,6 +40,7 @@
#include "src/execution.h"
#include "src/flags.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parser.h"

View File

@ -29,6 +29,7 @@
#include "include/v8-profiler.h"
#include "src/api.h"
#include "src/objects-inl.h"
#include "src/profiler/cpu-profiler.h"
#include "src/profiler/profile-generator-inl.h"
#include "src/v8.h"

View File

@ -37,6 +37,7 @@
#include "src/api.h"
#include "src/factory.h"
#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/unicode-decoder.h"
#include "test/cctest/cctest.h"

View File

@ -27,6 +27,7 @@
#include "src/api.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/v8.h"
#include "test/cctest/cctest.h"

View File

@ -9,6 +9,7 @@
#include "src/api.h"
#include "src/heap/heap.h"
#include "src/objects-inl.h"
#include "src/objects.h"
using namespace v8::internal;

View File

@ -7,6 +7,7 @@
#include <stdint.h>
#include "include/v8.h"
#include "src/objects-inl.h"
#include "src/objects.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parsing.h"

View File

@ -8,6 +8,7 @@
#include "include/v8.h"
#include "src/api.h"
#include "src/objects-inl.h"
namespace v8 {
namespace internal {

View File

@ -10,6 +10,7 @@
#include "src/interpreter/bytecode-decoder.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/control-flow-builders.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -12,6 +12,7 @@
#include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/handles-inl.h"
#include "src/objects-inl.h"
#include "src/objects.h"
using testing::_;

View File

@ -8,6 +8,7 @@
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-register-allocator.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -6,6 +6,7 @@
#include "src/interpreter/bytecode-array-builder.h"
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -6,6 +6,7 @@
#include "src/interpreter/bytecode-array-builder.h"
#include "src/interpreter/bytecode-array-random-iterator.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -10,6 +10,7 @@
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/source-position-table.h"
#include "src/utils.h"
#include "test/unittests/interpreter/bytecode-utils.h"

View File

@ -6,6 +6,7 @@
#include "src/interpreter/bytecode-array-builder.h"
#include "src/interpreter/bytecode-register-allocator.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -8,6 +8,7 @@
#include "src/handles-inl.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {

View File

@ -10,6 +10,7 @@
#include "include/v8.h"
#include "src/api.h"
#include "src/base/build_config.h"
#include "src/objects-inl.h"
#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

View File

@ -36,6 +36,7 @@
#include "include/libplatform/libplatform.h"
#include "src/api.h"
#include "src/compiler.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
#include "src/parsing/parsing.h"
#include "src/parsing/preparse-data-format.h"