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

Side by Side Diff: src/globals.h

Issue 420293003: Rename failure tag to page owner tag and add proper description. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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. 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. If we mask out the lower
221 const int kFailureTag = 3; 221 // 0xfffff bits (1M pages), go to the owner offset, and see that this field
222 const int kFailureTagSize = 2; 222 // 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
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_
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