| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 2f52094ba139393372c35e76d29b37f9442dac58..624e7cd6e80da957cb007ee59871a62c1132767f 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -26,6 +26,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
|
|
|
|
|
| @@ -1253,12 +1255,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, \
|
| @@ -3304,13 +3312,13 @@ class ConstantPoolArray: public HeapObject {
|
| // 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);
|
| @@ -5858,7 +5866,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.
|
| @@ -7413,10 +7421,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 =
|
| @@ -7450,7 +7459,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);
|
|
|
| @@ -8962,8 +9009,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
|
|
|