diff options
Diffstat (limited to 'js/src/ds/BitArray.h')
-rw-r--r-- | js/src/ds/BitArray.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/ds/BitArray.h b/js/src/ds/BitArray.h index bdd78873fd..f8a6aad455 100644 --- a/js/src/ds/BitArray.h +++ b/js/src/ds/BitArray.h @@ -99,6 +99,12 @@ class BitArray { return map[elementIndex]; } + // Update a word at a time. + void setWord(size_t elementIndex, WordT value) { + MOZ_ASSERT(elementIndex < nbits); + map[elementIndex] = value; + } + static void getIndexAndMask(size_t offset, size_t* indexp, WordT* maskp) { MOZ_ASSERT(offset < nbits); static_assert(bitsPerElement == 32, "unexpected bitsPerElement value"); |