| OLD | NEW |
| 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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData); | 1470 RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData); |
| 1471 | 1471 |
| 1472 protected: | 1472 protected: |
| 1473 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1473 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 1474 RawSmi* length_; | 1474 RawSmi* length_; |
| 1475 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1475 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 1476 | 1476 |
| 1477 // Variable length data follows here. | 1477 // Variable length data follows here. |
| 1478 uint8_t data_[0]; | 1478 uint8_t data_[0]; |
| 1479 | 1479 |
| 1480 friend class Api; |
| 1480 friend class Object; | 1481 friend class Object; |
| 1481 friend class Instance; | 1482 friend class Instance; |
| 1482 }; | 1483 }; |
| 1483 | 1484 |
| 1484 | 1485 |
| 1485 class RawExternalTypedData : public RawInstance { | 1486 class RawExternalTypedData : public RawInstance { |
| 1486 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData); | 1487 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData); |
| 1487 | 1488 |
| 1488 protected: | 1489 protected: |
| 1489 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1490 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 // Make sure this is updated when new TypedData types are added. | 1749 // Make sure this is updated when new TypedData types are added. |
| 1749 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13); | 1750 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13); |
| 1750 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14); | 1751 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14); |
| 1751 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13); | 1752 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13); |
| 1752 return (kNullCid - kTypedDataInt8ArrayCid); | 1753 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1753 } | 1754 } |
| 1754 | 1755 |
| 1755 } // namespace dart | 1756 } // namespace dart |
| 1756 | 1757 |
| 1757 #endif // VM_RAW_OBJECT_H_ | 1758 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |