Bug 1626587 - Part 4: Remove mozilla::IsPod for HashMapEntry. r=jwalden
authorAndré Bargull <andre.bargull@gmail.com>
Mon, 27 Apr 2020 12:00:48 +0000
changeset 526222 1e75de42137c533f4cc8919b6cd51cb14eaa379a
parent 526221 239b37c87f58f323922ec9e781d02d2be1984d1f
child 526223 915727863ba8fdccc7105611db2d665774d0eaf2
push id37353
push usershindli@mozilla.com
push dateMon, 27 Apr 2020 21:46:18 +0000
treeherdermozilla-central@2b0e2483e2ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1626587
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1626587 - Part 4: Remove mozilla::IsPod for HashMapEntry. r=jwalden The `mozilla::IsPod<HashMapEntry` specialisation was only needed for the static assertions in "js/src/frontend/NameCollections.h". Part 3 removed those, so we can now also remove `mozilla::IsPod<HashMapEntry`. Drive-by change: - Remove no longer needed "mozilla/PodOperations.h" include in mfbt/HashTable.h. - And then fix up previously transitively included files for RootingAPI.h, jsfriendapi.h, and Bench.cpp. Differential Revision: https://phabricator.services.mozilla.com/D69201
js/public/RootingAPI.h
js/src/jsfriendapi.h
mfbt/HashTable.h
xpcom/rust/gtest/bench-collections/Bench.cpp
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -4,16 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_RootingAPI_h
 #define js_RootingAPI_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/DebugOnly.h"
+#include "mozilla/EnumeratedArray.h"
 #include "mozilla/GuardObjects.h"
 #include "mozilla/LinkedList.h"
 #include "mozilla/Maybe.h"
 
 #include <type_traits>
 #include <utility>
 
 #include "jspubtd.h"
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -6,16 +6,17 @@
 
 #ifndef jsfriendapi_h
 #define jsfriendapi_h
 
 #include "mozilla/Atomics.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryReporting.h"
+#include "mozilla/PodOperations.h"
 #include "mozilla/UniquePtr.h"
 
 #include "jspubtd.h"
 
 #include "js/CallArgs.h"
 #include "js/CallNonGenericMethod.h"
 #include "js/CharacterEncoding.h"
 #include "js/Class.h"
--- a/mfbt/HashTable.h
+++ b/mfbt/HashTable.h
@@ -83,19 +83,17 @@
 #include "mozilla/Casting.h"
 #include "mozilla/HashFunctions.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryChecking.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Opaque.h"
 #include "mozilla/OperatorNewExtensions.h"
-#include "mozilla/PodOperations.h"
 #include "mozilla/ReentrancyGuard.h"
-#include "mozilla/TypeTraits.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/WrappingOperations.h"
 
 namespace mozilla {
 
 template <class>
 struct DefaultHasher;
 
@@ -921,20 +919,16 @@ class HashMapEntry {
   const Value& value() const { return value_; }
   Value& value() { return value_; }
 
  private:
   HashMapEntry(const HashMapEntry&) = delete;
   void operator=(const HashMapEntry&) = delete;
 };
 
-template <typename K, typename V>
-struct IsPod<HashMapEntry<K, V>>
-    : std::integral_constant<bool, IsPod<K>::value && IsPod<V>::value> {};
-
 namespace detail {
 
 template <class T, class HashPolicy, class AllocPolicy>
 class HashTable;
 
 template <typename T>
 class EntrySlot;
 
--- a/xpcom/rust/gtest/bench-collections/Bench.cpp
+++ b/xpcom/rust/gtest/bench-collections/Bench.cpp
@@ -43,16 +43,17 @@
 // Note that multiple processes are spawned, so `clgout` gets overwritten
 // multiple times, but the last process to write its profiling data to file is
 // the one of interest. (Alternatively, use --callgrind-out-file=clgout.%p to
 // get separate output files for each process, with a PID suffix.)
 
 #include "gtest/gtest.h"
 #include "gtest/MozGTestBench.h"  // For MOZ_GTEST_BENCH
 #include "mozilla/AllocPolicy.h"
+#include "mozilla/ArrayUtils.h"
 #include "mozilla/HashFunctions.h"
 #include "mozilla/HashTable.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/TimeStamp.h"
 #include "PLDHashTable.h"
 #include <unordered_set>
 
 using namespace mozilla;