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)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: fitzgen, Unassigned)
References
Details
Attachments
(4 obsolete files)
No description provided.
| Reporter | ||
Comment 1•10 years ago
|
||
Attachment #8638818 -
Flags: review?(terrence)
| Reporter | ||
Updated•10 years ago
|
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
| Reporter | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
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+
| Reporter | ||
Comment 4•10 years ago
|
||
Attachment #8638818 -
Attachment is obsolete: true
Attachment #8639410 -
Flags: review?(terrence)
| Reporter | ||
Comment 5•10 years ago
|
||
| Reporter | ||
Comment 6•10 years ago
|
||
Attachment #8639410 -
Attachment is obsolete: true
Attachment #8639410 -
Flags: review?(terrence)
Attachment #8639421 -
Flags: review?(terrence)
| Reporter | ||
Comment 7•10 years ago
|
||
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
| Reporter | ||
Comment 8•10 years ago
|
||
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)
| Reporter | ||
Comment 9•10 years ago
|
||
Attachment #8645886 -
Flags: review?(terrence)
| Reporter | ||
Comment 10•10 years ago
|
||
Seems to be working after a rebase and some tweaks...
https://treeherder.mozilla.org/#/jobs?repo=try&revision=12b9409cfd5b
| Reporter | ||
Updated•10 years ago
|
Attachment #8639421 -
Attachment is obsolete: true
Comment 11•10 years ago
|
||
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+
| Reporter | ||
Comment 12•10 years ago
|
||
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.
| Reporter | ||
Updated•10 years ago
|
Assignee: nfitzgerald → nobody
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
| Reporter | ||
Updated•10 years ago
|
Attachment #8645886 -
Attachment is obsolete: true
Comment 13•10 years ago
|
||
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.
Description
•