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

Unified Diff: runtime/vm/raw_object.h

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/object_store.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 2889ff92760f8f48cdfda083de3dd53c704d9dca..d904d206af8bb55c074d18be67e26d200a16d90f 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -71,6 +71,7 @@ namespace dart {
V(Uint32Array) \
V(Int64Array) \
V(Uint64Array) \
+ V(Float32x4Array) \
V(Float32Array) \
V(Float64Array) \
V(ExternalInt8Array) \
@@ -82,12 +83,16 @@ namespace dart {
V(ExternalUint32Array) \
V(ExternalInt64Array) \
V(ExternalUint64Array) \
+ V(ExternalFloat32x4Array) \
V(ExternalFloat32Array) \
V(ExternalFloat64Array) \
V(Stacktrace) \
V(JSRegExp) \
V(WeakProperty) \
V(DartFunction) \
+ V(Float32x4) \
+ V(Uint32x4) \
+
#define CLASS_LIST_STRINGS(V) \
V(String) \
@@ -1301,6 +1306,24 @@ class RawGrowableObjectArray : public RawInstance {
};
+class RawFloat32x4 : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4);
+
+ float value_[4];
+
+ friend class SnapshotReader;
+};
+
+
+class RawUint32x4 : public RawInstance {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(Uint32x4);
+
+ uint32_t value_[4];
+
+ friend class SnapshotReader;
+};
+
+
// Define an aliases for intptr_t.
#if defined(ARCH_IS_32_BIT)
#define RawIntPtrArray RawInt32Array
@@ -1401,6 +1424,13 @@ class RawUint64Array : public RawByteArray {
};
+class RawFloat32x4Array : public RawByteArray {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4Array);
+
+ // Variable length data follows here.
+ simd_value_t data_[0];
+};
+
class RawFloat32Array : public RawByteArray {
RAW_HEAP_OBJECT_IMPLEMENTATION(Float32Array);
@@ -1490,6 +1520,14 @@ class RawExternalUint64Array : public RawByteArray {
};
+class RawExternalFloat32x4Array : public RawByteArray {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32x4Array);
+
+ simd_value_t* data_;
+ void* peer_;
+};
+
+
class RawExternalFloat32Array : public RawByteArray {
RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array);
@@ -1670,20 +1708,22 @@ inline bool RawObject::IsByteArrayClassId(intptr_t index) {
kUint32ArrayCid == kByteArrayCid + 7 &&
kInt64ArrayCid == kByteArrayCid + 8 &&
kUint64ArrayCid == kByteArrayCid + 9 &&
- kFloat32ArrayCid == kByteArrayCid + 10 &&
- kFloat64ArrayCid == kByteArrayCid + 11 &&
- kExternalInt8ArrayCid == kByteArrayCid + 12 &&
- kExternalUint8ArrayCid == kByteArrayCid + 13 &&
- kExternalUint8ClampedArrayCid == kByteArrayCid + 14 &&
- kExternalInt16ArrayCid == kByteArrayCid + 15 &&
- kExternalUint16ArrayCid == kByteArrayCid + 16 &&
- kExternalInt32ArrayCid == kByteArrayCid + 17 &&
- kExternalUint32ArrayCid == kByteArrayCid + 18 &&
- kExternalInt64ArrayCid == kByteArrayCid + 19 &&
- kExternalUint64ArrayCid == kByteArrayCid + 20 &&
- kExternalFloat32ArrayCid == kByteArrayCid + 21 &&
- kExternalFloat64ArrayCid == kByteArrayCid + 22 &&
- kStacktraceCid == kByteArrayCid + 23);
+ kFloat32x4ArrayCid == kByteArrayCid + 10 &&
+ kFloat32ArrayCid == kByteArrayCid + 11 &&
+ kFloat64ArrayCid == kByteArrayCid + 12 &&
+ kExternalInt8ArrayCid == kByteArrayCid + 13 &&
+ kExternalUint8ArrayCid == kByteArrayCid + 14 &&
+ kExternalUint8ClampedArrayCid == kByteArrayCid + 15 &&
+ kExternalInt16ArrayCid == kByteArrayCid + 16 &&
+ kExternalUint16ArrayCid == kByteArrayCid + 17 &&
+ kExternalInt32ArrayCid == kByteArrayCid + 18 &&
+ kExternalUint32ArrayCid == kByteArrayCid + 19 &&
+ kExternalInt64ArrayCid == kByteArrayCid + 20 &&
+ kExternalUint64ArrayCid == kByteArrayCid + 21 &&
+ kExternalFloat32x4ArrayCid == kByteArrayCid + 22 &&
+ kExternalFloat32ArrayCid == kByteArrayCid + 23 &&
+ kExternalFloat64ArrayCid == kByteArrayCid + 24 &&
+ kStacktraceCid == kByteArrayCid + 25);
return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid);
}
@@ -1697,9 +1737,10 @@ inline bool RawObject::IsExternalByteArrayClassId(intptr_t index) {
kExternalUint32ArrayCid == kExternalInt8ArrayCid + 6 &&
kExternalInt64ArrayCid == kExternalInt8ArrayCid + 7 &&
kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
- kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
- kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
- kStacktraceCid == kExternalInt8ArrayCid + 11);
+ kExternalFloat32x4ArrayCid == kExternalInt8ArrayCid + 9 &&
+ kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 10 &&
+ kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 11 &&
+ kStacktraceCid == kExternalInt8ArrayCid + 12);
return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
}
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698