Bug 1595476 part 1 - Add clearAndCompact method to InlineMap/InlineSet. r=tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D52633

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-11-18 16:12:48 +00:00
parent 5bbc378c0e
commit e7fa1c9c80

View File

@ -218,6 +218,11 @@ class InlineTable : private AllocPolicy {
inlCount_ = 0;
}
void clearAndCompact() {
clear();
table_.clearAndCompact();
}
MOZ_ALWAYS_INLINE
Ptr lookup(const Lookup& l) {
MOZ_ASSERT(keyNonZero(l));
@ -475,6 +480,8 @@ class InlineMap {
void clear() { impl_.clear(); }
void clearAndCompact() { impl_.clearAndCompact(); }
Range all() const { return impl_.all(); }
MOZ_ALWAYS_INLINE
@ -579,6 +586,8 @@ class InlineSet {
void clear() { impl_.clear(); }
void clearAndCompact() { impl_.clearAndCompact(); }
Range all() const { return impl_.all(); }
MOZ_ALWAYS_INLINE