Closed Bug 1245767 Opened 9 years ago Closed 9 years ago

Allow combining different gczeal/zealMode values

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Currently zealMode is a single value that can be set with gczeal(x). Looking at our zeal values, it might be interesting to combine some of those modes. I think we can do that with minimal changes to tests and code if we use a bit for each mode, for instance gczeal(x) would no longer do |zealMode = x| but |zealMode ^= (1 << x)|. gczeal(0) is a special case: it'd simply clear all bits.
I'll try to prototype this quickly to see if it works.
Flags: needinfo?(jdemooij)
Attached patch PatchSplinter Review
This adds an enum class for the zeal values and GCRuntime::hasZealMode to check if a zeal mode is active. Passes all shell tests.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8715720 - Flags: review?(terrence)
Comment on attachment 8715720 [details] [diff] [review] Patch Review of attachment 8715720 [details] [diff] [review]: ----------------------------------------------------------------- This is GREAT! I've been meaning to do something like this for ages. The next step I'd like to see is to have setZeal take a string instead of an integer so that people will stop asking what mode does what.
Attachment #8715720 - Flags: review?(terrence) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
No longer depends on: 1238815
Depends on: 1300893
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: