Closed
Bug 1267269
Opened 9 years ago
Closed 9 years ago
Make MIRType an enum class
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(1 file)
991.79 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
The attached patch makes MIRType an enum class.
We currently use a MIRType_ prefix for the enum values, so the difference is small (MIRType_Int32 -> MIRType::Int32). The main advantage here is better type safety.
There were ~2 places in IonTypes.h where I had to cast a MIRType to unsigned but other than that everything compiled fine after a global search-and-replace.
Attachment #8744923 -
Flags: review?(bbouvier)
Comment 1•9 years ago
|
||
Comment on attachment 8744923 [details] [diff] [review]
Patch
Review of attachment 8744923 [details] [diff] [review]:
-----------------------------------------------------------------
Heroic! Thanks a lot for doing that.
Methodology for reviewing:
- apply the sed line, on the same parent revision
- commit
- diff the exported patches to see the differences
For what it's worth, the sed line I've used was:
for f in **/*.{h,cpp}; do mv $f $f.old; sed 's/MIRType_/MIRType::/g' $f.old > $f; rm -f $f.old; done
Attachment #8744923 -
Flags: review?(bbouvier) → review+
Comment 3•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Updated•9 years ago
|
Target Milestone: mozilla48 → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•