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

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

Issue 12871015: SIMD plumbing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: s/materialize/Materialize 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.cc ('k') | runtime/vm/raw_object_snapshot.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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 friend class SnapshotReader; 1382 friend class SnapshotReader;
1383 }; 1383 };
1384 1384
1385 1385
1386 class RawFloat32x4 : public RawInstance { 1386 class RawFloat32x4 : public RawInstance {
1387 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4); 1387 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4);
1388 1388
1389 float value_[4]; 1389 float value_[4];
1390 1390
1391 friend class SnapshotReader; 1391 friend class SnapshotReader;
1392 public:
1393 float x() const { return value_[0]; }
1394 float y() const { return value_[1]; }
1395 float z() const { return value_[2]; }
1396 float w() const { return value_[3]; }
1392 }; 1397 };
1393 1398
1394 1399
1395 class RawUint32x4 : public RawInstance { 1400 class RawUint32x4 : public RawInstance {
1396 RAW_HEAP_OBJECT_IMPLEMENTATION(Uint32x4); 1401 RAW_HEAP_OBJECT_IMPLEMENTATION(Uint32x4);
1397 1402
1398 uint32_t value_[4]; 1403 uint32_t value_[4];
1399 1404
1400 friend class SnapshotReader; 1405 friend class SnapshotReader;
1406 public:
1407 uint32_t x() const { return value_[0]; }
1408 uint32_t y() const { return value_[1]; }
1409 uint32_t z() const { return value_[2]; }
1410 uint32_t w() const { return value_[3]; }
1401 }; 1411 };
1402 1412
1403 1413
1404 // Define an aliases for intptr_t. 1414 // Define an aliases for intptr_t.
1405 #if defined(ARCH_IS_32_BIT) 1415 #if defined(ARCH_IS_32_BIT)
1406 #define RawIntPtrArray RawInt32Array 1416 #define RawIntPtrArray RawInt32Array
1407 #define IntPtrArray Int32Array 1417 #define IntPtrArray Int32Array
1408 #elif defined(ARCH_IS_64_BIT) 1418 #elif defined(ARCH_IS_64_BIT)
1409 #define RawIntPtrArray RawInt64Array 1419 #define RawIntPtrArray RawInt64Array
1410 #define IntPtrArray Int64Array 1420 #define IntPtrArray Int64Array
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 1534
1525 // Variable length data follows here. 1535 // Variable length data follows here.
1526 uint64_t data_[0]; 1536 uint64_t data_[0];
1527 }; 1537 };
1528 1538
1529 1539
1530 class RawFloat32x4Array : public RawByteArray { 1540 class RawFloat32x4Array : public RawByteArray {
1531 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4Array); 1541 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32x4Array);
1532 1542
1533 // Variable length data follows here. 1543 // Variable length data follows here.
1534 simd_value_t data_[0]; 1544 simd128_value_t data_[0];
1535 }; 1545 };
1536 1546
1537 class RawFloat32Array : public RawByteArray { 1547 class RawFloat32Array : public RawByteArray {
1538 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32Array); 1548 RAW_HEAP_OBJECT_IMPLEMENTATION(Float32Array);
1539 1549
1540 // Variable length data follows here. 1550 // Variable length data follows here.
1541 float data_[0]; 1551 float data_[0];
1542 }; 1552 };
1543 1553
1544 1554
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array); 1629 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array);
1620 1630
1621 uint64_t* data_; 1631 uint64_t* data_;
1622 void* peer_; 1632 void* peer_;
1623 }; 1633 };
1624 1634
1625 1635
1626 class RawExternalFloat32x4Array : public RawByteArray { 1636 class RawExternalFloat32x4Array : public RawByteArray {
1627 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32x4Array); 1637 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32x4Array);
1628 1638
1629 simd_value_t* data_; 1639 simd128_value_t* data_;
1630 void* peer_; 1640 void* peer_;
1631 }; 1641 };
1632 1642
1633 1643
1634 class RawExternalFloat32Array : public RawByteArray { 1644 class RawExternalFloat32Array : public RawByteArray {
1635 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array); 1645 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array);
1636 1646
1637 float* data_; 1647 float* data_;
1638 void* peer_; 1648 void* peer_;
1639 }; 1649 };
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 inline intptr_t RawObject::NumberOfTypedDataClasses() { 1911 inline intptr_t RawObject::NumberOfTypedDataClasses() {
1902 // Make sure this is updated when new TypedData types are added. 1912 // Make sure this is updated when new TypedData types are added.
1903 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11); 1913 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11);
1904 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11); 1914 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11);
1905 return (kNullCid - kTypedDataInt8ArrayCid); 1915 return (kNullCid - kTypedDataInt8ArrayCid);
1906 } 1916 }
1907 1917
1908 } // namespace dart 1918 } // namespace dart
1909 1919
1910 #endif // VM_RAW_OBJECT_H_ 1920 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698