Closed
Bug 1273908
Opened 8 years ago
Closed 8 years ago
Simplify adding new kinds of GC thing
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(1 file)
33.51 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
There are a bunch of places where the list of thing kinds is baked in. These can be refactored using macros to construct them from a central source of information about GC things.
Assignee | ||
Comment 1•8 years ago
|
||
This turned out to be more far-reaching than I thought. Mainly I put more information into FOR_EACH_ALLOCKIND (now split into two halves) and used this wherever possible. I did the same for trace kinds too.
Attachment #8753944 -
Flags: review?(terrence)
Comment 2•8 years ago
|
||
Comment on attachment 8753944 [details] [diff] [review] simplify-adding-gc-thing Review of attachment 8753944 [details] [diff] [review]: ----------------------------------------------------------------- Yup, that's exactly what I had in mind. Thanks for taking this! ::: js/public/TraceKind.h @@ +97,5 @@ > // are designed for use as array keys via EnumeratedArray. > enum class RootKind : int8_t > { > // These map 1:1 with trace kinds. > +#define EXPAND_ROOT_KIND(name, type, _) \ |type| is unused here. The style I settled on by accident is _N for unused expansions: e.g. EXPAND_ROOT_KIND(name, _0, _1). I'd also be fine with always specifying all the names even if unused.
Attachment #8753944 -
Flags: review?(terrence) → review+
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/106f482c6670
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•