Commit 87cf0bdd authored by Lei Zhang's avatar Lei Zhang Committed by V8 LUCI CQ

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/+/3354400Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78613}
parent e4eac080
......@@ -6,7 +6,6 @@
#define INCLUDE_CPPGC_DEFAULT_PLATFORM_H_
#include <memory>
#include <vector>
#include "cppgc/platform.h"
#include "libplatform/libplatform.h"
......
......@@ -10,7 +10,6 @@
#include <memory>
#include <utility>
#include <vector>
#include "cppgc/common.h"
#include "v8-array-buffer.h" // NOLINT(build/include_directory)
......
......@@ -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)
......
......@@ -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)
......
......@@ -19,7 +19,6 @@
#include <stdint.h>
#include <memory>
#include <vector>
#include "cppgc/common.h"
#include "v8-array-buffer.h" // NOLINT(build/include_directory)
......
......@@ -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"
......
......@@ -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"
......
......@@ -43,7 +43,6 @@
#include <stdio.h>
#include <memory>
#include <vector>
#include "src/base/numbers/double.h"
#include "src/base/small-vector.h"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -6,7 +6,6 @@
#define V8_COMPILER_DISPATCHER_LAZY_COMPILE_DISPATCHER_H_
#include <cstdint>
#include <map>
#include <memory>
#include <unordered_set>
#include <utility>
......
......@@ -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"
......
......@@ -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 {
......
......@@ -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"
......
......@@ -6,7 +6,6 @@
#define V8_COMPILER_ZONE_STATS_H_
#include <map>
#include <set>
#include <vector>
#include "src/common/globals.h"
......
......@@ -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"
......
......@@ -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"
......
......@@ -6,7 +6,7 @@
#define V8_DEBUG_WASM_GDB_SERVER_PACKET_H_
#include <string>
#include <vector>
#include "src/base/macros.h"
namespace v8 {
......
......@@ -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;
......
......@@ -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"
......
......@@ -5,8 +5,6 @@
#ifndef V8_FLAGS_FLAGS_H_
#define V8_FLAGS_FLAGS_H_
#include <vector>
#include "src/common/globals.h"
namespace v8 {
......
......@@ -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"
......
......@@ -7,7 +7,6 @@
#include <atomic>
#include <cmath>
#include <map>
#include <memory>
#include <unordered_map>
#include <unordered_set>
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -6,7 +6,6 @@
#define V8_HEAP_NEW_SPACES_H_
#include <atomic>
#include <map>
#include <memory>
#include "src/base/macros.h"
......
......@@ -7,7 +7,6 @@
#include <atomic>
#include <memory>
#include <vector>
#include "src/base/iterator.h"
#include "src/base/macros.h"
......
......@@ -5,7 +5,6 @@
#ifndef V8_HEAP_SWEEPER_H_
#define V8_HEAP_SWEEPER_H_
#include <deque>
#include <map>
#include <vector>
......
......@@ -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"
......
......@@ -8,7 +8,6 @@
#include <cstdint>
#include <iosfwd>
#include <string>
#include <vector>
#include "src/common/globals.h"
#include "src/interpreter/bytecode-operands.h"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -6,7 +6,6 @@
#define V8_TORQUE_TYPES_H_
#include <algorithm>
#include <map>
#include <set>
#include <string>
#include <vector>
......
......@@ -10,7 +10,6 @@
#define V8_WASM_STREAMING_DECODER_H_
#include <memory>
#include <vector>
#include "src/base/macros.h"
#include "src/base/vector.h"
......
......@@ -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"
......
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