зеркало из https://github.com/mozilla/pjs.git
Bug 694256 - Build error: JS_FloorLog2 is missing. r=luke.
This commit is contained in:
Родитель
51faed5c10
Коммит
dbad598840
|
@ -346,7 +346,7 @@ __BitScanReverse64(unsigned __int64 val)
|
||||||
# define js_FloorLog2wImpl(n) \
|
# define js_FloorLog2wImpl(n) \
|
||||||
((size_t)(JS_BITS_PER_WORD - 1 - js_bitscan_clz32(n)))
|
((size_t)(JS_BITS_PER_WORD - 1 - js_bitscan_clz32(n)))
|
||||||
# else
|
# else
|
||||||
# define js_FloorLog2wImpl(n) ((size_t)JS_FloorLog2(n))
|
extern size_t js_FloorLog2wImpl(size_t n);
|
||||||
# endif
|
# endif
|
||||||
#elif JS_BYTES_PER_WORD == 8
|
#elif JS_BYTES_PER_WORD == 8
|
||||||
# ifdef JS_HAS_BUILTIN_BITSCAN64
|
# ifdef JS_HAS_BUILTIN_BITSCAN64
|
||||||
|
|
|
@ -54,6 +54,17 @@ JS_STATIC_ASSERT_IF(JS_BYTES_PER_WORD == 8,
|
||||||
sizeof(unsigned long long) == sizeof(JSUword));
|
sizeof(unsigned long long) == sizeof(JSUword));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(JS_HAS_BUILTIN_BITSCAN32) && JS_BYTES_PER_WORD == 4
|
||||||
|
|
||||||
|
size_t
|
||||||
|
js_FloorLog2wImpl(size_t n)
|
||||||
|
{
|
||||||
|
size_t log2;
|
||||||
|
|
||||||
|
JS_FLOOR_LOG2(log2, n);
|
||||||
|
return log2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* js_FloorLog2wImpl has to be defined only for 64-bit non-GCC case.
|
* js_FloorLog2wImpl has to be defined only for 64-bit non-GCC case.
|
||||||
*/
|
*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче