From 58109a2c5038fbbb208904d4edfc0a7a758928c3 Mon Sep 17 00:00:00 2001 From: mstarzinger Date: Tue, 11 Aug 2015 00:34:10 -0700 Subject: [PATCH] Remove several grab-bag includes from the v8.h header. This is the first step of turning the v8.h file into a normal header instead of an include-the-world header. The new rule is that no other header files are allowed to include v8.h, which is enforced by DEPS. Also the number of includes inside the v8.h file has been drastically reduced. Basically the last missing piece is the inclusion of the big objects-inl.h file. This in turn makes many headers follow the IWYU principle. R=bmeurer@chromium.org,hpayer@chromium.org,titzer@chromium.org Review URL: https://codereview.chromium.org/1282503003 Cr-Commit-Position: refs/heads/master@{#30102} --- src/DEPS | 6 ++++++ src/accessors.h | 3 +++ src/api.cc | 1 + src/api.h | 3 +-- src/arm/lithium-gap-resolver-arm.h | 2 -- src/arm64/constants-arm64.h | 2 ++ src/arm64/disasm-arm64.h | 2 -- src/arm64/lithium-gap-resolver-arm64.h | 2 -- src/arm64/simulator-arm64.h | 2 -- src/arm64/utils-arm64.h | 1 - src/assembler.h | 4 +--- src/ast-literal-reindexer.h | 2 -- src/ast.h | 2 -- src/basic-block-profiler.h | 3 ++- src/compiler.cc | 1 + src/compiler/basic-block-instrumentor.h | 1 + src/d8.h | 2 +- src/deoptimizer.h | 2 -- src/effects.h | 2 -- src/expression-classifier.h | 2 -- src/extensions/externalize-string-extension.cc | 4 ++++ src/extensions/externalize-string-extension.h | 2 +- src/extensions/free-buffer-extension.h | 2 +- src/extensions/gc-extension.h | 3 ++- src/extensions/statistics-extension.cc | 2 ++ src/extensions/statistics-extension.h | 2 +- src/extensions/trigger-failure-extension.h | 2 +- src/full-codegen/full-codegen.h | 2 -- src/gdb-jit.h | 2 +- src/globals.h | 2 ++ src/hydrogen-instructions.h | 2 -- src/hydrogen.h | 2 -- src/i18n.cc | 3 +++ src/i18n.h | 2 +- src/ia32/lithium-gap-resolver-ia32.h | 2 -- src/json-parser.h | 2 -- src/json-stringifier.h | 2 -- src/lithium-allocator.h | 2 -- src/lithium-codegen.h | 2 -- src/mips/lithium-gap-resolver-mips.h | 2 -- src/mips64/lithium-gap-resolver-mips64.h | 2 -- src/objects-inl.h | 1 + src/ppc/lithium-gap-resolver-ppc.h | 2 -- src/preparser.h | 2 -- src/regexp-macro-assembler-irregexp-inl.h | 9 ++------- src/regexp-macro-assembler-irregexp.h | 1 + src/string-builder.h | 3 ++- src/typing.h | 2 -- src/v8.h | 18 ++---------------- src/x64/lithium-gap-resolver-x64.h | 2 -- src/x87/lithium-gap-resolver-x87.h | 2 -- 51 files changed, 46 insertions(+), 87 deletions(-) diff --git a/src/DEPS b/src/DEPS index 021cd3bf2..37becca77 100644 --- a/src/DEPS +++ b/src/DEPS @@ -13,6 +13,12 @@ include_rules = [ ] specific_include_rules = { + ".*\.h": [ + # Note that src/v8.h is the top header for some .cc files, it shouldn't be + # included in any .h files though. In the long run we should make src/v8.h + # act like any normal header file, instead of a grab-bag include. + "-src/v8.h", + ], "d8\.cc": [ "+include/libplatform/libplatform.h", ], diff --git a/src/accessors.h b/src/accessors.h index 227af745b..41397be79 100644 --- a/src/accessors.h +++ b/src/accessors.h @@ -5,8 +5,11 @@ #ifndef V8_ACCESSORS_H_ #define V8_ACCESSORS_H_ +#include "include/v8.h" #include "src/allocation.h" #include "src/globals.h" +#include "src/handles.h" +#include "src/property-details.h" namespace v8 { namespace internal { diff --git a/src/api.cc b/src/api.cc index 107e168bd..dc81900d9 100644 --- a/src/api.cc +++ b/src/api.cc @@ -50,6 +50,7 @@ #include "src/snapshot/natives.h" #include "src/snapshot/snapshot.h" #include "src/unicode-inl.h" +#include "src/v8.h" #include "src/v8threads.h" #include "src/version.h" #include "src/vm-state-inl.h" diff --git a/src/api.h b/src/api.h index fc7a4eff6..608faee80 100644 --- a/src/api.h +++ b/src/api.h @@ -5,13 +5,12 @@ #ifndef V8_API_H_ #define V8_API_H_ -#include "src/v8.h" - #include "include/v8-testing.h" #include "src/contexts.h" #include "src/factory.h" #include "src/isolate.h" #include "src/list-inl.h" +#include "src/objects-inl.h" namespace v8 { diff --git a/src/arm/lithium-gap-resolver-arm.h b/src/arm/lithium-gap-resolver-arm.h index 55206d3e6..88f1a7bb6 100644 --- a/src/arm/lithium-gap-resolver-arm.h +++ b/src/arm/lithium-gap-resolver-arm.h @@ -5,8 +5,6 @@ #ifndef V8_ARM_LITHIUM_GAP_RESOLVER_ARM_H_ #define V8_ARM_LITHIUM_GAP_RESOLVER_ARM_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/arm64/constants-arm64.h b/src/arm64/constants-arm64.h index fc7bef69e..c5dbc9758 100644 --- a/src/arm64/constants-arm64.h +++ b/src/arm64/constants-arm64.h @@ -5,6 +5,8 @@ #ifndef V8_ARM64_CONSTANTS_ARM64_H_ #define V8_ARM64_CONSTANTS_ARM64_H_ +#include "src/base/macros.h" +#include "src/globals.h" // Assert that this is an LP64 system. STATIC_ASSERT(sizeof(int) == sizeof(int32_t)); // NOLINT(runtime/sizeof) diff --git a/src/arm64/disasm-arm64.h b/src/arm64/disasm-arm64.h index 8cd3b80db..c6b189bf9 100644 --- a/src/arm64/disasm-arm64.h +++ b/src/arm64/disasm-arm64.h @@ -5,8 +5,6 @@ #ifndef V8_ARM64_DISASM_ARM64_H #define V8_ARM64_DISASM_ARM64_H -#include "src/v8.h" - #include "src/arm64/decoder-arm64.h" #include "src/arm64/instructions-arm64.h" #include "src/globals.h" diff --git a/src/arm64/lithium-gap-resolver-arm64.h b/src/arm64/lithium-gap-resolver-arm64.h index 2eb651b92..8866db4c9 100644 --- a/src/arm64/lithium-gap-resolver-arm64.h +++ b/src/arm64/lithium-gap-resolver-arm64.h @@ -5,8 +5,6 @@ #ifndef V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ #define V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ -#include "src/v8.h" - #include "src/arm64/delayed-masm-arm64.h" #include "src/lithium.h" diff --git a/src/arm64/simulator-arm64.h b/src/arm64/simulator-arm64.h index 64fceb345..44769283d 100644 --- a/src/arm64/simulator-arm64.h +++ b/src/arm64/simulator-arm64.h @@ -8,8 +8,6 @@ #include #include -#include "src/v8.h" - #include "src/allocation.h" #include "src/arm64/assembler-arm64.h" #include "src/arm64/decoder-arm64.h" diff --git a/src/arm64/utils-arm64.h b/src/arm64/utils-arm64.h index eee614d28..da91fd5d6 100644 --- a/src/arm64/utils-arm64.h +++ b/src/arm64/utils-arm64.h @@ -6,7 +6,6 @@ #define V8_ARM64_UTILS_ARM64_H_ #include -#include "src/v8.h" #include "src/arm64/constants-arm64.h" diff --git a/src/assembler.h b/src/assembler.h index ae78cd282..937d7e9c4 100644 --- a/src/assembler.h +++ b/src/assembler.h @@ -35,12 +35,10 @@ #ifndef V8_ASSEMBLER_H_ #define V8_ASSEMBLER_H_ -#include "src/v8.h" - #include "src/allocation.h" #include "src/builtins.h" -#include "src/gdb-jit.h" #include "src/isolate.h" +#include "src/objects-inl.h" #include "src/runtime/runtime.h" #include "src/token.h" diff --git a/src/ast-literal-reindexer.h b/src/ast-literal-reindexer.h index 59b214fec..9e445129a 100644 --- a/src/ast-literal-reindexer.h +++ b/src/ast-literal-reindexer.h @@ -5,8 +5,6 @@ #ifndef V8_AST_LITERAL_REINDEXER #define V8_AST_LITERAL_REINDEXER -#include "src/v8.h" - #include "src/ast.h" #include "src/scopes.h" diff --git a/src/ast.h b/src/ast.h index b9e79270d..0df99adfa 100644 --- a/src/ast.h +++ b/src/ast.h @@ -5,8 +5,6 @@ #ifndef V8_AST_H_ #define V8_AST_H_ -#include "src/v8.h" - #include "src/assembler.h" #include "src/ast-value-factory.h" #include "src/bailout-reason.h" diff --git a/src/basic-block-profiler.h b/src/basic-block-profiler.h index 0f7b15533..2e7ac9c80 100644 --- a/src/basic-block-profiler.h +++ b/src/basic-block-profiler.h @@ -8,8 +8,9 @@ #include #include #include +#include -#include "src/v8.h" +#include "src/base/macros.h" namespace v8 { namespace internal { diff --git a/src/compiler.cc b/src/compiler.cc index ede006c04..f4787cd15 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -19,6 +19,7 @@ #include "src/gdb-jit.h" #include "src/hydrogen.h" #include "src/lithium.h" +#include "src/log-inl.h" #include "src/messages.h" #include "src/parser.h" #include "src/prettyprinter.h" diff --git a/src/compiler/basic-block-instrumentor.h b/src/compiler/basic-block-instrumentor.h index 353b0c2ba..32dd82ade 100644 --- a/src/compiler/basic-block-instrumentor.h +++ b/src/compiler/basic-block-instrumentor.h @@ -5,6 +5,7 @@ #ifndef V8_COMPILER_BASIC_BLOCK_INSTRUMENTOR_H_ #define V8_COMPILER_BASIC_BLOCK_INSTRUMENTOR_H_ +#include "src/allocation.h" #include "src/basic-block-profiler.h" namespace v8 { diff --git a/src/d8.h b/src/d8.h index 7dd750187..58107eb1d 100644 --- a/src/d8.h +++ b/src/d8.h @@ -9,7 +9,7 @@ #include "src/allocation.h" #include "src/hashmap.h" #include "src/list.h" -#include "src/v8.h" +#include "src/objects-inl.h" #else #include "include/v8.h" #include "src/base/compiler-specific.h" diff --git a/src/deoptimizer.h b/src/deoptimizer.h index db94eb07a..68587abaf 100644 --- a/src/deoptimizer.h +++ b/src/deoptimizer.h @@ -5,8 +5,6 @@ #ifndef V8_DEOPTIMIZER_H_ #define V8_DEOPTIMIZER_H_ -#include "src/v8.h" - #include "src/allocation.h" #include "src/macro-assembler.h" diff --git a/src/effects.h b/src/effects.h index 9481bb887..e18baeafd 100644 --- a/src/effects.h +++ b/src/effects.h @@ -5,8 +5,6 @@ #ifndef V8_EFFECTS_H_ #define V8_EFFECTS_H_ -#include "src/v8.h" - #include "src/types.h" namespace v8 { diff --git a/src/expression-classifier.h b/src/expression-classifier.h index 716d4c7a3..17a377890 100644 --- a/src/expression-classifier.h +++ b/src/expression-classifier.h @@ -5,8 +5,6 @@ #ifndef V8_EXPRESSION_CLASSIFIER_H #define V8_EXPRESSION_CLASSIFIER_H -#include "src/v8.h" - #include "src/messages.h" #include "src/scanner.h" #include "src/token.h" diff --git a/src/extensions/externalize-string-extension.cc b/src/extensions/externalize-string-extension.cc index aedfb5e93..3eaa70e51 100644 --- a/src/extensions/externalize-string-extension.cc +++ b/src/extensions/externalize-string-extension.cc @@ -4,6 +4,10 @@ #include "src/extensions/externalize-string-extension.h" +#include "src/api.h" +#include "src/handles.h" +#include "src/isolate.h" + namespace v8 { namespace internal { diff --git a/src/extensions/externalize-string-extension.h b/src/extensions/externalize-string-extension.h index dc23ffd2d..009e81849 100644 --- a/src/extensions/externalize-string-extension.h +++ b/src/extensions/externalize-string-extension.h @@ -5,7 +5,7 @@ #ifndef V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_ #define V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_ -#include "src/v8.h" +#include "include/v8.h" namespace v8 { namespace internal { diff --git a/src/extensions/free-buffer-extension.h b/src/extensions/free-buffer-extension.h index d62ed02b8..bb1418c4a 100644 --- a/src/extensions/free-buffer-extension.h +++ b/src/extensions/free-buffer-extension.h @@ -5,7 +5,7 @@ #ifndef V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_ #define V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_ -#include "src/v8.h" +#include "include/v8.h" namespace v8 { namespace internal { diff --git a/src/extensions/gc-extension.h b/src/extensions/gc-extension.h index 2462bd960..91433911c 100644 --- a/src/extensions/gc-extension.h +++ b/src/extensions/gc-extension.h @@ -5,7 +5,8 @@ #ifndef V8_EXTENSIONS_GC_EXTENSION_H_ #define V8_EXTENSIONS_GC_EXTENSION_H_ -#include "src/v8.h" +#include "include/v8.h" +#include "src/utils.h" namespace v8 { namespace internal { diff --git a/src/extensions/statistics-extension.cc b/src/extensions/statistics-extension.cc index eb0fed80d..495167695 100644 --- a/src/extensions/statistics-extension.cc +++ b/src/extensions/statistics-extension.cc @@ -4,6 +4,8 @@ #include "src/extensions/statistics-extension.h" +#include "src/v8.h" + namespace v8 { namespace internal { diff --git a/src/extensions/statistics-extension.h b/src/extensions/statistics-extension.h index 8149e44af..5dac4097b 100644 --- a/src/extensions/statistics-extension.h +++ b/src/extensions/statistics-extension.h @@ -5,7 +5,7 @@ #ifndef V8_EXTENSIONS_STATISTICS_EXTENSION_H_ #define V8_EXTENSIONS_STATISTICS_EXTENSION_H_ -#include "src/v8.h" +#include "include/v8.h" namespace v8 { namespace internal { diff --git a/src/extensions/trigger-failure-extension.h b/src/extensions/trigger-failure-extension.h index c01b37d3e..4b10bdc88 100644 --- a/src/extensions/trigger-failure-extension.h +++ b/src/extensions/trigger-failure-extension.h @@ -5,7 +5,7 @@ #ifndef V8_EXTENSIONS_TRIGGER_FAILURE_EXTENSION_H_ #define V8_EXTENSIONS_TRIGGER_FAILURE_EXTENSION_H_ -#include "src/v8.h" +#include "include/v8.h" namespace v8 { namespace internal { diff --git a/src/full-codegen/full-codegen.h b/src/full-codegen/full-codegen.h index 5406ccd1f..897d55e05 100644 --- a/src/full-codegen/full-codegen.h +++ b/src/full-codegen/full-codegen.h @@ -5,8 +5,6 @@ #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ -#include "src/v8.h" - #include "src/allocation.h" #include "src/assert-scope.h" #include "src/ast.h" diff --git a/src/gdb-jit.h b/src/gdb-jit.h index 45382702d..b915e71eb 100644 --- a/src/gdb-jit.h +++ b/src/gdb-jit.h @@ -5,7 +5,7 @@ #ifndef V8_GDB_JIT_H_ #define V8_GDB_JIT_H_ -#include "src/v8.h" +#include "include/v8.h" // // GDB has two ways of interacting with JIT code. With the "JIT compilation diff --git a/src/globals.h b/src/globals.h index 41edb3083..5f1070382 100644 --- a/src/globals.h +++ b/src/globals.h @@ -515,6 +515,8 @@ enum VisitMode { // Flag indicating whether code is built into the VM (one of the natives files). enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; +// JavaScript defines two kinds of 'nil'. +enum NilValue { kNullValue, kUndefinedValue }; // ParseRestriction is used to restrict the set of valid statements in a // unit of compilation. Restriction violations cause a syntax error. diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 7a2367cba..3f1b3b4e1 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -8,8 +8,6 @@ #include #include -#include "src/v8.h" - #include "src/allocation.h" #include "src/base/bits.h" #include "src/bit-vector.h" diff --git a/src/hydrogen.h b/src/hydrogen.h index 0790d74a2..bfb67aaed 100644 --- a/src/hydrogen.h +++ b/src/hydrogen.h @@ -5,8 +5,6 @@ #ifndef V8_HYDROGEN_H_ #define V8_HYDROGEN_H_ -#include "src/v8.h" - #include "src/accessors.h" #include "src/allocation.h" #include "src/ast.h" diff --git a/src/i18n.cc b/src/i18n.cc index c10890e89..7899f2937 100644 --- a/src/i18n.cc +++ b/src/i18n.cc @@ -5,6 +5,9 @@ #include "src/i18n.h" +#include "src/api.h" +#include "src/factory.h" +#include "src/isolate.h" #include "unicode/brkiter.h" #include "unicode/calendar.h" #include "unicode/coll.h" diff --git a/src/i18n.h b/src/i18n.h index a50c43a42..98c4af7f2 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -6,7 +6,7 @@ #ifndef V8_I18N_H_ #define V8_I18N_H_ -#include "src/v8.h" +#include "src/handles.h" #include "unicode/uversion.h" namespace U_ICU_NAMESPACE { diff --git a/src/ia32/lithium-gap-resolver-ia32.h b/src/ia32/lithium-gap-resolver-ia32.h index fc87a8e25..d36e78b5f 100644 --- a/src/ia32/lithium-gap-resolver-ia32.h +++ b/src/ia32/lithium-gap-resolver-ia32.h @@ -5,8 +5,6 @@ #ifndef V8_IA32_LITHIUM_GAP_RESOLVER_IA32_H_ #define V8_IA32_LITHIUM_GAP_RESOLVER_IA32_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/json-parser.h b/src/json-parser.h index 7be799b0e..078afcbb7 100644 --- a/src/json-parser.h +++ b/src/json-parser.h @@ -5,8 +5,6 @@ #ifndef V8_JSON_PARSER_H_ #define V8_JSON_PARSER_H_ -#include "src/v8.h" - #include "src/char-predicates-inl.h" #include "src/conversions.h" #include "src/messages.h" diff --git a/src/json-stringifier.h b/src/json-stringifier.h index 1ba99c1e9..e79d2ebc1 100644 --- a/src/json-stringifier.h +++ b/src/json-stringifier.h @@ -5,8 +5,6 @@ #ifndef V8_JSON_STRINGIFIER_H_ #define V8_JSON_STRINGIFIER_H_ -#include "src/v8.h" - #include "src/conversions.h" #include "src/messages.h" #include "src/string-builder.h" diff --git a/src/lithium-allocator.h b/src/lithium-allocator.h index 2a8080011..7c9477245 100644 --- a/src/lithium-allocator.h +++ b/src/lithium-allocator.h @@ -5,8 +5,6 @@ #ifndef V8_LITHIUM_ALLOCATOR_H_ #define V8_LITHIUM_ALLOCATOR_H_ -#include "src/v8.h" - #include "src/allocation.h" #include "src/lithium.h" #include "src/zone.h" diff --git a/src/lithium-codegen.h b/src/lithium-codegen.h index fddc1b259..ce04da900 100644 --- a/src/lithium-codegen.h +++ b/src/lithium-codegen.h @@ -5,8 +5,6 @@ #ifndef V8_LITHIUM_CODEGEN_H_ #define V8_LITHIUM_CODEGEN_H_ -#include "src/v8.h" - #include "src/bailout-reason.h" #include "src/compiler.h" #include "src/deoptimizer.h" diff --git a/src/mips/lithium-gap-resolver-mips.h b/src/mips/lithium-gap-resolver-mips.h index ab950559c..7374da772 100644 --- a/src/mips/lithium-gap-resolver-mips.h +++ b/src/mips/lithium-gap-resolver-mips.h @@ -5,8 +5,6 @@ #ifndef V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_ #define V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/mips64/lithium-gap-resolver-mips64.h b/src/mips64/lithium-gap-resolver-mips64.h index ab950559c..7374da772 100644 --- a/src/mips64/lithium-gap-resolver-mips64.h +++ b/src/mips64/lithium-gap-resolver-mips64.h @@ -5,8 +5,6 @@ #ifndef V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_ #define V8_MIPS_LITHIUM_GAP_RESOLVER_MIPS_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/objects-inl.h b/src/objects-inl.h index 991253fd6..9e4b55212 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -28,6 +28,7 @@ #include "src/prototype.h" #include "src/transitions-inl.h" #include "src/type-feedback-vector-inl.h" +#include "src/types-inl.h" #include "src/v8memory.h" namespace v8 { diff --git a/src/ppc/lithium-gap-resolver-ppc.h b/src/ppc/lithium-gap-resolver-ppc.h index 1b006db6a..7741080e5 100644 --- a/src/ppc/lithium-gap-resolver-ppc.h +++ b/src/ppc/lithium-gap-resolver-ppc.h @@ -5,8 +5,6 @@ #ifndef V8_PPC_LITHIUM_GAP_RESOLVER_PPC_H_ #define V8_PPC_LITHIUM_GAP_RESOLVER_PPC_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/preparser.h b/src/preparser.h index 91e37912d..7bf084587 100644 --- a/src/preparser.h +++ b/src/preparser.h @@ -5,8 +5,6 @@ #ifndef V8_PREPARSER_H #define V8_PREPARSER_H -#include "src/v8.h" - #include "src/bailout-reason.h" #include "src/expression-classifier.h" #include "src/func-name-inferrer.h" diff --git a/src/regexp-macro-assembler-irregexp-inl.h b/src/regexp-macro-assembler-irregexp-inl.h index 942cf5752..294fd2b24 100644 --- a/src/regexp-macro-assembler-irregexp-inl.h +++ b/src/regexp-macro-assembler-irregexp-inl.h @@ -2,17 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// A light-weight assembler for the Irregexp byte code. - - -#include "src/v8.h" +#ifndef V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ +#define V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ #include "src/ast.h" #include "src/bytecodes-irregexp.h" -#ifndef V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ -#define V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ - namespace v8 { namespace internal { diff --git a/src/regexp-macro-assembler-irregexp.h b/src/regexp-macro-assembler-irregexp.h index 781defc29..644873339 100644 --- a/src/regexp-macro-assembler-irregexp.h +++ b/src/regexp-macro-assembler-irregexp.h @@ -12,6 +12,7 @@ namespace internal { #ifdef V8_INTERPRETED_REGEXP +// A light-weight assembler for the Irregexp byte code. class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { public: // Create an assembler. Instructions and relocation information are emitted diff --git a/src/string-builder.h b/src/string-builder.h index 531466532..63a5a5580 100644 --- a/src/string-builder.h +++ b/src/string-builder.h @@ -5,7 +5,8 @@ #ifndef V8_STRING_BUILDER_H_ #define V8_STRING_BUILDER_H_ -#include "src/v8.h" +#include "src/objects-inl.h" +#include "src/utils.h" namespace v8 { namespace internal { diff --git a/src/typing.h b/src/typing.h index f9442e600..f3ead18f9 100644 --- a/src/typing.h +++ b/src/typing.h @@ -5,8 +5,6 @@ #ifndef V8_TYPING_H_ #define V8_TYPING_H_ -#include "src/v8.h" - #include "src/allocation.h" #include "src/ast.h" #include "src/effects.h" diff --git a/src/v8.h b/src/v8.h index c516cacdf..23e1a1230 100644 --- a/src/v8.h +++ b/src/v8.h @@ -27,19 +27,10 @@ // Basic includes #include "include/v8.h" -#include "include/v8-platform.h" -#include "src/checks.h" // NOLINT -#include "src/allocation.h" // NOLINT -#include "src/assert-scope.h" // NOLINT -#include "src/utils.h" // NOLINT -#include "src/flags.h" // NOLINT -#include "src/globals.h" // NOLINT +#include "src/allocation.h" // Objects -#include "src/objects-inl.h" // NOLINT -#include "src/log-inl.h" // NOLINT -#include "src/handles-inl.h" // NOLINT -#include "src/types-inl.h" // NOLINT +#include "src/objects-inl.h" namespace v8 { namespace internal { @@ -80,11 +71,6 @@ class V8 : public AllStatic { static v8::Platform* platform_; }; - -// JavaScript defines two kinds of 'nil'. -enum NilValue { kNullValue, kUndefinedValue }; - - } } // namespace v8::internal #endif // V8_V8_H_ diff --git a/src/x64/lithium-gap-resolver-x64.h b/src/x64/lithium-gap-resolver-x64.h index da257e707..7882da56e 100644 --- a/src/x64/lithium-gap-resolver-x64.h +++ b/src/x64/lithium-gap-resolver-x64.h @@ -5,8 +5,6 @@ #ifndef V8_X64_LITHIUM_GAP_RESOLVER_X64_H_ #define V8_X64_LITHIUM_GAP_RESOLVER_X64_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { diff --git a/src/x87/lithium-gap-resolver-x87.h b/src/x87/lithium-gap-resolver-x87.h index 5dfef8ad0..cdd26b877 100644 --- a/src/x87/lithium-gap-resolver-x87.h +++ b/src/x87/lithium-gap-resolver-x87.h @@ -5,8 +5,6 @@ #ifndef V8_X87_LITHIUM_GAP_RESOLVER_X87_H_ #define V8_X87_LITHIUM_GAP_RESOLVER_X87_H_ -#include "src/v8.h" - #include "src/lithium.h" namespace v8 { -- 2.34.1