Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: src/base/macros.h

Issue 333053002: Untangle RNG from v8 core (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_BASE_MACROS_H_ 5 #ifndef V8_BASE_MACROS_H_
6 #define V8_BASE_MACROS_H_ 6 #define V8_BASE_MACROS_H_
7 7
8 #include "include/v8stdint.h" 8 #include "include/v8stdint.h"
9 9
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED 102 SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) V8_UNUSED
103 103
104 #endif 104 #endif
105 105
106 106
107 // The USE(x) template is used to silence C++ compiler warnings 107 // The USE(x) template is used to silence C++ compiler warnings
108 // issued for (yet) unused variables (typically parameters). 108 // issued for (yet) unused variables (typically parameters).
109 template <typename T> 109 template <typename T>
110 inline void USE(T) { } 110 inline void USE(T) { }
111 111
112
113 #define IS_POWER_OF_TWO(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
114
115 // The following macro works on both 32 and 64-bit platforms.
116 // Usage: instead of writing 0x1234567890123456
117 // write V8_2PART_UINT64_C(0x12345678,90123456);
118 #define V8_2PART_UINT64_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u))
119
112 #endif // V8_BASE_MACROS_H_ 120 #endif // V8_BASE_MACROS_H_
OLDNEW
« no previous file with comments | « no previous file | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698