Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: src/globals.h

Issue 398473002: Revert "Remove failure tag.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
220 // TODO(yangguo): remove this from space owner calculation.
221 const int kFailureTag = 3;
222 const int kFailureTagSize = 2;
223 const intptr_t kFailureTagMask = (1 << kFailureTagSize) - 1;
224
219 225
220 // Zap-value: The value used for zapping dead objects. 226 // Zap-value: The value used for zapping dead objects.
221 // Should be a recognizable hex value tagged as a failure. 227 // Should be a recognizable hex value tagged as a failure.
222 #ifdef V8_HOST_ARCH_64_BIT 228 #ifdef V8_HOST_ARCH_64_BIT
223 const Address kZapValue = 229 const Address kZapValue =
224 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef)); 230 reinterpret_cast<Address>(V8_UINT64_C(0xdeadbeedbeadbeef));
225 const Address kHandleZapValue = 231 const Address kHandleZapValue =
226 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf)); 232 reinterpret_cast<Address>(V8_UINT64_C(0x1baddead0baddeaf));
227 const Address kGlobalHandleZapValue = 233 const Address kGlobalHandleZapValue =
228 reinterpret_cast<Address>(V8_UINT64_C(0x1baffed00baffedf)); 234 reinterpret_cast<Address>(V8_UINT64_C(0x1baffed00baffedf));
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 530
525 531
526 // ----------------------------------------------------------------------------- 532 // -----------------------------------------------------------------------------
527 // Macros 533 // Macros
528 534
529 // Testers for test. 535 // Testers for test.
530 536
531 #define HAS_SMI_TAG(value) \ 537 #define HAS_SMI_TAG(value) \
532 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag) 538 ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag)
533 539
540 #define HAS_FAILURE_TAG(value) \
541 ((reinterpret_cast<intptr_t>(value) & kFailureTagMask) == kFailureTag)
542
534 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer 543 // OBJECT_POINTER_ALIGN returns the value aligned as a HeapObject pointer
535 #define OBJECT_POINTER_ALIGN(value) \ 544 #define OBJECT_POINTER_ALIGN(value) \
536 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) 545 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask)
537 546
538 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. 547 // POINTER_SIZE_ALIGN returns the value aligned as a pointer.
539 #define POINTER_SIZE_ALIGN(value) \ 548 #define POINTER_SIZE_ALIGN(value) \
540 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) 549 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask)
541 550
542 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment. 551 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment.
543 #define CODE_POINTER_ALIGN(value) \ 552 #define CODE_POINTER_ALIGN(value) \
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 enum MinusZeroMode { 725 enum MinusZeroMode {
717 TREAT_MINUS_ZERO_AS_ZERO, 726 TREAT_MINUS_ZERO_AS_ZERO,
718 FAIL_ON_MINUS_ZERO 727 FAIL_ON_MINUS_ZERO
719 }; 728 };
720 729
721 } } // namespace v8::internal 730 } } // namespace v8::internal
722 731
723 namespace i = v8::internal; 732 namespace i = v8::internal;
724 733
725 #endif // V8_GLOBALS_H_ 734 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698