| Index: src/objects.h
|
| ===================================================================
|
| --- src/objects.h (revision 8931)
|
| +++ src/objects.h (working copy)
|
| @@ -62,17 +62,8 @@
|
| // - JSMessageObject
|
| // - JSProxy
|
| // - JSFunctionProxy
|
| -// - ByteArray
|
| -// - ExternalArray
|
| -// - ExternalPixelArray
|
| -// - ExternalByteArray
|
| -// - ExternalUnsignedByteArray
|
| -// - ExternalShortArray
|
| -// - ExternalUnsignedShortArray
|
| -// - ExternalIntArray
|
| -// - ExternalUnsignedIntArray
|
| -// - ExternalFloatArray
|
| // - FixedArrayBase
|
| +// - ByteArray
|
| // - FixedArray
|
| // - DescriptorArray
|
| // - HashTable
|
| @@ -85,6 +76,15 @@
|
| // - JSFunctionResultCache
|
| // - SerializedScopeInfo
|
| // - FixedDoubleArray
|
| +// - ExternalArray
|
| +// - ExternalPixelArray
|
| +// - ExternalByteArray
|
| +// - ExternalUnsignedByteArray
|
| +// - ExternalShortArray
|
| +// - ExternalUnsignedShortArray
|
| +// - ExternalIntArray
|
| +// - ExternalUnsignedIntArray
|
| +// - ExternalFloatArray
|
| // - String
|
| // - SeqString
|
| // - SeqAsciiString
|
| @@ -635,10 +635,11 @@
|
| WriteBarrierMode mode = UPDATE_WRITE_BARRIER); \
|
|
|
|
|
| +class DictionaryElementsAccessor;
|
| class ElementsAccessor;
|
| -class StringStream;
|
| +class FixedArrayBase;
|
| class ObjectVisitor;
|
| -class DictionaryElementsAccessor;
|
| +class StringStream;
|
|
|
| struct ValueInfo : public Malloced {
|
| ValueInfo() : type(FIRST_TYPE), ptr(NULL), str(NULL), number(0) { }
|
| @@ -743,6 +744,7 @@
|
| V(FixedDoubleArray) \
|
| V(Context) \
|
| V(GlobalContext) \
|
| + V(SerializedScopeInfo) \
|
| V(JSFunction) \
|
| V(Code) \
|
| V(Oddball) \
|
| @@ -1492,7 +1494,7 @@
|
| // In the slow mode the elements is either a NumberDictionary, an
|
| // ExternalArray, or a FixedArray parameter map for a (non-strict)
|
| // arguments object.
|
| - DECL_ACCESSORS(elements, HeapObject)
|
| + DECL_ACCESSORS(elements, FixedArrayBase)
|
| inline void initialize_elements();
|
| MUST_USE_RESULT inline MaybeObject* ResetElements();
|
| inline ElementsKind GetElementsKind();
|
| @@ -2084,6 +2086,7 @@
|
| static const int kHeaderSize = kLengthOffset + kPointerSize;
|
| };
|
|
|
| +
|
| class FixedDoubleArray;
|
|
|
| // FixedArray describes fixed-sized arrays with element type Object*.
|
| @@ -3053,12 +3056,8 @@
|
| // ByteArray represents fixed sized byte arrays. Used by the outside world,
|
| // such as PCRE, and also by the memory allocator and garbage collector to
|
| // fill in free blocks in the heap.
|
| -class ByteArray: public HeapObject {
|
| +class ByteArray: public FixedArrayBase {
|
| public:
|
| - // [length]: length of the array.
|
| - inline int length();
|
| - inline void set_length(int value);
|
| -
|
| // Setter and getter.
|
| inline byte get(int index);
|
| inline void set(int index, byte value);
|
| @@ -3103,10 +3102,6 @@
|
| #endif
|
|
|
| // Layout description.
|
| - // Length is smi tagged when it is stored.
|
| - static const int kLengthOffset = HeapObject::kHeaderSize;
|
| - static const int kHeaderSize = kLengthOffset + kPointerSize;
|
| -
|
| static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
|
|
| // Maximal memory consumption for a single ByteArray.
|
| @@ -3130,11 +3125,8 @@
|
| // Out-of-range values passed to the setter are converted via a C
|
| // cast, not clamping. Out-of-range indices cause exceptions to be
|
| // raised rather than being silently ignored.
|
| -class ExternalArray: public HeapObject {
|
| +class ExternalArray: public FixedArrayBase {
|
| public:
|
| - // [length]: length of the array.
|
| - inline int length();
|
| - inline void set_length(int value);
|
|
|
| inline bool is_the_hole(int index) { return false; }
|
|
|
| @@ -3149,9 +3141,8 @@
|
| static const int kMaxLength = 0x3fffffff;
|
|
|
| // ExternalArray headers are not quadword aligned.
|
| - static const int kLengthOffset = HeapObject::kHeaderSize;
|
| static const int kExternalPointerOffset =
|
| - POINTER_SIZE_ALIGN(kLengthOffset + kIntSize);
|
| + POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize);
|
| static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
|
| static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
|
|
| @@ -4444,6 +4435,7 @@
|
| #define FUNCTIONS_WITH_ID_LIST(V) \
|
| V(Array.prototype, push, ArrayPush) \
|
| V(Array.prototype, pop, ArrayPop) \
|
| + V(Function.prototype, apply, FunctionApply) \
|
| V(String.prototype, charCodeAt, StringCharCodeAt) \
|
| V(String.prototype, charAt, StringCharAt) \
|
| V(String, fromCharCode, StringFromCharCode) \
|
|
|