| 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/atomic.h" | 9 #include "vm/atomic.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 | 1486 |
| 1487 | 1487 |
| 1488 class RawString : public RawInstance { | 1488 class RawString : public RawInstance { |
| 1489 RAW_HEAP_OBJECT_IMPLEMENTATION(String); | 1489 RAW_HEAP_OBJECT_IMPLEMENTATION(String); |
| 1490 | 1490 |
| 1491 protected: | 1491 protected: |
| 1492 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1492 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 1493 RawSmi* length_; | 1493 RawSmi* length_; |
| 1494 RawSmi* hash_; | 1494 RawSmi* hash_; |
| 1495 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->hash_); } | 1495 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->hash_); } |
| 1496 |
| 1497 friend class Library; |
| 1496 }; | 1498 }; |
| 1497 | 1499 |
| 1498 | 1500 |
| 1499 class RawOneByteString : public RawString { | 1501 class RawOneByteString : public RawString { |
| 1500 RAW_HEAP_OBJECT_IMPLEMENTATION(OneByteString); | 1502 RAW_HEAP_OBJECT_IMPLEMENTATION(OneByteString); |
| 1501 | 1503 |
| 1502 // Variable length data follows here. | 1504 // Variable length data follows here. |
| 1503 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } | 1505 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } |
| 1504 | 1506 |
| 1505 friend class ApiMessageReader; | 1507 friend class ApiMessageReader; |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2055 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2057 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2056 kTypedDataInt8ArrayViewCid + 15); | 2058 kTypedDataInt8ArrayViewCid + 15); |
| 2057 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2059 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2058 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2060 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2059 return (kNullCid - kTypedDataInt8ArrayCid); | 2061 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2060 } | 2062 } |
| 2061 | 2063 |
| 2062 } // namespace dart | 2064 } // namespace dart |
| 2063 | 2065 |
| 2064 #endif // VM_RAW_OBJECT_H_ | 2066 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |