Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 9dda198e13abfb432e466a98c6251a25443760ab..3f94cac320461d96212b8e8cb42d16c4a4071357 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -27,6 +27,8 @@ |
#include "src/mips/constants-mips.h" // NOLINT |
#elif V8_TARGET_ARCH_MIPS64 |
#include "src/mips64/constants-mips64.h" // NOLINT |
+#elif V8_TARGET_ARCH_PPC |
+#include "src/ppc/constants-ppc.h" // NOLINT |
#endif |
@@ -1250,12 +1252,18 @@ template <class C> inline bool Is(Object* obj); |
V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ |
V(kTheCurrentStackPointerIsBelowCsp, \ |
"The current stack pointer is below csp") \ |
+ V(kTheInstructionShouldBeALis, "The instruction should be a lis") \ |
V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ |
V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ |
+ V(kTheInstructionShouldBeAnOris, "The instruction should be an oris") \ |
+ V(kTheInstructionShouldBeALi, "The instruction should be a li") \ |
+ V(kTheInstructionShouldBeASldi, "The instruction should be a sldi") \ |
V(kTheInstructionToPatchShouldBeALoadFromConstantPool, \ |
"The instruction to patch should be a load from the constant pool") \ |
V(kTheInstructionToPatchShouldBeAnLdrLiteral, \ |
"The instruction to patch should be a ldr literal") \ |
+ V(kTheInstructionToPatchShouldBeALis, \ |
+ "The instruction to patch should be a lis") \ |
V(kTheInstructionToPatchShouldBeALui, \ |
"The instruction to patch should be a lui") \ |
V(kTheInstructionToPatchShouldBeAnOri, \ |
@@ -3029,6 +3037,7 @@ class FixedDoubleArray: public FixedArrayBase { |
// The format of a small constant pool is: |
// [kSmallLayout1Offset] : Small section layout bitmap 1 |
// [kSmallLayout2Offset] : Small section layout bitmap 2 |
+// [kSmallLayout3Offset] : Small section layout bitmap 3 |
// [first_index(INT64, SMALL_SECTION)] : 64 bit entries |
// ... : ... |
// [first_index(CODE_PTR, SMALL_SECTION)] : code pointer entries |
@@ -3280,34 +3289,37 @@ class ConstantPoolArray: public HeapObject { |
// Small Layout description. |
static const int kSmallLayout1Offset = HeapObject::kHeaderSize; |
static const int kSmallLayout2Offset = kSmallLayout1Offset + kInt32Size; |
- static const int kHeaderSize = kSmallLayout2Offset + kInt32Size; |
+ static const int kSmallLayout3Offset = kSmallLayout2Offset + kInt32Size; |
+ static const int kHeaderSize = kSmallLayout3Offset + kInt32Size; |
static const int kFirstEntryOffset = ROUND_UP(kHeaderSize, kInt64Size); |
- static const int kSmallLayoutCountBits = 10; |
+ static const int kSmallLayoutCountBits = 15; |
static const int kMaxSmallEntriesPerType = (1 << kSmallLayoutCountBits) - 1; |
// Fields in kSmallLayout1Offset. |
class Int64CountField: public BitField<int, 1, kSmallLayoutCountBits> {}; |
- class CodePtrCountField: public BitField<int, 11, kSmallLayoutCountBits> {}; |
- class HeapPtrCountField: public BitField<int, 21, kSmallLayoutCountBits> {}; |
+ class CodePtrCountField: public BitField<int, 16, kSmallLayoutCountBits> {}; |
class IsExtendedField: public BitField<bool, 31, 1> {}; |
// Fields in kSmallLayout2Offset. |
- class Int32CountField: public BitField<int, 1, kSmallLayoutCountBits> {}; |
- class TotalCountField: public BitField<int, 11, 12> {}; |
- class WeakObjectStateField: public BitField<WeakObjectState, 23, 2> {}; |
+ class HeapPtrCountField: public BitField<int, 1, kSmallLayoutCountBits> {}; |
+ class Int32CountField: public BitField<int, 16, kSmallLayoutCountBits> {}; |
+ |
+ // Fields in kSmallLayout3Offset. |
+ class TotalCountField: public BitField<int, 1, 17> {}; |
+ class WeakObjectStateField: public BitField<WeakObjectState, 18, 2> {}; |
// Extended layout description, which starts at |
// get_extended_section_header_offset(). |
static const int kExtendedInt64CountOffset = 0; |
static const int kExtendedCodePtrCountOffset = |
- kExtendedInt64CountOffset + kPointerSize; |
+ kExtendedInt64CountOffset + kInt32Size; |
static const int kExtendedHeapPtrCountOffset = |
- kExtendedCodePtrCountOffset + kPointerSize; |
+ kExtendedCodePtrCountOffset + kInt32Size; |
static const int kExtendedInt32CountOffset = |
- kExtendedHeapPtrCountOffset + kPointerSize; |
+ kExtendedHeapPtrCountOffset + kInt32Size; |
static const int kExtendedFirstOffset = |
- kExtendedInt32CountOffset + kPointerSize; |
+ kExtendedInt32CountOffset + kInt32Size; |
// Dispatched behavior. |
void ConstantPoolIterateBody(ObjectVisitor* v); |
@@ -5805,7 +5817,7 @@ class Code: public HeapObject { |
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; |
static const int kConstantPoolOffset = kPrologueOffset + kPointerSize; |
- static const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize; |
+ static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize; |
// Add padding to align the instruction start following right after |
// the Code object header. |
@@ -7372,10 +7384,11 @@ class SharedFunctionInfo: public HeapObject { |
// garbage collections. |
// To avoid wasting space on 64-bit architectures we use |
// the following trick: we group integer fields into pairs |
- // First integer in each pair is shifted left by 1. |
+ // The least significant integer in each pair is shifted left by 1. |
// By doing this we guarantee that LSB of each kPointerSize aligned |
// word is not set and thus this word cannot be treated as pointer |
// to HeapObject during old space traversal. |
+#if V8_TARGET_LITTLE_ENDIAN |
static const int kLengthOffset = |
kFeedbackVectorOffset + kPointerSize; |
static const int kFormalParameterCountOffset = |
@@ -7409,7 +7422,45 @@ class SharedFunctionInfo: public HeapObject { |
// Total size. |
static const int kSize = kProfilerTicksOffset + kIntSize; |
-#endif |
+#elif V8_TARGET_BIG_ENDIAN |
+ static const int kFormalParameterCountOffset = |
+ kFeedbackVectorOffset + kPointerSize; |
+ static const int kLengthOffset = |
+ kFormalParameterCountOffset + kIntSize; |
+ |
+ static const int kNumLiteralsOffset = |
+ kLengthOffset + kIntSize; |
+ static const int kExpectedNofPropertiesOffset = |
+ kNumLiteralsOffset + kIntSize; |
+ |
+ static const int kStartPositionAndTypeOffset = |
+ kExpectedNofPropertiesOffset + kIntSize; |
+ static const int kEndPositionOffset = |
+ kStartPositionAndTypeOffset + kIntSize; |
+ |
+ static const int kCompilerHintsOffset = |
+ kEndPositionOffset + kIntSize; |
+ static const int kFunctionTokenPositionOffset = |
+ kCompilerHintsOffset + kIntSize; |
+ |
+ static const int kCountersOffset = |
+ kFunctionTokenPositionOffset + kIntSize; |
+ static const int kOptCountAndBailoutReasonOffset = |
+ kCountersOffset + kIntSize; |
+ |
+ static const int kProfilerTicksOffset = |
+ kOptCountAndBailoutReasonOffset + kIntSize; |
+ static const int kAstNodeCountOffset = |
+ kProfilerTicksOffset + kIntSize; |
+ |
+ // Total size. |
+ static const int kSize = kAstNodeCountOffset + kIntSize; |
+ |
+#else |
+#error Unknown byte ordering |
+#endif // Big endian |
+#endif // 64-bit |
+ |
static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); |
@@ -8913,8 +8964,13 @@ class Name: public HeapObject { |
DECLARE_PRINTER(Name) |
// Layout description. |
- static const int kHashFieldOffset = HeapObject::kHeaderSize; |
- static const int kSize = kHashFieldOffset + kPointerSize; |
+ static const int kHashFieldSlot = HeapObject::kHeaderSize; |
+#if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT |
+ static const int kHashFieldOffset = kHashFieldSlot; |
+#else |
+ static const int kHashFieldOffset = kHashFieldSlot + kIntSize; |
+#endif |
+ static const int kSize = kHashFieldSlot + kPointerSize; |
// Mask constant for checking if a name has a computed hash code |
// and if it is a string that is an array index. The least significant bit |
@@ -11131,6 +11187,13 @@ class ObjectVisitor BASE_EMBEDDED { |
// Visit weak next_code_link in Code object. |
virtual void VisitNextCodeLink(Object** p) { VisitPointers(p, p + 1); } |
+ // Visit pointer embedded in ool constant pool |
+ virtual void VisitConstantPoolEmbeddedPointer( |
+ Object** p, |
+ ConstantPoolArray::WeakObjectState state) { |
+ VisitPointers(p, p + 1); |
+ } |
rmcilroy
2014/07/29 17:11:46
It looks like this is only here to modify VerifyMa
|
+ |
// To allow lazy clearing of inline caches the visitor has |
// a rich interface for iterating over Code objects.. |