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

Unified Diff: src/objects.h

Issue 740443002: Fix alignment of Code::kConstantPoolOffset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix alignment of Code::kConstantPoolOffset Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 66b9b8d21bbf19e01a4800964f4ea76543639f96..ab3e4a343e99616cd81b1de0fe48d7cfc431c9eb 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5370,7 +5370,7 @@ class Code: public HeapObject {
kKindSpecificFlags1Offset + kIntSize;
// Note: We might be able to squeeze this into the flags above.
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
- static const int kConstantPoolOffset = kPrologueOffset + kPointerSize;
+ static const int kConstantPoolOffset = kPrologueOffset + kIntSize;
static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize;
@@ -5378,6 +5378,8 @@ class Code: public HeapObject {
// the Code object header.
static const int kHeaderSize =
(kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
+ // Ensure that the slot for the constant pool pointer is aligned.
+ STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0);
// Byte offsets within kKindSpecificFlags1Offset.
static const int kOptimizableOffset = kKindSpecificFlags1Offset;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698