This patch reduces sizeof(js::HashTable):
- On 64-bit: from 32 bytes to 24 bytes.
- On 32-bit: from 24 bytes to 16 bytes.
The latter is particularly nice because jemalloc rounds up allocation requests
of 24 bytes to 32, but it can allocate 16 bytes without slop, so we're saving
16 bytes per heap-allocated HashTable.
This is done by:
- Shrinking |removedCount| and |hashShift|.
- Reordering the fields.
- Not defining |mutationCount| and |mEntered| in non-DEBUG builds rather than
using DebugOnly<> -- in non-DEBUG builds, DebugOnly<> fields take up 1 byte
each.
This change saves over 55 KiB when starting Firefox and loading Gmail.
The patch also uses uint32_t more consistently for the generation.
--HG--
extra : rebase_source : 8bdfbfe40f233711433bd9b7a2b5a19d69beacc7