Closed Bug 1440072 Opened 8 years ago Closed 8 years ago

Eliminate unused cases for XPTConstValue

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

(Whiteboard: [MemShrink])

Attachments

(1 file)

XPTConstValue is a union that can hold integers of various sizes (8, 16, 32, 64), but it turns out that xpt.py will only ever generate {u,}int{16,32} constants (as seen in the variable typemap in class Constant). Eliminating the unused cases reduces the code complexity a bit, and reduces the size of XPTConstValue from 64 bits to 32 bits. This reduces xpti-working-set from 0.87 MB to 0.85 MB in about:memory on Linux64. xptiInterfaceEntry::GetConstant(), which seems to be the only thing that reads things out of these tags, doesn't even implement any of these cases, aside from int8 and uint8, so the other cases could never have worked in any real way.
Comment on attachment 8952858 [details] Bug 1440072 - Eliminate unused cases for XPTConstValue. https://reviewboard.mozilla.org/r/222090/#review228012 I wonder about keeping the i8 and u8 cases -- it's the 64-bit case removals that save memory, right? But if i8/u8 are not used and not fully implemented, I guess it's not worth it.
Attachment #8952858 - Flags: review?(n.nethercote) → review+
It should be easy enough to add them back if anybody wants them.
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cb9d2116b32d Eliminate unused cases for XPTConstValue. r=njn
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: