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

Unified Diff: src/objects.h

Issue 27269: Align code entry points to 32 bytes. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« src/heap.cc ('K') | « src/heap.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 1380)
+++ src/objects.h (working copy)
@@ -2255,7 +2255,7 @@
static int SizeFor(int body_size, int sinfo_size) {
ASSERT_SIZE_TAG_ALIGNED(body_size);
ASSERT_SIZE_TAG_ALIGNED(sinfo_size);
- return kHeaderSize + body_size + sinfo_size;
+ return RoundUp(kHeaderSize + body_size + sinfo_size, kCodeAlignment);
}
// Locating source position.
@@ -2279,8 +2279,13 @@
static const int kSInfoSizeOffset = kRelocationSizeOffset + kIntSize;
static const int kFlagsOffset = kSInfoSizeOffset + kIntSize;
static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize;
- static const int kHeaderSize = kKindSpecificFlagsOffset + kIntSize;
+ static const int kFiller6Offset = kKindSpecificFlagsOffset + kIntSize;
Kasper Lund 2009/02/27 10:32:11 Comment on why you need fillers here?
iposva 2009/02/27 11:08:28 Done.
+ static const int kFiller7Offset = kFiller6Offset + kIntSize;
+ static const int kHeaderSize = kFiller7Offset + kIntSize;
+ // Code entry points are aligned to 32 bytes.
+ static const int kCodeAlignment = 32;
+
// Byte offsets within kKindSpecificFlagsOffset.
static const int kICFlagOffset = kKindSpecificFlagsOffset + 0;
static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset + 1;
« src/heap.cc ('K') | « src/heap.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698