OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 const int KB = 1024; | 186 const int KB = 1024; |
187 const int MB = KB * KB; | 187 const int MB = KB * KB; |
188 const int GB = KB * KB * KB; | 188 const int GB = KB * KB * KB; |
189 const int kMaxInt = 0x7FFFFFFF; | 189 const int kMaxInt = 0x7FFFFFFF; |
190 const int kMinInt = -kMaxInt - 1; | 190 const int kMinInt = -kMaxInt - 1; |
191 | 191 |
192 const uint32_t kMaxUInt32 = 0xFFFFFFFFu; | 192 const uint32_t kMaxUInt32 = 0xFFFFFFFFu; |
193 | 193 |
194 const int kCharSize = sizeof(char); // NOLINT | 194 const int kCharSize = sizeof(char); // NOLINT |
195 const int kShortSize = sizeof(short); // NOLINT | 195 const int kShortSize = sizeof(short); // NOLINT |
196 const int kIntSize = sizeof(int); // NOLINT | |
197 const int kDoubleSize = sizeof(double); // NOLINT | 196 const int kDoubleSize = sizeof(double); // NOLINT |
198 const int kPointerSize = sizeof(void*); // NOLINT | |
199 const int kIntptrSize = sizeof(intptr_t); // NOLINT | 197 const int kIntptrSize = sizeof(intptr_t); // NOLINT |
| 198 // kIntSize and kPointerSize are defined in include/v8.h. |
200 | 199 |
201 #if V8_HOST_ARCH_64_BIT | 200 #if V8_HOST_ARCH_64_BIT |
202 const int kPointerSizeLog2 = 3; | 201 const int kPointerSizeLog2 = 3; |
203 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); | 202 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); |
204 const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF); | 203 const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF); |
205 #else | 204 #else |
206 const int kPointerSizeLog2 = 2; | 205 const int kPointerSizeLog2 = 2; |
207 const intptr_t kIntptrSignBit = 0x80000000; | 206 const intptr_t kIntptrSignBit = 0x80000000; |
208 const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu; | 207 const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu; |
209 #endif | 208 #endif |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 CMOV = 15, // x86 | 722 CMOV = 15, // x86 |
724 RDTSC = 4, // x86 | 723 RDTSC = 4, // x86 |
725 CPUID = 10, // x86 | 724 CPUID = 10, // x86 |
726 VFP3 = 1, // ARM | 725 VFP3 = 1, // ARM |
727 ARMv7 = 2, // ARM | 726 ARMv7 = 2, // ARM |
728 SAHF = 0}; // x86 | 727 SAHF = 0}; // x86 |
729 | 728 |
730 } } // namespace v8::internal | 729 } } // namespace v8::internal |
731 | 730 |
732 #endif // V8_GLOBALS_H_ | 731 #endif // V8_GLOBALS_H_ |
OLD | NEW |