| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_UTILS_H_ | 5 #ifndef V8_UTILS_H_ |
| 6 #define V8_UTILS_H_ | 6 #define V8_UTILS_H_ |
| 7 | 7 |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| 11 | 11 |
| 12 #include "allocation.h" | 12 #include "src/allocation.h" |
| 13 #include "checks.h" | 13 #include "src/checks.h" |
| 14 #include "globals.h" | 14 #include "src/globals.h" |
| 15 #include "platform.h" | 15 #include "src/platform.h" |
| 16 #include "vector.h" | 16 #include "src/vector.h" |
| 17 | 17 |
| 18 namespace v8 { | 18 namespace v8 { |
| 19 namespace internal { | 19 namespace internal { |
| 20 | 20 |
| 21 // ---------------------------------------------------------------------------- | 21 // ---------------------------------------------------------------------------- |
| 22 // General helper functions | 22 // General helper functions |
| 23 | 23 |
| 24 #define IS_POWER_OF_TWO(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) | 24 #define IS_POWER_OF_TWO(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) |
| 25 | 25 |
| 26 // Returns true iff x is a power of 2. Cannot be used with the maximally | 26 // Returns true iff x is a power of 2. Cannot be used with the maximally |
| (...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 // Add formatted contents like printf based on a va_list. | 1547 // Add formatted contents like printf based on a va_list. |
| 1548 void AddFormattedList(const char* format, va_list list); | 1548 void AddFormattedList(const char* format, va_list list); |
| 1549 private: | 1549 private: |
| 1550 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); | 1550 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); |
| 1551 }; | 1551 }; |
| 1552 | 1552 |
| 1553 | 1553 |
| 1554 } } // namespace v8::internal | 1554 } } // namespace v8::internal |
| 1555 | 1555 |
| 1556 #endif // V8_UTILS_H_ | 1556 #endif // V8_UTILS_H_ |
| OLD | NEW |