Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 30 matching lines...) Expand all Loading... | |
| 41 const intptr_t kSmiSignMask = kIntptrSignBit; | 41 const intptr_t kSmiSignMask = kIntptrSignBit; |
| 42 | 42 |
| 43 const int kObjectAlignmentBits = kPointerSizeLog2; | 43 const int kObjectAlignmentBits = kPointerSizeLog2; |
| 44 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; | 44 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; |
| 45 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; | 45 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; |
| 46 | 46 |
| 47 // Desired alignment for pointers. | 47 // Desired alignment for pointers. |
| 48 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); | 48 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); |
| 49 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1; | 49 const intptr_t kPointerAlignmentMask = kPointerAlignment - 1; |
| 50 | 50 |
| 51 #if V8_HOST_ARCH_64_BIT | |
|
Erik Corry
2012/04/16 14:35:19
Instead of the ifdef you could just set kDoubleAli
| |
| 52 const intptr_t kDoubleAlignment = kPointerAlignment; | |
| 53 #else | |
| 54 const intptr_t kDoubleAlignment = 2 * kPointerAlignment; | |
| 55 #endif | |
| 56 const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1; | |
| 57 | |
| 51 // Desired alignment for maps. | 58 // Desired alignment for maps. |
| 52 #if V8_HOST_ARCH_64_BIT | 59 #if V8_HOST_ARCH_64_BIT |
| 53 const intptr_t kMapAlignmentBits = kObjectAlignmentBits; | 60 const intptr_t kMapAlignmentBits = kObjectAlignmentBits; |
| 54 #else | 61 #else |
| 55 const intptr_t kMapAlignmentBits = kObjectAlignmentBits + 3; | 62 const intptr_t kMapAlignmentBits = kObjectAlignmentBits + 3; |
| 56 #endif | 63 #endif |
| 57 const intptr_t kMapAlignment = (1 << kMapAlignmentBits); | 64 const intptr_t kMapAlignment = (1 << kMapAlignmentBits); |
| 58 const intptr_t kMapAlignmentMask = kMapAlignment - 1; | 65 const intptr_t kMapAlignmentMask = kMapAlignment - 1; |
| 59 | 66 |
| 60 // Desired alignment for generated code is 32 bytes (to improve cache line | 67 // Desired alignment for generated code is 32 bytes (to improve cache line |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 | 556 |
| 550 enum ClearExceptionFlag { | 557 enum ClearExceptionFlag { |
| 551 KEEP_EXCEPTION, | 558 KEEP_EXCEPTION, |
| 552 CLEAR_EXCEPTION | 559 CLEAR_EXCEPTION |
| 553 }; | 560 }; |
| 554 | 561 |
| 555 | 562 |
| 556 } } // namespace v8::internal | 563 } } // namespace v8::internal |
| 557 | 564 |
| 558 #endif // V8_V8GLOBALS_H_ | 565 #endif // V8_V8GLOBALS_H_ |
| OLD | NEW |