Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 typedef uint8_t byte; | 69 typedef uint8_t byte; |
| 70 typedef byte* Address; | 70 typedef byte* Address; |
| 71 | 71 |
| 72 // Define our own macros for writing 64-bit constants. This is less fragile | 72 // Define our own macros for writing 64-bit constants. This is less fragile |
| 73 // than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it | 73 // than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it |
| 74 // works on compilers that don't have it (like MSVC). | 74 // works on compilers that don't have it (like MSVC). |
| 75 #if V8_HOST_ARCH_64_BIT | 75 #if V8_HOST_ARCH_64_BIT |
| 76 #ifdef _MSC_VER | 76 #ifdef _MSC_VER |
| 77 #define V8_UINT64_C(x) (x ## UI64) | 77 #define V8_UINT64_C(x) (x ## UI64) |
| 78 #define V8_INT64_C(x) (x ## I64) | 78 #define V8_INT64_C(x) (x ## I64) |
| 79 #define V8_PTR_PREFIX "ll" | |
| 79 #else | 80 #else |
| 80 #define V8_UINT64_C(x) (x ## UL) | 81 #define V8_UINT64_C(x) (x ## UL) |
| 81 #define V8_INT64_C(x) (x ## L) | 82 #define V8_INT64_C(x) (x ## L) |
| 83 #define V8_PTR_PREFIX "l" | |
| 82 #endif | 84 #endif |
| 83 #endif // V8_HOST_ARCH_64_BIT | 85 #else // V8_HOST_ARCH_64_BIT |
| 86 #define V8_PTR_PREFIX "" | |
| 87 #endif | |
| 88 | |
| 89 #define V8PRIp V8_PTR_PREFIX "x" | |
|
William Hesse
2009/05/07 09:42:11
why not #define V8_PTR_FORMAT "0x%llx"
etc. for al
Erik Corry
2009/05/07 09:58:58
Certainly prefix is the wrong name; since it goes
| |
| 84 | 90 |
| 85 // Code-point values in Unicode 4.0 are 21 bits wide. | 91 // Code-point values in Unicode 4.0 are 21 bits wide. |
| 86 typedef uint16_t uc16; | 92 typedef uint16_t uc16; |
| 87 typedef int32_t uc32; | 93 typedef int32_t uc32; |
| 88 | 94 |
| 89 // ----------------------------------------------------------------------------- | 95 // ----------------------------------------------------------------------------- |
| 90 // Constants | 96 // Constants |
| 91 | 97 |
| 92 const int KB = 1024; | 98 const int KB = 1024; |
| 93 const int MB = KB * KB; | 99 const int MB = KB * KB; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 528 | 534 |
| 529 Dest dest; | 535 Dest dest; |
| 530 memcpy(&dest, &source, sizeof(dest)); | 536 memcpy(&dest, &source, sizeof(dest)); |
| 531 return dest; | 537 return dest; |
| 532 } | 538 } |
| 533 | 539 |
| 534 | 540 |
| 535 } } // namespace v8::internal | 541 } } // namespace v8::internal |
| 536 | 542 |
| 537 #endif // V8_GLOBALS_H_ | 543 #endif // V8_GLOBALS_H_ |
| OLD | NEW |