| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 V(Bigint) \ | 60 V(Bigint) \ |
| 61 V(Double) \ | 61 V(Double) \ |
| 62 V(Bool) \ | 62 V(Bool) \ |
| 63 V(GrowableObjectArray) \ | 63 V(GrowableObjectArray) \ |
| 64 V(TypedData) \ | 64 V(TypedData) \ |
| 65 V(ExternalTypedData) \ | 65 V(ExternalTypedData) \ |
| 66 V(Stacktrace) \ | 66 V(Stacktrace) \ |
| 67 V(JSRegExp) \ | 67 V(JSRegExp) \ |
| 68 V(WeakProperty) \ | 68 V(WeakProperty) \ |
| 69 V(MirrorReference) \ | 69 V(MirrorReference) \ |
| 70 V(DartFunction) \ | |
| 71 V(Float32x4) \ | 70 V(Float32x4) \ |
| 72 V(Uint32x4) \ | 71 V(Uint32x4) \ |
| 73 | 72 |
| 74 #define CLASS_LIST_ARRAYS(V) \ | 73 #define CLASS_LIST_ARRAYS(V) \ |
| 75 V(Array) \ | 74 V(Array) \ |
| 76 V(ImmutableArray) \ | 75 V(ImmutableArray) \ |
| 77 | 76 |
| 78 #define CLASS_LIST_STRINGS(V) \ | 77 #define CLASS_LIST_STRINGS(V) \ |
| 79 V(String) \ | 78 V(String) \ |
| 80 V(OneByteString) \ | 79 V(OneByteString) \ |
| (...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } | 1456 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } |
| 1458 | 1457 |
| 1459 uint8_t* data_; | 1458 uint8_t* data_; |
| 1460 void* peer_; | 1459 void* peer_; |
| 1461 | 1460 |
| 1462 friend class TokenStream; | 1461 friend class TokenStream; |
| 1463 friend class RawTokenStream; | 1462 friend class RawTokenStream; |
| 1464 }; | 1463 }; |
| 1465 | 1464 |
| 1466 | 1465 |
| 1467 class RawDartFunction : public RawInstance { | |
| 1468 RAW_HEAP_OBJECT_IMPLEMENTATION(DartFunction); | |
| 1469 }; | |
| 1470 | |
| 1471 | |
| 1472 // VM type for capturing stacktraces when exceptions are thrown, | 1466 // VM type for capturing stacktraces when exceptions are thrown, |
| 1473 // Currently we don't have any interface that this object is supposed | 1467 // Currently we don't have any interface that this object is supposed |
| 1474 // to implement so we just support the 'toString' method which | 1468 // to implement so we just support the 'toString' method which |
| 1475 // converts the stack trace into a string. | 1469 // converts the stack trace into a string. |
| 1476 class RawStacktrace : public RawInstance { | 1470 class RawStacktrace : public RawInstance { |
| 1477 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace); | 1471 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace); |
| 1478 | 1472 |
| 1479 RawObject** from() { | 1473 RawObject** from() { |
| 1480 return reinterpret_cast<RawObject**>(&ptr()->function_array_); | 1474 return reinterpret_cast<RawObject**>(&ptr()->function_array_); |
| 1481 } | 1475 } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 // Make sure this is updated when new TypedData types are added. | 1710 // Make sure this is updated when new TypedData types are added. |
| 1717 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); | 1711 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); |
| 1718 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); | 1712 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); |
| 1719 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); | 1713 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); |
| 1720 return (kNullCid - kTypedDataInt8ArrayCid); | 1714 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1721 } | 1715 } |
| 1722 | 1716 |
| 1723 } // namespace dart | 1717 } // namespace dart |
| 1724 | 1718 |
| 1725 #endif // VM_RAW_OBJECT_H_ | 1719 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |