OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 #define V8_UINT64_C(x) (x ## UL) | 184 #define V8_UINT64_C(x) (x ## UL) |
185 #define V8_INT64_C(x) (x ## L) | 185 #define V8_INT64_C(x) (x ## L) |
186 #define V8_INTPTR_C(x) (x ## L) | 186 #define V8_INTPTR_C(x) (x ## L) |
187 #define V8_PTR_PREFIX "l" | 187 #define V8_PTR_PREFIX "l" |
188 #endif // _MSC_VER | 188 #endif // _MSC_VER |
189 #else // V8_HOST_ARCH_64_BIT | 189 #else // V8_HOST_ARCH_64_BIT |
190 #define V8_INTPTR_C(x) (x) | 190 #define V8_INTPTR_C(x) (x) |
191 #define V8_PTR_PREFIX "" | 191 #define V8_PTR_PREFIX "" |
192 #endif // V8_HOST_ARCH_64_BIT | 192 #endif // V8_HOST_ARCH_64_BIT |
193 | 193 |
| 194 #ifdef __MINGW64__ |
| 195 #undef V8_PTR_PREFIX |
| 196 #define V8_PTR_PREFIX "I64" |
| 197 #endif // __MINGW64__ |
| 198 |
194 // The following macro works on both 32 and 64-bit platforms. | 199 // The following macro works on both 32 and 64-bit platforms. |
195 // Usage: instead of writing 0x1234567890123456 | 200 // Usage: instead of writing 0x1234567890123456 |
196 // write V8_2PART_UINT64_C(0x12345678,90123456); | 201 // write V8_2PART_UINT64_C(0x12345678,90123456); |
197 #define V8_2PART_UINT64_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u)) | 202 #define V8_2PART_UINT64_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u)) |
198 | 203 |
199 #define V8PRIxPTR V8_PTR_PREFIX "x" | 204 #define V8PRIxPTR V8_PTR_PREFIX "x" |
200 #define V8PRIdPTR V8_PTR_PREFIX "d" | 205 #define V8PRIdPTR V8_PTR_PREFIX "d" |
201 | 206 |
202 // Fix for Mac OS X defining uintptr_t as "unsigned long": | 207 // Fix for Mac OS X defining uintptr_t as "unsigned long": |
203 #if defined(__APPLE__) && defined(__MACH__) | 208 #if defined(__APPLE__) && defined(__MACH__) |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // the backend, so both modes are represented by the kStrictMode value. | 392 // the backend, so both modes are represented by the kStrictMode value. |
388 enum StrictModeFlag { | 393 enum StrictModeFlag { |
389 kNonStrictMode, | 394 kNonStrictMode, |
390 kStrictMode | 395 kStrictMode |
391 }; | 396 }; |
392 | 397 |
393 | 398 |
394 } } // namespace v8::internal | 399 } } // namespace v8::internal |
395 | 400 |
396 #endif // V8_GLOBALS_H_ | 401 #endif // V8_GLOBALS_H_ |
OLD | NEW |