Back to index
|A set of references nsTemplateMatch objects. More...|
|Hashtable entry; holds weak reference to a match object. More...|
|If the set is currently. More...|
|The set is implemented as a dual datastructure. More...|
|An iterator that can be used to enumerate the contents of the set. More...|
The set is implemented as a dual datastructure.
It is initially a simple array that holds storage for kMaxInlineMatches elements. Once that capacity is exceeded, the storage is re-used for a PLDHashTable header. The hashtable allocates its entries from the normal malloc() heap.
the InlineMatches structure is implemented such that its mCount variable overlaps with the PLDHashTable's `ops' member (which is a pointer to the hashtable's callback table). On a 32-bit architecture, we're safe assuming that the value for `ops' will be larger than kMaxInlineMatches when treated as an unsigned integer. And we'd have to get pretty unlucky on a 64-bit system for us to get screwed, I think.
Instrumentation (define NSTEMPLATEMATCHSET_METER) shows that almost all of the match sets contain fewer than seven elements.