зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1784490 - Part 1: Remove unnecessary includes in js/src/builtin/intl. r=mgaudet
Remove unnecessary includes reported by IWYU, but don't bother with adding all missing includes, because that requires more effort to filter out invalid suggestions from IWYU. The added includes are only needed to avoid build breakage. Differential Revision: https://phabricator.services.mozilla.com/D154534
This commit is contained in:
Родитель
66a9f375c8
Коммит
5495534331
|
@ -19,7 +19,6 @@
|
|||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "builtin/intl/SharedIntlData.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/PropertySpec.h"
|
||||
#include "js/StableStringChars.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
#include "builtin/intl/CommonFunctions.h"
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Casting.h"
|
||||
#include "mozilla/intl/ICU4CGlue.h"
|
||||
#include "mozilla/intl/ICUError.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "gc/GCEnum.h"
|
||||
#include "gc/Zone.h"
|
||||
#include "gc/ZoneAllocator.h"
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_INTERNAL_INTL_ERROR
|
||||
#include "js/Value.h"
|
||||
|
@ -24,8 +22,9 @@
|
|||
#include "vm/JSObject.h"
|
||||
#include "vm/SelfHosting.h"
|
||||
#include "vm/Stack.h"
|
||||
#include "vm/StringType.h"
|
||||
|
||||
#include "vm/JSObject-inl.h"
|
||||
#include "gc/GCContext-inl.h"
|
||||
|
||||
bool js::intl::InitializeObject(JSContext* cx, JS::Handle<JSObject*> obj,
|
||||
JS::Handle<PropertyName*> initializer,
|
||||
|
|
|
@ -7,16 +7,12 @@
|
|||
#ifndef builtin_intl_CommonFunctions_h
|
||||
#define builtin_intl_CommonFunctions_h
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/Vector.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "js/Utility.h"
|
||||
|
||||
namespace mozilla::intl {
|
||||
enum class ICUError : uint8_t;
|
||||
|
@ -24,6 +20,8 @@ enum class ICUError : uint8_t;
|
|||
|
||||
namespace js {
|
||||
|
||||
class PropertyName;
|
||||
|
||||
namespace intl {
|
||||
|
||||
/**
|
||||
|
@ -93,7 +91,7 @@ struct OldStyleLanguageTagMapping {
|
|||
|
||||
extern const OldStyleLanguageTagMapping oldStyleLanguageTagMappings[5];
|
||||
|
||||
extern UniqueChars EncodeLocale(JSContext* cx, JSString* locale);
|
||||
extern JS::UniqueChars EncodeLocale(JSContext* cx, JSString* locale);
|
||||
|
||||
// The inline capacity we use for a Vector<char16_t>. Use this to ensure that
|
||||
// our uses of ICU string functions, below and elsewhere, will try to fill the
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
#include "builtin/intl/DateTimeFormat.h"
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/EnumSet.h"
|
||||
#include "mozilla/intl/Calendar.h"
|
||||
#include "mozilla/intl/DateIntervalFormat.h"
|
||||
#include "mozilla/intl/DateTimeFormat.h"
|
||||
#include "mozilla/intl/DateTimePart.h"
|
||||
#include "mozilla/intl/DateTimePatternGenerator.h"
|
||||
#include "mozilla/intl/Locale.h"
|
||||
#include "mozilla/intl/TimeZone.h"
|
||||
#include "mozilla/Range.h"
|
||||
|
@ -25,9 +23,7 @@
|
|||
#include "builtin/intl/FormatBuffer.h"
|
||||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "builtin/intl/SharedIntlData.h"
|
||||
#include "builtin/intl/TimeZoneDataGenerated.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/Date.h"
|
||||
#include "js/experimental/Intl.h" // JS::AddMozDateTimeFormatConstructor
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
|
|
|
@ -7,10 +7,8 @@
|
|||
#ifndef builtin_intl_DateTimeFormat_h
|
||||
#define builtin_intl_DateTimeFormat_h
|
||||
|
||||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "builtin/SelfHostingDefines.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
namespace mozilla::intl {
|
||||
|
|
|
@ -12,42 +12,33 @@
|
|||
#include "mozilla/intl/DisplayNames.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
|
||||
#include "jsnum.h"
|
||||
#include "jspubtd.h"
|
||||
|
||||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "builtin/intl/FormatBuffer.h"
|
||||
#include "builtin/intl/StringAsciiChars.h"
|
||||
#include "builtin/String.h"
|
||||
#include "gc/AllocKind.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CallArgs.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/experimental/Intl.h" // JS::AddMozDisplayNamesConstructor
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/GCVector.h"
|
||||
#include "js/PropertyAndElement.h" // JS_DefineFunctions, JS_DefineProperties
|
||||
#include "js/PropertyAndElement.h" // JS_DefineFunctions, JS_DefineProperties
|
||||
#include "js/PropertyDescriptor.h"
|
||||
#include "js/PropertySpec.h"
|
||||
#include "js/Result.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Utility.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/JSAtom.h"
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/JSObject.h"
|
||||
#include "vm/Printer.h"
|
||||
#include "vm/Runtime.h"
|
||||
#include "vm/SelfHosting.h"
|
||||
#include "vm/Stack.h"
|
||||
#include "vm/StaticStrings.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "vm/WellKnownAtom.h" // js_*_str
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include "js/Class.h" // JSClass, JSClassOps, js::ClassSpec
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Value.h"
|
||||
#include "vm/JSObject.h"
|
||||
#include "vm/List.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
struct JS_PUBLIC_API JSContext;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "mozilla/intl/Calendar.h"
|
||||
#include "mozilla/intl/Collator.h"
|
||||
#include "mozilla/intl/Currency.h"
|
||||
#include "mozilla/intl/Locale.h"
|
||||
#include "mozilla/intl/MeasureUnitGenerated.h"
|
||||
#include "mozilla/intl/TimeZone.h"
|
||||
|
||||
|
@ -22,19 +23,12 @@
|
|||
#include <string_view>
|
||||
|
||||
#include "builtin/Array.h"
|
||||
#include "builtin/intl/Collator.h"
|
||||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "builtin/intl/DateTimeFormat.h"
|
||||
#include "builtin/intl/FormatBuffer.h"
|
||||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "builtin/intl/NumberFormat.h"
|
||||
#include "builtin/intl/NumberingSystemsGenerated.h"
|
||||
#include "builtin/intl/PluralRules.h"
|
||||
#include "builtin/intl/RelativeTimeFormat.h"
|
||||
#include "builtin/intl/SharedIntlData.h"
|
||||
#include "builtin/intl/StringAsciiChars.h"
|
||||
#include "ds/Sort.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/GCAPI.h"
|
||||
|
@ -45,7 +39,6 @@
|
|||
#include "vm/GlobalObject.h"
|
||||
#include "vm/JSAtom.h"
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/JSObject.h"
|
||||
#include "vm/PlainObject.h" // js::PlainObject
|
||||
#include "vm/StringType.h"
|
||||
#include "vm/WellKnownAtom.h" // js_*_str
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef builtin_intl_IntlObject_h
|
||||
#define builtin_intl_IntlObject_h
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
namespace js {
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#include "builtin/intl/StringAsciiChars.h"
|
||||
#include "gc/Tracer.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/TracingAPI.h"
|
||||
#include "vm/JSContext.h"
|
||||
|
||||
namespace js {
|
||||
|
|
|
@ -12,12 +12,8 @@
|
|||
#include "mozilla/intl/Locale.h"
|
||||
#include "mozilla/Span.h"
|
||||
|
||||
#include "js/AllocPolicy.h"
|
||||
#include "js/GCAPI.h"
|
||||
#include "js/Result.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/Utility.h"
|
||||
#include "js/Vector.h"
|
||||
|
||||
struct JS_PUBLIC_API JSContext;
|
||||
class JSLinearString;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/intl/ListFormat.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -20,9 +19,6 @@
|
|||
#include "js/Vector.h"
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/PlainObject.h" // js::PlainObject
|
||||
#include "vm/Runtime.h" // js::ReportAllocationOverflow
|
||||
#include "vm/SelfHosting.h"
|
||||
#include "vm/Stack.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "vm/WellKnownAtom.h" // js_*_str
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "builtin/SelfHostingDefines.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Casting.h"
|
||||
#include "mozilla/intl/Locale.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <utility>
|
||||
|
@ -32,7 +30,6 @@
|
|||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Wrapper.h"
|
||||
#include "util/StringBuffer.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/PlainObject.h" // js::PlainObject
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "builtin/SelfHostingDefines.h"
|
||||
#include "js/Class.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
@ -36,20 +34,16 @@
|
|||
#include "builtin/intl/FormatBuffer.h"
|
||||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "builtin/intl/RelativeTimeFormat.h"
|
||||
#include "ds/Sort.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/PropertySpec.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Vector.h"
|
||||
#include "util/Text.h"
|
||||
#include "vm/BigIntType.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/PlainObject.h" // js::PlainObject
|
||||
#include "vm/SelfHosting.h"
|
||||
#include "vm/Stack.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "vm/WellKnownAtom.h" // js_*_str
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#ifndef builtin_intl_NumberFormat_h
|
||||
#define builtin_intl_NumberFormat_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "builtin/SelfHostingDefines.h"
|
||||
|
|
|
@ -10,13 +10,11 @@
|
|||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Casting.h"
|
||||
#include "mozilla/intl/NumberFormat.h"
|
||||
#include "mozilla/intl/PluralRules.h"
|
||||
|
||||
#include "builtin/Array.h"
|
||||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/PropertySpec.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/JSContext.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "builtin/SelfHostingDefines.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
namespace mozilla::intl {
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "builtin/intl/FormatBuffer.h"
|
||||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "gc/GCContext.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/friend/ErrorMessages.h" // js::GetErrorMessage, JSMSG_*
|
||||
#include "js/PropertySpec.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "gc/Barrier.h"
|
||||
#include "js/Class.h"
|
||||
#include "vm/NativeObject.h"
|
||||
#include "vm/Runtime.h"
|
||||
|
||||
namespace mozilla::intl {
|
||||
class RelativeTimeFormat;
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
|
||||
#include "builtin/Array.h"
|
||||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "builtin/intl/LanguageTag.h"
|
||||
#include "builtin/intl/TimeZoneDataGenerated.h"
|
||||
#include "builtin/String.h"
|
||||
#include "js/Utility.h"
|
||||
#include "js/Vector.h"
|
||||
#include "vm/ArrayObject.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "js/AllocPolicy.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/GCAPI.h"
|
||||
#include "js/GCHashTable.h"
|
||||
#include "js/Result.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче