28 #ifndef V8_MISC_INTRINSICS_H_
29 #define V8_MISC_INTRINSICS_H_
31 #include "../include/v8.h"
45 return 31 - __builtin_clz(value);
48 #elif defined(_MSC_VER)
50 #pragma intrinsic(_BitScanReverse)
54 _BitScanReverse(&result, value);
65 shift = (value > 0xFFFF) << 4;
69 shift = (value > 0xFF) << 3;
73 shift = (value > 0xF) << 2;
77 shift = (value > 0x3) << 1;
81 result |= (value >> 1);
89 #endif // V8_MISC_INTRINSICS_H_
int IntegerLog2(uint32_t value)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array shift