Index: runtime/vm/raw_object.cc |
=================================================================== |
--- runtime/vm/raw_object.cc (revision 20600) |
+++ runtime/vm/raw_object.cc (working copy) |
@@ -119,83 +119,6 @@ |
instance_size = Array::InstanceSize(array_length); |
break; |
} |
- case kInt8ArrayCid: { |
- const RawInt8Array* raw_byte_array = |
- reinterpret_cast<const RawInt8Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Int8Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kUint8ArrayCid: { |
- const RawUint8Array* raw_byte_array = |
- reinterpret_cast<const RawUint8Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Uint8Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kUint8ClampedArrayCid: { |
- const RawUint8ClampedArray* raw_byte_array = |
- reinterpret_cast<const RawUint8ClampedArray*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Uint8ClampedArray::InstanceSize(byte_array_length); |
- break; |
- } |
- case kInt16ArrayCid: { |
- const RawInt16Array* raw_byte_array = |
- reinterpret_cast<const RawInt16Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Int16Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kUint16ArrayCid: { |
- const RawUint16Array* raw_byte_array = |
- reinterpret_cast<const RawUint16Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Uint16Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kInt32ArrayCid: { |
- const RawInt32Array* raw_byte_array = |
- reinterpret_cast<const RawInt32Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Int32Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kUint32ArrayCid: { |
- const RawUint32Array* raw_byte_array = |
- reinterpret_cast<const RawUint32Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Uint32Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kInt64ArrayCid: { |
- const RawInt64Array* raw_byte_array = |
- reinterpret_cast<const RawInt64Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Int64Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kUint64ArrayCid: { |
- const RawUint64Array* raw_byte_array = |
- reinterpret_cast<const RawUint64Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Uint64Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kFloat32ArrayCid: { |
- const RawFloat32Array* raw_byte_array = |
- reinterpret_cast<const RawFloat32Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Float32Array::InstanceSize(byte_array_length); |
- break; |
- } |
- case kFloat64ArrayCid: { |
- const RawFloat64Array* raw_byte_array = |
- reinterpret_cast<const RawFloat64Array*>(this); |
- intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_); |
- instance_size = Float64Array::InstanceSize(byte_array_length); |
- break; |
- } |
#define SIZE_FROM_CLASS(clazz) \ |
case kTypedData##clazz##Cid: |
CLASS_LIST_TYPED_DATA(SIZE_FROM_CLASS) { |
@@ -830,222 +753,6 @@ |
} |
-intptr_t RawByteArray::VisitByteArrayPointers(RawByteArray* raw_obj, |
- ObjectPointerVisitor* visitor) { |
- // ByteArray is an abstract class. |
- UNREACHABLE(); |
- return 0; |
-} |
- |
- |
-intptr_t RawInt8Array::VisitInt8ArrayPointers( |
- RawInt8Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Int8Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawUint8Array::VisitUint8ArrayPointers( |
- RawUint8Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Uint8Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawUint8ClampedArray::VisitUint8ClampedArrayPointers( |
- RawUint8ClampedArray *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Uint8ClampedArray::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawInt16Array::VisitInt16ArrayPointers( |
- RawInt16Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Int16Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawUint16Array::VisitUint16ArrayPointers( |
- RawUint16Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Uint16Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawInt32Array::VisitInt32ArrayPointers( |
- RawInt32Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Int32Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawUint32Array::VisitUint32ArrayPointers( |
- RawUint32Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Uint32Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawInt64Array::VisitInt64ArrayPointers( |
- RawInt64Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Int64Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawUint64Array::VisitUint64ArrayPointers( |
- RawUint64Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Uint64Array::InstanceSize(length); |
-} |
- |
-intptr_t RawFloat32Array::VisitFloat32ArrayPointers( |
- RawFloat32Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Float32Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawFloat64Array::VisitFloat64ArrayPointers( |
- RawFloat64Array *raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- intptr_t length = Smi::Value(raw_obj->ptr()->length_); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return Float64Array::InstanceSize(length); |
-} |
- |
- |
-intptr_t RawExternalInt8Array::VisitExternalInt8ArrayPointers( |
- RawExternalInt8Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalInt8Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalUint8Array::VisitExternalUint8ArrayPointers( |
- RawExternalUint8Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalUint8Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalUint8ClampedArray::VisitExternalUint8ClampedArrayPointers( |
- RawExternalUint8ClampedArray* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalUint8ClampedArray::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalInt16Array::VisitExternalInt16ArrayPointers( |
- RawExternalInt16Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalInt16Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalUint16Array::VisitExternalUint16ArrayPointers( |
- RawExternalUint16Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalUint16Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalInt32Array::VisitExternalInt32ArrayPointers( |
- RawExternalInt32Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalInt32Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalUint32Array::VisitExternalUint32ArrayPointers( |
- RawExternalUint32Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalUint32Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalInt64Array::VisitExternalInt64ArrayPointers( |
- RawExternalInt64Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalInt64Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalUint64Array::VisitExternalUint64ArrayPointers( |
- RawExternalUint64Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalUint64Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalFloat32Array::VisitExternalFloat32ArrayPointers( |
- RawExternalFloat32Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalFloat32Array::InstanceSize(); |
-} |
- |
- |
-intptr_t RawExternalFloat64Array::VisitExternalFloat64ArrayPointers( |
- RawExternalFloat64Array* raw_obj, ObjectPointerVisitor* visitor) { |
- // Make sure that we got here with the tagged pointer as this. |
- ASSERT(raw_obj->IsHeapObject()); |
- visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
- return ExternalFloat64Array::InstanceSize(); |
-} |
- |
- |
intptr_t RawTypedData::VisitTypedDataPointers( |
RawTypedData* raw_obj, ObjectPointerVisitor* visitor) { |
// Make sure that we got here with the tagged pointer as this. |