Apparently unused method `static MovableCellHasher<JS::Heap<T>>::rekey(Key&, const Key&)`
Categories
(Core :: JavaScript: GC, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: jorendorff, Assigned: jonco)
Details
Attachments
(1 file)
template <typename T>
struct JS_PUBLIC_API MovableCellHasher<JS::Heap<T>> {
...
static void rekey(Key& k, const Key& newKey) { k.unsafeSet(newKey); }
};
I don't think there is an unsafeSet method on JS::Heap<T> (as opposed to JS::HeapPtr<T>). There is an unbarrieredSet method.
I tried changing it from unsafeSet to glooooooorp, and the engine still built fine, so I think this method is unused. searchfox also does not find any callers, although it's not super reliable around templates.
This came up because an embedder mentioned in chat that it doesn't look like it should compile, there not being an unsafeSet method on any relevant class.
| Assignee | ||
Comment 1•6 years ago
|
||
Originally we used to rekey our hash tables when GC things were moved but nowadays we generally use MovableCellHasher and key them on unique IDs that don't change when this happens.
Interestingly this exposed one place where the original rekeying strategy was still in use unnecessarily.
Updated•6 years ago
|
Comment 3•6 years ago
|
||
| bugherder | ||
Description
•