Remove many superfluous STL includes in headers.

Use grep to check for obviously unneeded includes. e.g. headers that
include <vector> but does not contain "std::vector".

Change-Id: I43a9e9f01e072fd495918d28ca4cdad5cfa0294c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3354400
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78613}
This commit is contained in:
Lei Zhang 2021-12-23 09:42:51 -08:00 committed by V8 LUCI CQ
parent e4eac0802c
commit 87cf0bdddf
43 changed files with 6 additions and 63 deletions

View File

@ -6,7 +6,6 @@
#define INCLUDE_CPPGC_DEFAULT_PLATFORM_H_
#include <memory>
#include <vector>
#include "cppgc/platform.h"
#include "libplatform/libplatform.h"

View File

@ -10,7 +10,6 @@
#include <memory>
#include <utility>
#include <vector>
#include "cppgc/common.h"
#include "v8-array-buffer.h" // NOLINT(build/include_directory)

View File

@ -5,8 +5,6 @@
#ifndef INCLUDE_V8_SNAPSHOT_H_
#define INCLUDE_V8_SNAPSHOT_H_
#include <vector>
#include "v8-internal.h" // NOLINT(build/include_directory)
#include "v8-local-handle.h" // NOLINT(build/include_directory)
#include "v8config.h" // NOLINT(build/include_directory)

View File

@ -11,10 +11,8 @@
#include <atomic>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "v8-internal.h" // NOLINT(build/include_directory)
#include "v8-local-handle.h" // NOLINT(build/include_directory)

View File

@ -19,7 +19,6 @@
#include <stdint.h>
#include <memory>
#include <vector>
#include "cppgc/common.h"
#include "v8-array-buffer.h" // NOLINT(build/include_directory)

View File

@ -6,7 +6,6 @@
#define V8_ASMJS_ASM_PARSER_H_
#include <memory>
#include <string>
#include "src/asmjs/asm-scanner.h"
#include "src/asmjs/asm-types.h"

View File

@ -5,7 +5,8 @@
#ifndef V8_BASE_VLQ_BASE64_H_
#define V8_BASE_VLQ_BASE64_H_
#include <string>
#include <stddef.h>
#include <stdint.h>
#include "src/base/base-export.h"

View File

@ -43,7 +43,6 @@
#include <stdio.h>
#include <memory>
#include <vector>
#include "src/base/numbers/double.h"
#include "src/base/small-vector.h"

View File

@ -6,10 +6,8 @@
#define V8_CODEGEN_ARM64_ASSEMBLER_ARM64_H_
#include <deque>
#include <list>
#include <map>
#include <memory>
#include <vector>
#include "src/base/optional.h"
#include "src/codegen/arm64/constants-arm64.h"

View File

@ -9,8 +9,6 @@
#ifndef V8_CODEGEN_ARM64_MACRO_ASSEMBLER_ARM64_H_
#define V8_CODEGEN_ARM64_MACRO_ASSEMBLER_ARM64_H_
#include <vector>
#include "src/base/bits.h"
#include "src/codegen/arm64/assembler-arm64.h"
#include "src/codegen/bailout-reason.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_CODEGEN_EXTERNAL_REFERENCE_TABLE_H_
#define V8_CODEGEN_EXTERNAL_REFERENCE_TABLE_H_
#include <vector>
#include "src/builtins/accessors.h"
#include "src/builtins/builtins.h"
#include "src/codegen/external-reference.h"

View File

@ -6,7 +6,6 @@
#define V8_COMPILER_DISPATCHER_LAZY_COMPILE_DISPATCHER_H_
#include <cstdint>
#include <map>
#include <memory>
#include <unordered_set>
#include <utility>

View File

@ -5,10 +5,8 @@
#ifndef V8_COMPILER_BACKEND_INSTRUCTION_H_
#define V8_COMPILER_BACKEND_INSTRUCTION_H_
#include <deque>
#include <iosfwd>
#include <map>
#include <set>
#include "src/base/compiler-specific.h"
#include "src/base/numbers/double.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
#define V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
#include <vector>
#include "src/handles/handles.h"
namespace v8 {

View File

@ -5,8 +5,6 @@
#ifndef V8_COMPILER_PROPERTY_ACCESS_BUILDER_H_
#define V8_COMPILER_PROPERTY_ACCESS_BUILDER_H_
#include <vector>
#include "src/base/optional.h"
#include "src/codegen/machine-type.h"
#include "src/compiler/js-heap-broker.h"

View File

@ -6,7 +6,6 @@
#define V8_COMPILER_ZONE_STATS_H_
#include <map>
#include <set>
#include <vector>
#include "src/common/globals.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_DEBUG_DEBUG_SCOPES_H_
#define V8_DEBUG_DEBUG_SCOPES_H_
#include <vector>
#include "src/debug/debug-frames.h"
#include "src/parsing/parse-info.h"

View File

@ -6,8 +6,6 @@
#define V8_DEBUG_INTERFACE_TYPES_H_
#include <cstdint>
#include <string>
#include <vector>
#include "include/v8-function-callback.h"
#include "include/v8-local-handle.h"

View File

@ -6,7 +6,7 @@
#define V8_DEBUG_WASM_GDB_SERVER_PACKET_H_
#include <string>
#include <vector>
#include "src/base/macros.h"
namespace v8 {

View File

@ -6,7 +6,7 @@
#define V8_DEBUG_WASM_GDB_SERVER_TRANSPORT_H_
#include <sstream>
#include <vector>
#include "src/base/macros.h"
#include "src/debug/wasm/gdb-server/gdb-remote-util.h"
@ -31,7 +31,6 @@ typedef int socklen_t;
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#include <string>
typedef int SocketHandle;

View File

@ -7,8 +7,6 @@
#include <stdint.h>
#include <map>
#include "include/v8-persistent-handle.h"
#include "src/base/atomicops.h"
#include "src/base/lazy-instance.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_FLAGS_FLAGS_H_
#define V8_FLAGS_FLAGS_H_
#include <vector>
#include "src/common/globals.h"
namespace v8 {

View File

@ -5,7 +5,6 @@
#ifndef V8_HEAP_CODE_OBJECT_REGISTRY_H_
#define V8_HEAP_CODE_OBJECT_REGISTRY_H_
#include <set>
#include <vector>
#include "src/base/macros.h"

View File

@ -7,7 +7,6 @@
#include <atomic>
#include <cmath>
#include <map>
#include <memory>
#include <unordered_map>
#include <unordered_set>

View File

@ -5,8 +5,6 @@
#ifndef V8_HEAP_INVALIDATED_SLOTS_INL_H_
#define V8_HEAP_INVALIDATED_SLOTS_INL_H_
#include <map>
#include "src/heap/invalidated-slots.h"
#include "src/heap/spaces.h"
#include "src/objects/objects-inl.h"

View File

@ -5,9 +5,6 @@
#ifndef V8_HEAP_LOCAL_FACTORY_H_
#define V8_HEAP_LOCAL_FACTORY_H_
#include <map>
#include <vector>
#include "src/base/logging.h"
#include "src/common/globals.h"
#include "src/handles/handles.h"

View File

@ -5,7 +5,6 @@
#define V8_HEAP_MARKING_WORKLIST_INL_H_
#include <unordered_map>
#include <vector>
#include "src/heap/cppgc-js/cpp-marking-state-inl.h"
#include "src/heap/marking-worklist.h"

View File

@ -6,7 +6,6 @@
#define V8_HEAP_NEW_SPACES_H_
#include <atomic>
#include <map>
#include <memory>
#include "src/base/macros.h"

View File

@ -7,7 +7,6 @@
#include <atomic>
#include <memory>
#include <vector>
#include "src/base/iterator.h"
#include "src/base/macros.h"

View File

@ -5,7 +5,6 @@
#ifndef V8_HEAP_SWEEPER_H_
#define V8_HEAP_SWEEPER_H_
#include <deque>
#include <map>
#include <vector>

View File

@ -32,11 +32,9 @@
#define V8_INSPECTOR_V8_RUNTIME_AGENT_IMPL_H_
#include <memory>
#include <set>
#include <unordered_map>
#include "include/v8-persistent-handle.h"
// #include "include/v8-function-callback.h"
#include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"

View File

@ -8,7 +8,6 @@
#include <cstdint>
#include <iosfwd>
#include <string>
#include <vector>
#include "src/common/globals.h"
#include "src/interpreter/bytecode-operands.h"

View File

@ -6,7 +6,6 @@
#define V8_OBJECTS_VALUE_SERIALIZER_H_
#include <cstdint>
#include <vector>
#include "include/v8-value-serializer.h"
#include "src/base/compiler-specific.h"

View File

@ -5,9 +5,7 @@
#ifndef V8_PARSING_PARSE_INFO_H_
#define V8_PARSING_PARSE_INFO_H_
#include <map>
#include <memory>
#include <vector>
#include "src/base/bit-field.h"
#include "src/base/export-template.h"

View File

@ -6,7 +6,6 @@
#define V8_PROFILER_PROFILER_LISTENER_H_
#include <memory>
#include <vector>
#include "include/v8-profiler.h"
#include "src/logging/code-events.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_SNAPSHOT_SERIALIZER_H_
#define V8_SNAPSHOT_SERIALIZER_H_
#include <map>
#include "src/codegen/external-reference-encoder.h"
#include "src/common/assert-scope.h"
#include "src/execution/isolate.h"

View File

@ -5,6 +5,8 @@
#ifndef V8_SNAPSHOT_SNAPSHOT_H_
#define V8_SNAPSHOT_SNAPSHOT_H_
#include <vector>
#include "include/v8-snapshot.h" // For StartupData.
#include "src/common/assert-scope.h"
#include "src/common/globals.h"

View File

@ -5,7 +5,6 @@
#ifndef V8_TORQUE_DECLARATION_VISITOR_H_
#define V8_TORQUE_DECLARATION_VISITOR_H_
#include <set>
#include <string>
#include "src/base/macros.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_TORQUE_KYTHE_DATA_H_
#define V8_TORQUE_KYTHE_DATA_H_
#include <map>
#include "src/torque/ast.h"
#include "src/torque/contextual.h"
#include "src/torque/global-context.h"

View File

@ -5,8 +5,6 @@
#ifndef V8_TORQUE_TYPE_VISITOR_H_
#define V8_TORQUE_TYPE_VISITOR_H_
#include <string>
#include "src/torque/ast.h"
#include "src/torque/types.h"

View File

@ -6,7 +6,6 @@
#define V8_TORQUE_TYPES_H_
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <vector>

View File

@ -10,7 +10,6 @@
#define V8_WASM_STREAMING_DECODER_H_
#include <memory>
#include <vector>
#include "src/base/macros.h"
#include "src/base/vector.h"

View File

@ -6,7 +6,6 @@
#define V8_WEB_SNAPSHOT_WEB_SNAPSHOT_H_
#include <queue>
#include <vector>
#include "src/handles/handles.h"
#include "src/objects/value-serializer.h"