mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 924391 - don't use JS_BITS_PER_WORD in HeapAPI.h; r=billm
This commit is contained in:
parent
568f825b13
commit
021347c234
@ -7,6 +7,8 @@
|
||||
#ifndef js_HeapAPI_h
|
||||
#define js_HeapAPI_h
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "jspubtd.h"
|
||||
|
||||
#include "js/Utility.h"
|
||||
@ -134,8 +136,9 @@ GetGCThingMarkWordAndMask(const void *thing, uint32_t color,
|
||||
size_t bit = (addr & js::gc::ChunkMask) / js::gc::CellSize + color;
|
||||
JS_ASSERT(bit < js::gc::ChunkMarkBitmapBits);
|
||||
uintptr_t *bitmap = GetGCThingMarkBitmap(thing);
|
||||
*maskp = uintptr_t(1) << (bit % JS_BITS_PER_WORD);
|
||||
*wordp = &bitmap[bit / JS_BITS_PER_WORD];
|
||||
const uintptr_t nbits = sizeof(*bitmap) * CHAR_BIT;
|
||||
*maskp = uintptr_t(1) << (bit % nbits);
|
||||
*wordp = &bitmap[bit / nbits];
|
||||
}
|
||||
|
||||
static JS_ALWAYS_INLINE JS::shadow::ArenaHeader *
|
||||
|
Loading…
Reference in New Issue
Block a user