| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 RawString* name_; | 476 RawString* name_; |
| 477 RawArray* functions_; | 477 RawArray* functions_; |
| 478 RawArray* fields_; | 478 RawArray* fields_; |
| 479 RawGrowableObjectArray* closure_functions_; // Local functions and literals. | 479 RawGrowableObjectArray* closure_functions_; // Local functions and literals. |
| 480 RawArray* interfaces_; // Array of AbstractType. | 480 RawArray* interfaces_; // Array of AbstractType. |
| 481 RawGrowableObjectArray* direct_subclasses_; // Array of Class. | 481 RawGrowableObjectArray* direct_subclasses_; // Array of Class. |
| 482 RawScript* script_; | 482 RawScript* script_; |
| 483 RawLibrary* library_; | 483 RawLibrary* library_; |
| 484 RawTypeArguments* type_parameters_; // Array of TypeParameter. | 484 RawTypeArguments* type_parameters_; // Array of TypeParameter. |
| 485 RawAbstractType* super_type_; | 485 RawAbstractType* super_type_; |
| 486 RawType* mixin_; | 486 RawType* mixin_; // Generic mixin type, e.g. M<T>, not M<int>. |
| 487 RawClass* patch_class_; | 487 RawClass* patch_class_; |
| 488 RawFunction* signature_function_; // Associated function for signature class. | 488 RawFunction* signature_function_; // Associated function for signature class. |
| 489 RawArray* constants_; // Canonicalized values of this class. | 489 RawArray* constants_; // Canonicalized values of this class. |
| 490 RawArray* canonical_types_; // Canonicalized types of this class. | 490 RawArray* canonical_types_; // Canonicalized types of this class. |
| 491 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions. | 491 RawArray* invocation_dispatcher_cache_; // Cache for dispatcher functions. |
| 492 RawCode* allocation_stub_; // Stub code for allocation of instances. | 492 RawCode* allocation_stub_; // Stub code for allocation of instances. |
| 493 RawObject** to() { | 493 RawObject** to() { |
| 494 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); | 494 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); |
| 495 } | 495 } |
| 496 | 496 |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 } | 1196 } |
| 1197 bool is_being_checked_; | 1197 bool is_being_checked_; |
| 1198 }; | 1198 }; |
| 1199 | 1199 |
| 1200 | 1200 |
| 1201 class RawMixinAppType : public RawAbstractType { | 1201 class RawMixinAppType : public RawAbstractType { |
| 1202 private: | 1202 private: |
| 1203 RAW_HEAP_OBJECT_IMPLEMENTATION(MixinAppType); | 1203 RAW_HEAP_OBJECT_IMPLEMENTATION(MixinAppType); |
| 1204 | 1204 |
| 1205 RawObject** from() { | 1205 RawObject** from() { |
| 1206 return reinterpret_cast<RawObject**>(&ptr()->mixins_); | 1206 return reinterpret_cast<RawObject**>(&ptr()->super_type_); |
| 1207 } | 1207 } |
| 1208 RawArray* mixins_; // Array of synthesized mixin application classes. | 1208 RawAbstractType* super_type_; |
| 1209 RawArray* mixin_types_; // Array of AbstractType. |
| 1209 RawObject** to() { | 1210 RawObject** to() { |
| 1210 return reinterpret_cast<RawObject**>(&ptr()->mixins_); | 1211 return reinterpret_cast<RawObject**>(&ptr()->mixin_types_); |
| 1211 } | 1212 } |
| 1212 }; | 1213 }; |
| 1213 | 1214 |
| 1214 | 1215 |
| 1215 class RawNumber : public RawInstance { | 1216 class RawNumber : public RawInstance { |
| 1216 RAW_OBJECT_IMPLEMENTATION(Number); | 1217 RAW_OBJECT_IMPLEMENTATION(Number); |
| 1217 }; | 1218 }; |
| 1218 | 1219 |
| 1219 | 1220 |
| 1220 class RawInteger : public RawNumber { | 1221 class RawInteger : public RawNumber { |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 // Make sure this is updated when new TypedData types are added. | 1713 // Make sure this is updated when new TypedData types are added. |
| 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); | 1714 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); |
| 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); | 1715 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); |
| 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); | 1716 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); |
| 1716 return (kNullCid - kTypedDataInt8ArrayCid); | 1717 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1717 } | 1718 } |
| 1718 | 1719 |
| 1719 } // namespace dart | 1720 } // namespace dart |
| 1720 | 1721 |
| 1721 #endif // VM_RAW_OBJECT_H_ | 1722 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |