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

Side by Side Diff: src/utils.h

Issue 5005001: Split globals.h into two parts, where only one depends on V8. (Closed)
Patch Set: Addressed review comments. Created 10 years, 1 month 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
« no previous file with comments | « src/scanner-base.cc ('k') | src/v8.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 13 matching lines...) Expand all
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_UTILS_H_ 28 #ifndef V8_UTILS_H_
29 #define V8_UTILS_H_ 29 #define V8_UTILS_H_
30 30
31 #include <stdlib.h> 31 #include <stdlib.h>
32 #include <string.h> 32 #include <string.h>
33 33
34 #include "globals.h"
34 #include "checks.h" 35 #include "checks.h"
36 #include "allocation.h"
35 37
36 namespace v8 { 38 namespace v8 {
37 namespace internal { 39 namespace internal {
38 40
39 // ---------------------------------------------------------------------------- 41 // ----------------------------------------------------------------------------
40 // General helper functions 42 // General helper functions
41 43
42 #define IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0) 44 #define IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0)
43 45
44 // Returns true iff x is a power of 2 (or zero). Cannot be used with the 46 // Returns true iff x is a power of 2 (or zero). Cannot be used with the
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 } 718 }
717 719
718 template <class Dest, class Source> 720 template <class Dest, class Source>
719 inline Dest BitCast(Source* source) { 721 inline Dest BitCast(Source* source) {
720 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); 722 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
721 } 723 }
722 724
723 } } // namespace v8::internal 725 } } // namespace v8::internal
724 726
725 #endif // V8_UTILS_H_ 727 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/scanner-base.cc ('k') | src/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698