Closed
Bug 1485615
Opened 4 years ago
Closed 4 years ago
Move internal ZoneAllocPolicy to gc/Zone.h
Categories
(Core :: JavaScript: GC, defect)
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(2 files)
8.52 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
5.97 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
I keep hitting compilation errors about inline ZoneAllocPoicy methods not being defined in non-unified builds, e.g.: [task 2018-08-21T15:44:16.721Z] In file included from /builds/worker/workspace/build/src/js/src/jsapi.h:27:0, [task 2018-08-21T15:44:16.721Z] from /builds/worker/workspace/build/src/js/src/shell/jsshell.h:15, [task 2018-08-21T15:44:16.721Z] from /builds/worker/workspace/build/src/js/src/shell/jsshell.cpp:9: [task 2018-08-21T15:44:16.721Z] /builds/worker/workspace/build/src/obj-spider/dist/include/js/AllocPolicy.h:153:37: error: inline function 'T* js::ZoneAllocPolicy::pod_malloc(size_t) [with T = mozilla::detail::HashTableEntry<mozilla::HashMapEntry<js::HeapPtr<JSObject*>, js::HeapPtr<JS::Value> > >; size_t = long unsigned int]' used but never defined [-Werror] [task 2018-08-21T15:44:16.721Z] template <typename T> inline T* pod_malloc(size_t numElems); [task 2018-08-21T15:44:16.721Z] ^~~~~~~~~~ [task 2018-08-21T15:44:16.721Z] /builds/worker/workspace/build/src/obj-spider/dist/include/js/AllocPolicy.h:150:37: error: inline function 'T* js::ZoneAllocPolicy::maybe_pod_malloc(size_t) [with T = mozilla::detail::HashTableEntry<mozilla::HashMapEntry<js::HeapPtr<JSObject*>, js::HeapPtr<JS::Value> > >; size_t = long unsigned int]' used but never defined [-Werror] [task 2018-08-21T15:44:16.721Z] template <typename T> inline T* maybe_pod_malloc(size_t numElems); [task 2018-08-21T15:44:16.721Z] ^~~~~~~~~~~~~~~~ I think the problem is that ZoneAllocPolicy is defined in public/AllocPolicy.h (despite being internal) and it's too easy for clients of this to not include gc/Zone.h where its methods are defined. The reason it's not defined in Zone.h already is that RegExpShared.h needs it to define RegExpZone, which Zone depends on. So there's a cyclic dependency. I'm going to try and break this by removing the Zone -> RegExpZone dependency by making RegExpZone a separate allocation. Then we can move ZoneAllocPolicy to Zone.h where it belongs.
Assignee | ||
Comment 1•4 years ago
|
||
Make Zone::regExpZone a separate allocation and remove the Zone.h -> RegExpShared.h dependency.
Attachment #9003423 -
Flags: review?(sphink)
Assignee | ||
Comment 2•4 years ago
|
||
Move definition of ZoneAllocPolicy to Zone.h.
Attachment #9003425 -
Flags: review?(sphink)
Updated•4 years ago
|
Attachment #9003423 -
Flags: review?(sphink) → review+
Updated•4 years ago
|
Attachment #9003425 -
Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c70943a6b070 Make RegExpZone a separate allocation to Zone r=sfink https://hg.mozilla.org/integration/mozilla-inbound/rev/40001671f508 Move internal ZoneAllocPolicy to gc/Zone.h r=sfink
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c70943a6b070 https://hg.mozilla.org/mozilla-central/rev/40001671f508
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•