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 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 | 1483 |
1484 class RawExternalTypedData : public RawInstance { | 1484 class RawExternalTypedData : public RawInstance { |
1485 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData); | 1485 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData); |
1486 | 1486 |
1487 protected: | 1487 protected: |
1488 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1488 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
1489 RawSmi* length_; | 1489 RawSmi* length_; |
1490 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1490 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
1491 | 1491 |
1492 uint8_t* data_; | 1492 uint8_t* data_; |
1493 void* peer_; | |
1494 | 1493 |
1495 friend class TokenStream; | 1494 friend class TokenStream; |
1496 friend class RawTokenStream; | 1495 friend class RawTokenStream; |
1497 }; | 1496 }; |
1498 | 1497 |
1499 | 1498 |
1500 // VM type for capturing stacktraces when exceptions are thrown, | 1499 // VM type for capturing stacktraces when exceptions are thrown, |
1501 // Currently we don't have any interface that this object is supposed | 1500 // Currently we don't have any interface that this object is supposed |
1502 // to implement so we just support the 'toString' method which | 1501 // to implement so we just support the 'toString' method which |
1503 // converts the stack trace into a string. | 1502 // converts the stack trace into a string. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 // Make sure this is updated when new TypedData types are added. | 1746 // Make sure this is updated when new TypedData types are added. |
1748 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13); | 1747 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13); |
1749 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14); | 1748 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14); |
1750 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13); | 1749 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13); |
1751 return (kNullCid - kTypedDataInt8ArrayCid); | 1750 return (kNullCid - kTypedDataInt8ArrayCid); |
1752 } | 1751 } |
1753 | 1752 |
1754 } // namespace dart | 1753 } // namespace dart |
1755 | 1754 |
1756 #endif // VM_RAW_OBJECT_H_ | 1755 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |