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

Unified Diff: src/objects.h

Issue 3461021: Add CODE_POINTER_ALIGN, use it in Page to align generated code. (Closed)
Patch Set: use CODE_POINTER_ALIGN in one more place Created 10 years, 3 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 6c4af25297c874f30c5f4c5b6b91083037583a8a..24401ebcfd178133a7a9e86022c3f2873e8d4632 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3009,11 +3009,6 @@ class Code: public HeapObject {
void CodePrint();
void CodeVerify();
#endif
- // Code entry points are aligned to 32 bytes.
- static const int kCodeAlignmentBits = 5;
- static const int kCodeAlignment = 1 << kCodeAlignmentBits;
- static const int kCodeAlignmentMask = kCodeAlignment - 1;
-
// Layout description.
static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
@@ -3022,8 +3017,7 @@ class Code: public HeapObject {
// Add padding to align the instruction start following right after
// the Code object header.
static const int kHeaderSize =
- (kKindSpecificFlagsOffset + kIntSize + kCodeAlignmentMask) &
- ~kCodeAlignmentMask;
+ CODE_POINTER_ALIGN(kKindSpecificFlagsOffset + kIntSize);
// Byte offsets within kKindSpecificFlagsOffset.
static const int kStubMajorKeyOffset = kKindSpecificFlagsOffset + 1;

Powered by Google App Engine
This is Rietveld 408576698