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

Side by Side Diff: runtime/vm/raw_object.h

Issue 12907023: Really remove SIMD types from dart:scalarlist. Fixes build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Really remove SIMD types from dart:scalarlist. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 V(ByteArray) \ 66 V(ByteArray) \
67 V(Int8Array) \ 67 V(Int8Array) \
68 V(Uint8Array) \ 68 V(Uint8Array) \
69 V(Uint8ClampedArray) \ 69 V(Uint8ClampedArray) \
70 V(Int16Array) \ 70 V(Int16Array) \
71 V(Uint16Array) \ 71 V(Uint16Array) \
72 V(Int32Array) \ 72 V(Int32Array) \
73 V(Uint32Array) \ 73 V(Uint32Array) \
74 V(Int64Array) \ 74 V(Int64Array) \
75 V(Uint64Array) \ 75 V(Uint64Array) \
76 V(Float32x4Array) \
77 V(Float32Array) \ 76 V(Float32Array) \
78 V(Float64Array) \ 77 V(Float64Array) \
79 V(ExternalInt8Array) \ 78 V(ExternalInt8Array) \
80 V(ExternalUint8Array) \ 79 V(ExternalUint8Array) \
81 V(ExternalUint8ClampedArray) \ 80 V(ExternalUint8ClampedArray) \
82 V(ExternalInt16Array) \ 81 V(ExternalInt16Array) \
83 V(ExternalUint16Array) \ 82 V(ExternalUint16Array) \
84 V(ExternalInt32Array) \ 83 V(ExternalInt32Array) \
85 V(ExternalUint32Array) \ 84 V(ExternalUint32Array) \
86 V(ExternalInt64Array) \ 85 V(ExternalInt64Array) \
87 V(ExternalUint64Array) \ 86 V(ExternalUint64Array) \
88 V(ExternalFloat32x4Array) \
89 V(ExternalFloat32Array) \ 87 V(ExternalFloat32Array) \
90 V(ExternalFloat64Array) \ 88 V(ExternalFloat64Array) \
91 V(TypedData) \ 89 V(TypedData) \
92 V(ExternalTypedData) \ 90 V(ExternalTypedData) \
93 V(Stacktrace) \ 91 V(Stacktrace) \
94 V(JSRegExp) \ 92 V(JSRegExp) \
95 V(WeakProperty) \ 93 V(WeakProperty) \
96 V(DartFunction) \ 94 V(DartFunction) \
97 V(Float32x4) \ 95 V(Float32x4) \
98 V(Uint32x4) \ 96 V(Uint32x4) \
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 1539
1542 1540
1543 class RawUint64Array : public RawByteArray { 1541 class RawUint64Array : public RawByteArray {
1544 RAW_HEAP_OBJECT_IMPLEMENTATION(Uint64Array); 1542 RAW_HEAP_OBJECT_IMPLEMENTATION(Uint64Array);
1545 1543
1546 // Variable length data follows here. 1544 // Variable length data follows here.
1547 uint64_t data_[0]; 1545 uint64_t data_[0];
1548 }; 1546 };
1549 1547
1550 1548
1551 class RawFloat32x4Array : public RawByteArray {
1552 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4Array);
1553
1554 // Variable length data follows here.
1555 simd128_value_t data_[0];
1556 };
1557
1558 class RawFloat32Array : public RawByteArray { 1549 class RawFloat32Array : public RawByteArray {
1559 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32Array); 1550 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32Array);
1560 1551
1561 // Variable length data follows here. 1552 // Variable length data follows here.
1562 float data_[0]; 1553 float data_[0];
1563 }; 1554 };
1564 1555
1565 1556
1566 class RawFloat64Array : public RawByteArray { 1557 class RawFloat64Array : public RawByteArray {
1567 RAW_HEAP_OBJECT_IMPLEMENTATION(Float64Array); 1558 RAW_HEAP_OBJECT_IMPLEMENTATION(Float64Array);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 1626
1636 1627
1637 class RawExternalUint64Array : public RawByteArray { 1628 class RawExternalUint64Array : public RawByteArray {
1638 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array); 1629 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array);
1639 1630
1640 uint64_t* data_; 1631 uint64_t* data_;
1641 void* peer_; 1632 void* peer_;
1642 }; 1633 };
1643 1634
1644 1635
1645 class RawExternalFloat32x4Array : public RawByteArray {
1646 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32x4Array);
1647
1648 simd128_value_t* data_;
1649 void* peer_;
1650 };
1651
1652
1653 class RawExternalFloat32Array : public RawByteArray { 1636 class RawExternalFloat32Array : public RawByteArray {
1654 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array); 1637 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array);
1655 1638
1656 float* data_; 1639 float* data_;
1657 void* peer_; 1640 void* peer_;
1658 }; 1641 };
1659 1642
1660 1643
1661 class RawExternalFloat64Array : public RawByteArray { 1644 class RawExternalFloat64Array : public RawByteArray {
1662 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat64Array); 1645 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat64Array);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 // Make sure this function is updated when new ByteArray types are added. 1809 // Make sure this function is updated when new ByteArray types are added.
1827 ASSERT(kInt8ArrayCid == kByteArrayCid + 1 && 1810 ASSERT(kInt8ArrayCid == kByteArrayCid + 1 &&
1828 kUint8ArrayCid == kByteArrayCid + 2 && 1811 kUint8ArrayCid == kByteArrayCid + 2 &&
1829 kUint8ClampedArrayCid == kByteArrayCid + 3 && 1812 kUint8ClampedArrayCid == kByteArrayCid + 3 &&
1830 kInt16ArrayCid == kByteArrayCid + 4 && 1813 kInt16ArrayCid == kByteArrayCid + 4 &&
1831 kUint16ArrayCid == kByteArrayCid + 5 && 1814 kUint16ArrayCid == kByteArrayCid + 5 &&
1832 kInt32ArrayCid == kByteArrayCid + 6 && 1815 kInt32ArrayCid == kByteArrayCid + 6 &&
1833 kUint32ArrayCid == kByteArrayCid + 7 && 1816 kUint32ArrayCid == kByteArrayCid + 7 &&
1834 kInt64ArrayCid == kByteArrayCid + 8 && 1817 kInt64ArrayCid == kByteArrayCid + 8 &&
1835 kUint64ArrayCid == kByteArrayCid + 9 && 1818 kUint64ArrayCid == kByteArrayCid + 9 &&
1836 kFloat32x4ArrayCid == kByteArrayCid + 10 && 1819 kFloat32ArrayCid == kByteArrayCid + 10 &&
1837 kFloat32ArrayCid == kByteArrayCid + 11 && 1820 kFloat64ArrayCid == kByteArrayCid + 11 &&
1838 kFloat64ArrayCid == kByteArrayCid + 12 && 1821 kExternalInt8ArrayCid == kByteArrayCid + 12 &&
1839 kExternalInt8ArrayCid == kByteArrayCid + 13 && 1822 kExternalUint8ArrayCid == kByteArrayCid + 13 &&
1840 kExternalUint8ArrayCid == kByteArrayCid + 14 && 1823 kExternalUint8ClampedArrayCid == kByteArrayCid + 14 &&
1841 kExternalUint8ClampedArrayCid == kByteArrayCid + 15 && 1824 kExternalInt16ArrayCid == kByteArrayCid + 15 &&
1842 kExternalInt16ArrayCid == kByteArrayCid + 16 && 1825 kExternalUint16ArrayCid == kByteArrayCid + 16 &&
1843 kExternalUint16ArrayCid == kByteArrayCid + 17 && 1826 kExternalInt32ArrayCid == kByteArrayCid + 17 &&
1844 kExternalInt32ArrayCid == kByteArrayCid + 18 && 1827 kExternalUint32ArrayCid == kByteArrayCid + 18 &&
1845 kExternalUint32ArrayCid == kByteArrayCid + 19 && 1828 kExternalInt64ArrayCid == kByteArrayCid + 19 &&
1846 kExternalInt64ArrayCid == kByteArrayCid + 20 && 1829 kExternalUint64ArrayCid == kByteArrayCid + 20 &&
1847 kExternalUint64ArrayCid == kByteArrayCid + 21 && 1830 kExternalFloat32ArrayCid == kByteArrayCid + 21 &&
1848 kExternalFloat32x4ArrayCid == kByteArrayCid + 22 && 1831 kExternalFloat64ArrayCid == kByteArrayCid + 22 &&
1849 kExternalFloat32ArrayCid == kByteArrayCid + 23 && 1832 kTypedDataCid == kByteArrayCid + 23);
1850 kExternalFloat64ArrayCid == kByteArrayCid + 24 &&
1851 kTypedDataCid == kByteArrayCid + 25);
1852 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); 1833 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid);
1853 } 1834 }
1854 1835
1855 1836
1856 inline bool RawObject::IsExternalByteArrayClassId(intptr_t index) { 1837 inline bool RawObject::IsExternalByteArrayClassId(intptr_t index) {
1857 // Make sure this function is updated when new ByteArray types are added. 1838 // Make sure this function is updated when new ByteArray types are added.
1858 ASSERT(kExternalUint8ArrayCid == kExternalInt8ArrayCid + 1 && 1839 ASSERT(kExternalUint8ArrayCid == kExternalInt8ArrayCid + 1 &&
1859 kExternalUint8ClampedArrayCid == kExternalInt8ArrayCid + 2 && 1840 kExternalUint8ClampedArrayCid == kExternalInt8ArrayCid + 2 &&
1860 kExternalInt16ArrayCid == kExternalInt8ArrayCid + 3 && 1841 kExternalInt16ArrayCid == kExternalInt8ArrayCid + 3 &&
1861 kExternalUint16ArrayCid == kExternalInt8ArrayCid + 4 && 1842 kExternalUint16ArrayCid == kExternalInt8ArrayCid + 4 &&
1862 kExternalInt32ArrayCid == kExternalInt8ArrayCid + 5 && 1843 kExternalInt32ArrayCid == kExternalInt8ArrayCid + 5 &&
1863 kExternalUint32ArrayCid == kExternalInt8ArrayCid + 6 && 1844 kExternalUint32ArrayCid == kExternalInt8ArrayCid + 6 &&
1864 kExternalInt64ArrayCid == kExternalInt8ArrayCid + 7 && 1845 kExternalInt64ArrayCid == kExternalInt8ArrayCid + 7 &&
1865 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1846 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1866 kExternalFloat32x4ArrayCid == kExternalInt8ArrayCid + 9 && 1847 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1867 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 10 && 1848 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1868 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 11 && 1849 kTypedDataCid == kExternalInt8ArrayCid + 11);
1869 kTypedDataCid == kExternalInt8ArrayCid + 12);
1870 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1850 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1871 } 1851 }
1872 1852
1873 1853
1874 inline bool RawObject::IsTypedDataClassId(intptr_t index) { 1854 inline bool RawObject::IsTypedDataClassId(intptr_t index) {
1875 // Make sure this is updated when new TypedData types are added. 1855 // Make sure this is updated when new TypedData types are added.
1876 ASSERT(kTypedDataUint8ArrayCid == kTypedDataInt8ArrayCid + 1 && 1856 ASSERT(kTypedDataUint8ArrayCid == kTypedDataInt8ArrayCid + 1 &&
1877 kTypedDataUint8ClampedArrayCid == kTypedDataInt8ArrayCid + 2 && 1857 kTypedDataUint8ClampedArrayCid == kTypedDataInt8ArrayCid + 2 &&
1878 kTypedDataInt16ArrayCid == kTypedDataInt8ArrayCid + 3 && 1858 kTypedDataInt16ArrayCid == kTypedDataInt8ArrayCid + 3 &&
1879 kTypedDataUint16ArrayCid == kTypedDataInt8ArrayCid + 4 && 1859 kTypedDataUint16ArrayCid == kTypedDataInt8ArrayCid + 4 &&
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 // Make sure this is updated when new TypedData types are added. 1924 // Make sure this is updated when new TypedData types are added.
1945 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1925 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1946 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1926 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1947 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1927 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1948 return (kNullCid - kTypedDataInt8ArrayCid); 1928 return (kNullCid - kTypedDataInt8ArrayCid);
1949 } 1929 }
1950 1930
1951 } // namespace dart 1931 } // namespace dart
1952 1932
1953 #endif // VM_RAW_OBJECT_H_ 1933 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698