| Index: runtime/platform/utils.h
|
| ===================================================================
|
| --- runtime/platform/utils.h (revision 31864)
|
| +++ runtime/platform/utils.h (working copy)
|
| @@ -45,34 +45,34 @@
|
| }
|
|
|
| template<typename T>
|
| - static inline bool IsAligned(T x, int n) {
|
| + static inline bool IsAligned(T x, intptr_t n) {
|
| ASSERT(IsPowerOfTwo(n));
|
| return (x & (n - 1)) == 0;
|
| }
|
|
|
| template<typename T>
|
| - static inline bool IsAligned(T* x, int n) {
|
| + static inline bool IsAligned(T* x, intptr_t n) {
|
| return IsAligned(reinterpret_cast<uword>(x), n);
|
| }
|
|
|
| template<typename T>
|
| - static inline T RoundDown(T x, int n) {
|
| + static inline T RoundDown(T x, intptr_t n) {
|
| ASSERT(IsPowerOfTwo(n));
|
| return (x & -n);
|
| }
|
|
|
| template<typename T>
|
| - static inline T* RoundDown(T* x, int n) {
|
| + static inline T* RoundDown(T* x, intptr_t n) {
|
| return reinterpret_cast<T*>(RoundDown(reinterpret_cast<uword>(x), n));
|
| }
|
|
|
| template<typename T>
|
| - static inline T RoundUp(T x, int n) {
|
| + static inline T RoundUp(T x, intptr_t n) {
|
| return RoundDown(x + n - 1, n);
|
| }
|
|
|
| template<typename T>
|
| - static inline T* RoundUp(T* x, int n) {
|
| + static inline T* RoundUp(T* x, intptr_t n) {
|
| return reinterpret_cast<T*>(RoundUp(reinterpret_cast<uword>(x), n));
|
| }
|
|
|
|
|