| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 529808a34a9d8734403baf23170787133da0c503..8c485a746c5fb33587998fb2db68cb2f3e8b93fb 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -398,6 +398,7 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
|
| \
|
| V(FIXED_ARRAY_TYPE) \
|
| V(FIXED_DOUBLE_ARRAY_TYPE) \
|
| + V(CONSTANT_POOL_ARRAY_TYPE) \
|
| V(SHARED_FUNCTION_INFO_TYPE) \
|
| \
|
| V(JS_MESSAGE_OBJECT_TYPE) \
|
| @@ -716,6 +717,7 @@ enum InstanceType {
|
| EXTERNAL_DOUBLE_ARRAY_TYPE,
|
| EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE
|
| FIXED_DOUBLE_ARRAY_TYPE,
|
| + CONSTANT_POOL_ARRAY_TYPE,
|
| FILLER_TYPE, // LAST_DATA_TYPE
|
|
|
| // Structs.
|
| @@ -1002,6 +1004,7 @@ class MaybeObject BASE_EMBEDDED {
|
| V(TypeFeedbackCells) \
|
| V(FixedArray) \
|
| V(FixedDoubleArray) \
|
| + V(ConstantPoolArray) \
|
| V(Context) \
|
| V(NativeContext) \
|
| V(ScopeInfo) \
|
| @@ -3050,6 +3053,58 @@ class FixedDoubleArray: public FixedArrayBase {
|
| };
|
|
|
|
|
| +// ConstantPoolArray describes fixed-sized arrays constant pool entires.
|
| +// The format of the pool is:
|
| +// [0]: The first index which is a int32 entry
|
| +// [1] ... [first int32 entry index - 1]: 64 bit entries
|
| +// [first int32 entry index] ... [length]: 32 bit entries
|
| +class ConstantPoolArray: public FixedArrayBase {
|
| + public:
|
| + // Setter and getter for the field storing the first int32 entries index.
|
| + inline int first_int32_index();
|
| + inline void set_first_int32_index(int index);
|
| +
|
| + // Setter and getter for pool elements.
|
| + inline int64_t get_int64_entry(int index);
|
| + inline int32_t get_int32_entry(int index);
|
| + inline double get_int64_entry_as_double(int index);
|
| +
|
| + MUST_USE_RESULT inline MaybeObject* get(int index);
|
| + inline void set(int index, int64_t value);
|
| + inline void set(int index, double value);
|
| + inline void set(int index, int32_t value);
|
| +
|
| + // Copy operations
|
| + MUST_USE_RESULT inline MaybeObject* Copy();
|
| +
|
| + // Garbage collection support.
|
| + inline static int SizeFor(int length, int first_int32_index) {
|
| + return kFirstOffset + first_int32_index * kInt64Size
|
| + + (length - first_int32_index) * kInt32Size;
|
| + }
|
| +
|
| + // Code Generation support.
|
| + inline int OffsetOfElementAt(int index) {
|
| + return SizeFor(index,
|
| + index < first_int32_index() ? index : first_int32_index());
|
| + }
|
| +
|
| + // Casting.
|
| + static inline ConstantPoolArray* cast(Object* obj);
|
| +
|
| + // Layout description.
|
| + static const int kFirstInt32IndexOffset = FixedArray::kHeaderSize;
|
| + static const int kFirstOffset = kFirstInt32IndexOffset + kPointerSize;
|
| +
|
| + // Dispatched behavior.
|
| + DECLARE_PRINTER(ConstantPoolArray)
|
| + DECLARE_VERIFIER(ConstantPoolArray)
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(ConstantPoolArray);
|
| +};
|
| +
|
| +
|
| // DescriptorArrays are fixed arrays used to hold instance descriptors.
|
| // The format of the these objects is:
|
| // [0]: Number of descriptors
|
|
|