Closed Bug 1187517 Opened 10 years ago Closed 10 years ago

Factor out whether an entry needs rekeying into yet another template parameter for TraceableHashMap

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: fitzgen, Unassigned)

References

Details

Attachments

(4 obsolete files)

No description provided.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment on attachment 8638818 [details] [diff] [review] Factor out whether an entry needs rekeying into yet another template parameter for TraceableHashMap Review of attachment 8638818 [details] [diff] [review]: ----------------------------------------------------------------- Please add a test to js/src/jsapi-tests/testGCExactRooting.cpp next to the other TraceableHashMap tests. ::: js/public/HashTable.h @@ +651,5 @@ > > template <class, class, class> friend class detail::HashTable; > template <class> friend class detail::HashTableEntry; > template <class, class, class, class> friend class HashMap; > + template <class, class, class, class, class, class, class> friend class TraceableHashMap; This is quite ugly, but I guess we can't get around it. ::: js/src/jsgc.cpp @@ +7479,5 @@ > + default: > + MOZ_CRASH("Unexpected JS::TraceKind in DefaultNeedsRekey<JS::GCCellPtr>"); > + return false; > + } > +} This should be a one liner. The following works for me: struct IsForwardedFunctor { template <typename T> bool operator()(T* t) { return IsForwarded(t); } }; /* static */ bool DefaultNeedsRekey<JS::GCCellPtr>::needsRekey(JS::GCCellPtr& p) { return CallTyped(IsForwardedFunctor(), p.asCell(), p.kind()); }
Attachment #8638818 - Flags: review?(terrence) → review+
Sorry for the churn. This should fix "error: specialization of 'template<class> struct js::DefaultHasher' in different namespace [-fpermissive]" in the jsapi tests. https://treeherder.mozilla.org/#/jobs?repo=try&revision=3a1092d07352
Comment on attachment 8639421 [details] [diff] [review] Factor out whether an entry needs rekeying into yet another template parameter for TraceableHashMap Need to figure out the SM(r) failures.
Attachment #8639421 - Flags: review?(terrence)
Seems to be working after a rebase and some tweaks... https://treeherder.mozilla.org/#/jobs?repo=try&revision=12b9409cfd5b
Attachment #8639421 - Attachment is obsolete: true
Comment on attachment 8645886 [details] [diff] [review] Factor out whether an entry needs rekeying into yet another template parameter for TraceableHashMap Review of attachment 8645886 [details] [diff] [review]: ----------------------------------------------------------------- I'm still sad we need this infrastructure, but we don't have much choice until we can fix the object keying issue.
Attachment #8645886 - Flags: review?(terrence) → review+
Gah that SM(r) failure is still there, I was just using the wrong zeal settings :( Going to put this on the backburner for a while and move forward on bug 1187062 without this.
Assignee: nfitzgerald → nobody
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Attachment #8645886 - Attachment is obsolete: true
Great! The uniqueID system is on tip now, so in theory we should not need this anymore.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: