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