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

Side by Side Diff: src/spaces.h

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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 | « src/profile-generator.cc ('k') | src/transitions.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // is no special garbage section. 93 // is no special garbage section.
94 94
95 // Some assertion macros used in the debugging mode. 95 // Some assertion macros used in the debugging mode.
96 96
97 #define ASSERT_PAGE_ALIGNED(address) \ 97 #define ASSERT_PAGE_ALIGNED(address) \
98 ASSERT((OffsetFrom(address) & Page::kPageAlignmentMask) == 0) 98 ASSERT((OffsetFrom(address) & Page::kPageAlignmentMask) == 0)
99 99
100 #define ASSERT_OBJECT_ALIGNED(address) \ 100 #define ASSERT_OBJECT_ALIGNED(address) \
101 ASSERT((OffsetFrom(address) & kObjectAlignmentMask) == 0) 101 ASSERT((OffsetFrom(address) & kObjectAlignmentMask) == 0)
102 102
103 #define ASSERT_MAP_ALIGNED(address) \
104 ASSERT((OffsetFrom(address) & kMapAlignmentMask) == 0)
105
106 #define ASSERT_OBJECT_SIZE(size) \ 103 #define ASSERT_OBJECT_SIZE(size) \
107 ASSERT((0 < size) && (size <= Page::kMaxNonCodeHeapObjectSize)) 104 ASSERT((0 < size) && (size <= Page::kMaxNonCodeHeapObjectSize))
108 105
109 #define ASSERT_PAGE_OFFSET(offset) \ 106 #define ASSERT_PAGE_OFFSET(offset) \
110 ASSERT((Page::kObjectStartOffset <= offset) \ 107 ASSERT((Page::kObjectStartOffset <= offset) \
111 && (offset <= Page::kPageSize)) 108 && (offset <= Page::kPageSize))
112 109
113 #define ASSERT_MAP_PAGE_INDEX(index) \ 110 #define ASSERT_MAP_PAGE_INDEX(index) \
114 ASSERT((0 <= index) && (index <= MapSpace::kMaxMapPageIndex)) 111 ASSERT((0 <= index) && (index <= MapSpace::kMaxMapPageIndex))
115 112
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 kPointerSize + kPointerSize + kPointerSize + kIntSize; 500 kPointerSize + kPointerSize + kPointerSize + kIntSize;
504 501
505 static const size_t kSlotsBufferOffset = kLiveBytesOffset + kIntSize; 502 static const size_t kSlotsBufferOffset = kLiveBytesOffset + kIntSize;
506 503
507 static const size_t kWriteBarrierCounterOffset = 504 static const size_t kWriteBarrierCounterOffset =
508 kSlotsBufferOffset + kPointerSize + kPointerSize; 505 kSlotsBufferOffset + kPointerSize + kPointerSize;
509 506
510 static const size_t kHeaderSize = kWriteBarrierCounterOffset + kPointerSize; 507 static const size_t kHeaderSize = kWriteBarrierCounterOffset + kPointerSize;
511 508
512 static const int kBodyOffset = 509 static const int kBodyOffset =
513 CODE_POINTER_ALIGN(MAP_POINTER_ALIGN(kHeaderSize + Bitmap::kSize)); 510 CODE_POINTER_ALIGN(kHeaderSize + Bitmap::kSize);
514 511
515 // The start offset of the object area in a page. Aligned to both maps and 512 // The start offset of the object area in a page. Aligned to both maps and
516 // code alignment to be suitable for both. Also aligned to 32 words because 513 // code alignment to be suitable for both. Also aligned to 32 words because
517 // the marking bitmap is arranged in 32 bit chunks. 514 // the marking bitmap is arranged in 32 bit chunks.
518 static const int kObjectStartAlignment = 32 * kPointerSize; 515 static const int kObjectStartAlignment = 32 * kPointerSize;
519 static const int kObjectStartOffset = kBodyOffset - 1 + 516 static const int kObjectStartOffset = kBodyOffset - 1 +
520 (kObjectStartAlignment - (kBodyOffset - 1) % kObjectStartAlignment); 517 (kObjectStartAlignment - (kBodyOffset - 1) % kObjectStartAlignment);
521 518
522 size_t size() const { return size_; } 519 size_t size() const { return size_; }
523 520
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 } 2672 }
2676 // Must be small, since an iteration is used for lookup. 2673 // Must be small, since an iteration is used for lookup.
2677 static const int kMaxComments = 64; 2674 static const int kMaxComments = 64;
2678 }; 2675 };
2679 #endif 2676 #endif
2680 2677
2681 2678
2682 } } // namespace v8::internal 2679 } } // namespace v8::internal
2683 2680
2684 #endif // V8_SPACES_H_ 2681 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698