| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 const int kCharSize = sizeof(char); // NOLINT | 114 const int kCharSize = sizeof(char); // NOLINT |
| 115 const int kShortSize = sizeof(short); // NOLINT | 115 const int kShortSize = sizeof(short); // NOLINT |
| 116 const int kIntSize = sizeof(int); // NOLINT | 116 const int kIntSize = sizeof(int); // NOLINT |
| 117 const int kDoubleSize = sizeof(double); // NOLINT | 117 const int kDoubleSize = sizeof(double); // NOLINT |
| 118 const int kPointerSize = sizeof(void*); // NOLINT | 118 const int kPointerSize = sizeof(void*); // NOLINT |
| 119 const int kIntptrSize = sizeof(intptr_t); // NOLINT | 119 const int kIntptrSize = sizeof(intptr_t); // NOLINT |
| 120 | 120 |
| 121 #if V8_HOST_ARCH_64_BIT | 121 #if V8_HOST_ARCH_64_BIT |
| 122 const int kPointerSizeLog2 = 3; | 122 const int kPointerSizeLog2 = 3; |
| 123 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); |
| 123 #else | 124 #else |
| 124 const int kPointerSizeLog2 = 2; | 125 const int kPointerSizeLog2 = 2; |
| 126 const intptr_t kIntptrSignBit = 0x80000000; |
| 125 #endif | 127 #endif |
| 126 | 128 |
| 127 const int kObjectAlignmentBits = kPointerSizeLog2; | 129 const int kObjectAlignmentBits = kPointerSizeLog2; |
| 128 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; | 130 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; |
| 129 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; | 131 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; |
| 130 | 132 |
| 131 // Desired alignment for pointers. | 133 // Desired alignment for pointers. |
| 132 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); | 134 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); |
| 133 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1; | 135 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1; |
| 134 | 136 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 557 |
| 556 Dest dest; | 558 Dest dest; |
| 557 memcpy(&dest, &source, sizeof(dest)); | 559 memcpy(&dest, &source, sizeof(dest)); |
| 558 return dest; | 560 return dest; |
| 559 } | 561 } |
| 560 | 562 |
| 561 | 563 |
| 562 } } // namespace v8::internal | 564 } } // namespace v8::internal |
| 563 | 565 |
| 564 #endif // V8_GLOBALS_H_ | 566 #endif // V8_GLOBALS_H_ |
| OLD | NEW |