OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
7 | 7 |
8 #include "include/v8stdint.h" | 8 #include "include/v8stdint.h" |
9 | 9 |
10 #include "src/base/build_config.h" | 10 #include "src/base/build_config.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 // Desired alignment for double values. | 209 // Desired alignment for double values. |
210 const intptr_t kDoubleAlignment = 8; | 210 const intptr_t kDoubleAlignment = 8; |
211 const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1; | 211 const intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1; |
212 | 212 |
213 // Desired alignment for generated code is 32 bytes (to improve cache line | 213 // Desired alignment for generated code is 32 bytes (to improve cache line |
214 // utilization). | 214 // utilization). |
215 const int kCodeAlignmentBits = 5; | 215 const int kCodeAlignmentBits = 5; |
216 const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits; | 216 const intptr_t kCodeAlignment = 1 << kCodeAlignmentBits; |
217 const intptr_t kCodeAlignmentMask = kCodeAlignment - 1; | 217 const intptr_t kCodeAlignmentMask = kCodeAlignment - 1; |
218 | 218 |
219 // Tag information for Failure. | 219 // The owner field of a page is tagged with the page header tag. We need that |
220 // TODO(yangguo): remove this from space owner calculation. | 220 // to find out if a slot is part of a large object, i.e., if we mask out the |
Michael Starzinger
2014/07/28 16:47:27
nit: Long sentence is long. Can we split it up?
Hannes Payer (out of office)
2014/07/28 18:53:19
Done.
| |
221 const int kFailureTag = 3; | 221 // lower 0xfffff bits (1M pages), go to the owner offset, and see that this |
222 const int kFailureTagSize = 2; | 222 // field is tagged with the page header tag, we can just look up the owner. |
223 const intptr_t kFailureTagMask = (1 << kFailureTagSize) - 1; | 223 // Otherwise, we know that we are somewhere (not within the first 1M) in a |
224 // large object. | |
225 const int kPageHeaderTag = 3; | |
226 const int kPageHeaderTagSize = 2; | |
227 const intptr_t kPageHeaderTagMask = (1 << kPageHeaderTagSize) - 1; | |
224 | 228 |
225 | 229 |
226 // Zap-value: The value used for zapping dead objects. | 230 // Zap-value: The value used for zapping dead objects. |
227 // Should be a recognizable hex value tagged as a failure. | 231 // Should be a recognizable hex value tagged as a failure. |
228 #ifdef V8_HOST_ARCH_64_BIT | 232 #ifdef V8_HOST_ARCH_64_BIT |
229 const Address kZapValue = | 233 const Address kZapValue = |
230 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef)); | 234 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef)); |
231 const Address kHandleZapValue = | 235 const Address kHandleZapValue = |
232 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf)); | 236 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf)); |
233 const Address kGlobalHandleZapValue = | 237 const Address kGlobalHandleZapValue = |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 enum MinusZeroMode { | 731 enum MinusZeroMode { |
728 TREAT_MINUS_ZERO_AS_ZERO, | 732 TREAT_MINUS_ZERO_AS_ZERO, |
729 FAIL_ON_MINUS_ZERO | 733 FAIL_ON_MINUS_ZERO |
730 }; | 734 }; |
731 | 735 |
732 } } // namespace v8::internal | 736 } } // namespace v8::internal |
733 | 737 |
734 namespace i = v8::internal; | 738 namespace i = v8::internal; |
735 | 739 |
736 #endif // V8_GLOBALS_H_ | 740 #endif // V8_GLOBALS_H_ |
OLD | NEW |