| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 68db075981513de26558e03cc12017748c9d32f4..bfec7726786dabf54fdf89f122988b02df40f7f3 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4660,9 +4660,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined and clamps the converted value between 0 and 255.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalUint8ClampedArray> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalUint8ClampedArray> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalUint8ClampedArray)
|
|
|
| @@ -4684,9 +4684,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalInt8Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalInt8Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalInt8Array)
|
|
|
| @@ -4708,9 +4708,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalUint8Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalUint8Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalUint8Array)
|
|
|
| @@ -4732,9 +4732,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalInt16Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalInt16Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalInt16Array)
|
|
|
| @@ -4757,9 +4757,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalUint16Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalUint16Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalUint16Array)
|
|
|
| @@ -4781,9 +4781,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalInt32Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalInt32Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalInt32Array)
|
|
|
| @@ -4806,9 +4806,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalUint32Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalUint32Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalUint32Array)
|
|
|
| @@ -4831,9 +4831,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalFloat32Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalFloat32Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalFloat32Array)
|
|
|
| @@ -4856,9 +4856,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<ExternalFloat64Array> array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<ExternalFloat64Array> array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_CAST(ExternalFloat64Array)
|
|
|
| @@ -4921,9 +4921,9 @@
|
|
|
| // This accessor applies the correct conversion from Smi, HeapNumber
|
| // and undefined.
|
| - static Handle<Object> SetValue(Handle<JSObject> holder,
|
| - Handle<FixedTypedArray<Traits> > array,
|
| - uint32_t index, Handle<Object> value);
|
| + static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array,
|
| + uint32_t index,
|
| + Handle<Object> value);
|
|
|
| DECLARE_PRINTER(FixedTypedArray)
|
| DECLARE_VERIFIER(FixedTypedArray)
|
| @@ -10244,14 +10244,15 @@
|
| inline bool is_neuterable();
|
| inline void set_is_neuterable(bool value);
|
|
|
| - inline bool was_neutered();
|
| - inline void set_was_neutered(bool value);
|
| -
|
| // [weak_next]: linked list of array buffers.
|
| DECL_ACCESSORS(weak_next, Object)
|
|
|
| + // [weak_first_array]: weak linked list of views.
|
| + DECL_ACCESSORS(weak_first_view, Object)
|
| +
|
| DECLARE_CAST(JSArrayBuffer)
|
|
|
| + // Neutering. Only neuters the buffer, not associated typed arrays.
|
| void Neuter();
|
|
|
| // Dispatched behavior.
|
| @@ -10262,18 +10263,18 @@
|
| static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
|
| static const int kFlagOffset = kByteLengthOffset + kPointerSize;
|
| static const int kWeakNextOffset = kFlagOffset + kPointerSize;
|
| - static const int kSize = kWeakNextOffset + kPointerSize;
|
| + static const int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize;
|
| + static const int kSize = kWeakFirstViewOffset + kPointerSize;
|
|
|
| static const int kSizeWithInternalFields =
|
| kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize;
|
|
|
| + private:
|
| // Bit position in a flag
|
| static const int kIsExternalBit = 0;
|
| static const int kShouldBeFreed = 1;
|
| static const int kIsNeuterableBit = 2;
|
| - static const int kWasNeuteredBit = 3;
|
| -
|
| - private:
|
| +
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer);
|
| };
|
|
|
| @@ -10289,23 +10290,23 @@
|
| // [byte_length]: length of typed array in bytes.
|
| DECL_ACCESSORS(byte_length, Object)
|
|
|
| + // [weak_next]: linked list of typed arrays over the same array buffer.
|
| + DECL_ACCESSORS(weak_next, Object)
|
| +
|
| DECLARE_CAST(JSArrayBufferView)
|
|
|
| DECLARE_VERIFIER(JSArrayBufferView)
|
| -
|
| - inline bool WasNeutered() const;
|
|
|
| static const int kBufferOffset = JSObject::kHeaderSize;
|
| static const int kByteOffsetOffset = kBufferOffset + kPointerSize;
|
| static const int kByteLengthOffset = kByteOffsetOffset + kPointerSize;
|
| - static const int kViewSize = kByteLengthOffset + kPointerSize;
|
| -
|
| - private:
|
| -#ifdef VERIFY_HEAP
|
| - DECL_ACCESSORS(raw_byte_offset, Object)
|
| - DECL_ACCESSORS(raw_byte_length, Object)
|
| -#endif
|
| -
|
| + static const int kWeakNextOffset = kByteLengthOffset + kPointerSize;
|
| + static const int kViewSize = kWeakNextOffset + kPointerSize;
|
| +
|
| + protected:
|
| + void NeuterView();
|
| +
|
| + private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBufferView);
|
| };
|
|
|
| @@ -10314,6 +10315,9 @@
|
| public:
|
| // [length]: length of typed array in elements.
|
| DECL_ACCESSORS(length, Object)
|
| +
|
| + // Neutering. Only neuters this typed array.
|
| + void Neuter();
|
|
|
| DECLARE_CAST(JSTypedArray)
|
|
|
| @@ -10335,9 +10339,6 @@
|
| private:
|
| static Handle<JSArrayBuffer> MaterializeArrayBuffer(
|
| Handle<JSTypedArray> typed_array);
|
| -#ifdef VERIFY_HEAP
|
| - DECL_ACCESSORS(raw_length, Object)
|
| -#endif
|
|
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray);
|
| };
|
| @@ -10345,6 +10346,9 @@
|
|
|
| class JSDataView: public JSArrayBufferView {
|
| public:
|
| + // Only neuters this DataView
|
| + void Neuter();
|
| +
|
| DECLARE_CAST(JSDataView)
|
|
|
| // Dispatched behavior.
|
|
|