Version 1.3.16
X64: Convert smis to holding 32 bits of payload.
Introduce v8::Integer::NewFromUnsigned method.
Add missing null check in Context::GetCurrent.
Add trim, trimLeft and trimRight methods to String
Patch by Jan de Mooij <jandemooij@gmail.com>
Implement ES5 Array.isArray
Patch by Jan de Mooij <jandemooij@gmail.com>
Skip access checks for hidden properties.
Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.
Fix GYP-based builds of V8.
git-svn-id: http://v8.googlecode.com/svn/trunk@3082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/utils.h b/src/utils.h
index 275dbb5..f4a0598 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -36,7 +36,8 @@
// ----------------------------------------------------------------------------
// General helper functions
-// Returns true iff x is a power of 2. Does not work for zero.
+// Returns true iff x is a power of 2 (or zero). Cannot be used with the
+// maximally negative value of the type T (the -1 overflows).
template <typename T>
static inline bool IsPowerOf2(T x) {
return (x & (x - 1)) == 0;