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 322106 3d8d87127bc2383d2c9380f6af19b53752b9acf5
parent 322105 4ab1ae8a33797bbdfd1be68fdd81d4696e4d752a
child 322107 d7025fe68e90e96ab2da2dbcd7688c1aec45ee2f
push id9530
push userdmitchell@mozilla.com
push dateFri, 15 Jan 2016 19:42:24 +0000
reviewersjonco
bugs1239754
milestone46.0a1
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 ); } \
     }