Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index cf9184ffe128f7da53051fe2939ee2e13a057f9d..4ff57aad64925038c932f07f9d5b6c48e5fa5107 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -5257,6 +5257,11 @@ class Code: public HeapObject { |
inline int prologue_offset() const; |
inline void set_prologue_offset(int offset); |
+ // [constant_pool offset]: Offset of the constant pool. |
+ // Valid for FLAG_enable_embedded_constant_pool only |
+ inline int constant_pool_offset() const; |
+ inline void set_constant_pool_offset(int offset); |
+ |
// Unchecked accessors to be used during GC. |
inline ByteArray* unchecked_relocation_info(); |
@@ -5394,7 +5399,8 @@ class Code: public HeapObject { |
inline void set_marked_for_deoptimization(bool flag); |
// [constant_pool]: The constant pool for this function. |
- inline ConstantPoolArray* constant_pool(); |
+ inline Address constant_pool(); |
+ // Valid for FLAG_enable_ool_constant_pool only |
inline void set_constant_pool(Object* constant_pool); |
// Get the safepoint entry for the given pc. |
@@ -5597,6 +5603,10 @@ class Code: public HeapObject { |
// nesting that is deeper than 5 levels into account. |
static const int kMaxLoopNestingMarker = 6; |
+ static const int kOOLCPSize = |
+ FLAG_enable_ool_constant_pool ? kPointerSize : 0; |
+ static const int kECPSize = FLAG_enable_embedded_constant_pool ? kIntSize : 0; |
+ |
// Layout description. |
static const int kRelocationInfoOffset = HeapObject::kHeaderSize; |
static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; |
@@ -5615,16 +5625,22 @@ 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 + kIntSize; |
+ static const int kOOLConstantPoolOffset = kPrologueOffset + kIntSize; |
rmcilroy
2015/04/08 12:38:55
Let's just have a single field here which points t
MTBrandyberry
2015/05/07 20:38:32
Acknowledged.
|
+ static const int kEmbeddedConstantPoolOffset = |
+ kOOLConstantPoolOffset + kOOLCPSize; |
+ static const int kHeaderPaddingStart = kEmbeddedConstantPoolOffset + kECPSize; |
- static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize; |
+ static const int kConstantPoolOffset = |
+ kOOLCPSize ? kOOLConstantPoolOffset |
+ : (kECPSize ? kEmbeddedConstantPoolOffset : 0); |
// Add padding to align the instruction start following right after |
// 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); |
+ STATIC_ASSERT(kOOLCPSize == 0 || |
+ (kOOLConstantPoolOffset & kPointerAlignmentMask) == 0); |
// Byte offsets within kKindSpecificFlags1Offset. |
static const int kOptimizableOffset = kKindSpecificFlags1Offset; |