Bug 1239754 - Remove HashKeyRef now that all of its users are using stable hashing; r=jonco
authorTerrence Cole <terrence@mozilla.com>
Thu, 14 Jan 2016 15:00:20 -0800
changeset 280203 3d8d87127bc2383d2c9380f6af19b53752b9acf5
parent 280202 4ab1ae8a33797bbdfd1be68fdd81d4696e4d752a
child 280204 d7025fe68e90e96ab2da2dbcd7688c1aec45ee2f
push id29906
push userryanvm@gmail.com
push dateSun, 17 Jan 2016 19:40:11 +0000
treeherdermozilla-central@b92f5032b4fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1239754
milestone46.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 1239754 - Remove HashKeyRef now that all of its users are using stable hashing; r=jonco
js/src/gc/Marking.h
--- a/js/src/gc/Marking.h
+++ b/js/src/gc/Marking.h
@@ -408,37 +408,16 @@ ToMarkable(Cell* cell)
 // Return true if the pointer is nullptr, or if it is a tagged pointer to
 // nullptr.
 MOZ_ALWAYS_INLINE bool
 IsNullTaggedPointer(void* p)
 {
     return uintptr_t(p) <= LargestTaggedNullCellPointer;
 }
 
-// HashKeyRef represents a reference to a HashMap key. This should normally
-// be used through the HashTableWriteBarrierPost function.
-template <typename Map, typename Key>
-class HashKeyRef : public BufferableRef
-{
-    Map* map;
-    Key key;
-
-  public:
-    HashKeyRef(Map* m, const Key& k) : map(m), key(k) {}
-
-    void trace(JSTracer* trc) override {
-        Key prior = key;
-        typename Map::Ptr p = map->lookup(key);
-        if (!p)
-            return;
-        TraceManuallyBarrieredEdge(trc, &key, "HashKeyRef");
-        map->rekeyIfMoved(prior, key);
-    }
-};
-
 // Wrap a GC thing pointer into a new Value or jsid. The type system enforces
 // that the thing pointer is a wrappable type.
 template <typename S, typename T>
 struct RewrapTaggedPointer{};
 #define DECLARE_REWRAP(S, T, method, prefix) \
     template <> struct RewrapTaggedPointer<S, T> { \
         static S wrap(T thing) { return method ( prefix thing ); } \
     }