Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: runtime/vm/raw_object.cc

Issue 12303013: Simd128Float32, Simd128Mask, and Simd128Float32List additions for dart:scalarlist (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix strict aliasing warning Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index ecf2a79ee850123e3c6cd05f3a4c2ebe7a065606..0e47312ba7844aa4775feee1fe23b062cb3e9026 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -182,6 +182,13 @@ intptr_t RawObject::SizeFromClass() const {
instance_size = Uint64Array::InstanceSize(byte_array_length);
break;
}
+ case kFloat32x4ArrayCid: {
+ const RawFloat32x4Array* raw_byte_array =
+ reinterpret_cast<const RawFloat32x4Array*>(this);
+ intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_);
+ instance_size = Float32x4Array::InstanceSize(byte_array_length);
+ break;
+ }
case kFloat32ArrayCid: {
const RawFloat32Array* raw_byte_array =
reinterpret_cast<const RawFloat32Array*>(this);
@@ -761,6 +768,22 @@ intptr_t RawGrowableObjectArray::VisitGrowableObjectArrayPointers(
}
+intptr_t RawFloat32x4::VisitFloat32x4Pointers(
+ RawFloat32x4* raw_obj,
+ ObjectPointerVisitor* visitor) {
+ ASSERT(raw_obj->IsHeapObject());
+ return Float32x4::InstanceSize();
+}
+
+
+intptr_t RawUint32x4::VisitUint32x4Pointers(
+ RawUint32x4* raw_obj,
+ ObjectPointerVisitor* visitor) {
+ ASSERT(raw_obj->IsHeapObject());
+ return Uint32x4::InstanceSize();
+}
+
+
intptr_t RawByteArray::VisitByteArrayPointers(RawByteArray* raw_obj,
ObjectPointerVisitor* visitor) {
// ByteArray is an abstract class.
@@ -859,6 +882,15 @@ intptr_t RawUint64Array::VisitUint64ArrayPointers(
}
+intptr_t RawFloat32x4Array::VisitFloat32x4ArrayPointers(
+ RawFloat32x4Array *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 Float32x4Array::InstanceSize(length);
+}
+
intptr_t RawFloat32Array::VisitFloat32ArrayPointers(
RawFloat32Array *raw_obj, ObjectPointerVisitor* visitor) {
// Make sure that we got here with the tagged pointer as this.
@@ -960,6 +992,16 @@ intptr_t RawExternalUint64Array::VisitExternalUint64ArrayPointers(
}
+intptr_t
+ RawExternalFloat32x4Array::VisitExternalFloat32x4ArrayPointers(
+ RawExternalFloat32x4Array* 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 ExternalFloat32x4Array::InstanceSize();
+}
+
+
intptr_t RawExternalFloat32Array::VisitExternalFloat32ArrayPointers(
RawExternalFloat32Array* raw_obj, ObjectPointerVisitor* visitor) {
// Make sure that we got here with the tagged pointer as this.
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698