| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index ba690ecab52c1cfafbe4a2e511134fc247a4328d..19e5b0f4c255b3f349d2ad10c414824096a841e5 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -630,8 +630,10 @@ enum CompareResult {
|
| WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
|
|
|
|
|
| +class ElementsHandler;
|
| class StringStream;
|
| class ObjectVisitor;
|
| +class DictionaryElementsHandlerImpl;
|
|
|
| struct ValueInfo : public Malloced {
|
| ValueInfo() : type(FIRST_TYPE), ptr(NULL), str(NULL), number(0) { }
|
| @@ -1488,6 +1490,7 @@ class JSObject: public JSReceiver {
|
| inline void initialize_elements();
|
| MUST_USE_RESULT inline MaybeObject* ResetElements();
|
| inline ElementsKind GetElementsKind();
|
| + inline ElementsHandler* GetElementsHandler();
|
| inline bool HasFastElements();
|
| inline bool HasFastDoubleElements();
|
| inline bool HasDictionaryElements();
|
| @@ -1733,11 +1736,6 @@ class JSObject: public JSReceiver {
|
| MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index);
|
| MaybeObject* GetElementWithInterceptor(Object* receiver, uint32_t index);
|
|
|
| - // Get external element value at index if there is one and undefined
|
| - // otherwise. Can return a failure if allocation of a heap number
|
| - // failed.
|
| - MaybeObject* GetExternalElement(uint32_t index);
|
| -
|
| // Replace the elements' backing store with fast elements of the given
|
| // capacity. Update the length for JSArrays. Returns the new backing
|
| // store.
|
| @@ -2001,6 +1999,8 @@ class JSObject: public JSReceiver {
|
| };
|
|
|
| private:
|
| + friend class DictionaryElementsHandlerImpl;
|
| +
|
| MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver,
|
| Object* structure,
|
| uint32_t index,
|
| @@ -2021,8 +2021,6 @@ class JSObject: public JSReceiver {
|
| StrictModeFlag strict_mode,
|
| bool check_prototype);
|
|
|
| - MaybeObject* GetElementPostInterceptor(Object* receiver, uint32_t index);
|
| -
|
| MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name,
|
| DeleteMode mode);
|
| MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name);
|
| @@ -2092,6 +2090,7 @@ class FixedArray: public FixedArrayBase {
|
| inline Object* get(int index);
|
| // Setter that uses write barrier.
|
| inline void set(int index, Object* value);
|
| + inline bool is_the_hole(int index);
|
|
|
| // Setter that doesn't need write barrier).
|
| inline void set(int index, Smi* value);
|
| @@ -2197,7 +2196,8 @@ class FixedDoubleArray: public FixedArrayBase {
|
| inline void Initialize(NumberDictionary* from);
|
|
|
| // Setter and getter for elements.
|
| - inline double get(int index);
|
| + inline double get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, double value);
|
| inline void set_the_hole(int index);
|
|
|
| @@ -3129,6 +3129,8 @@ class ExternalArray: public HeapObject {
|
| inline int length();
|
| inline void set_length(int value);
|
|
|
| + inline bool is_the_hole(int index) { return false; }
|
| +
|
| // [external_pointer]: The pointer to the external memory area backing this
|
| // external array.
|
| DECL_ACCESSORS(external_pointer, void) // Pointer to the data store.
|
| @@ -3164,7 +3166,8 @@ class ExternalPixelArray: public ExternalArray {
|
| inline uint8_t* external_pixel_pointer();
|
|
|
| // Setter and getter.
|
| - inline uint8_t get(int index);
|
| + inline uint8_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, uint8_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber and
|
| @@ -3192,7 +3195,8 @@ class ExternalPixelArray: public ExternalArray {
|
| class ExternalByteArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline int8_t get(int index);
|
| + inline int8_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, int8_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3220,7 +3224,8 @@ class ExternalByteArray: public ExternalArray {
|
| class ExternalUnsignedByteArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline uint8_t get(int index);
|
| + inline uint8_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, uint8_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3248,7 +3253,8 @@ class ExternalUnsignedByteArray: public ExternalArray {
|
| class ExternalShortArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline int16_t get(int index);
|
| + inline int16_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, int16_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3276,7 +3282,8 @@ class ExternalShortArray: public ExternalArray {
|
| class ExternalUnsignedShortArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline uint16_t get(int index);
|
| + inline uint16_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, uint16_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3304,7 +3311,8 @@ class ExternalUnsignedShortArray: public ExternalArray {
|
| class ExternalIntArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline int32_t get(int index);
|
| + inline int32_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, int32_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3332,7 +3340,8 @@ class ExternalIntArray: public ExternalArray {
|
| class ExternalUnsignedIntArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline uint32_t get(int index);
|
| + inline uint32_t get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, uint32_t value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3360,7 +3369,8 @@ class ExternalUnsignedIntArray: public ExternalArray {
|
| class ExternalFloatArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline float get(int index);
|
| + inline float get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, float value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| @@ -3388,7 +3398,8 @@ class ExternalFloatArray: public ExternalArray {
|
| class ExternalDoubleArray: public ExternalArray {
|
| public:
|
| // Setter and getter.
|
| - inline double get(int index);
|
| + inline double get_scalar(int index);
|
| + inline MaybeObject* get(int index);
|
| inline void set(int index, double value);
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
|
|