| 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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
| 6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_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/exceptions.h" | 10 #include "vm/exceptions.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 kByteDataViewCid, | 179 kByteDataViewCid, |
| 180 | 180 |
| 181 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid, | 181 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid, |
| 182 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND) | 182 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND) |
| 183 #undef DEFINE_OBJECT_KIND | 183 #undef DEFINE_OBJECT_KIND |
| 184 | 184 |
| 185 kByteBufferCid, | 185 kByteBufferCid, |
| 186 | 186 |
| 187 // The following entries do not describe a predefined class, but instead | 187 // The following entries do not describe a predefined class, but instead |
| 188 // are class indexes for pre-allocated instances (Null, dynamic and Void). | 188 // are class indexes for pre-allocated instances (Null, dynamic, Void and |
| 189 // Vector). |
| 189 kNullCid, | 190 kNullCid, |
| 190 kDynamicCid, | 191 kDynamicCid, |
| 191 kVoidCid, | 192 kVoidCid, |
| 193 kVectorCid, |
| 192 | 194 |
| 193 kNumPredefinedCids, | 195 kNumPredefinedCids, |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 enum ObjectAlignment { | 198 enum ObjectAlignment { |
| 197 // Alignment offsets are used to determine object age. | 199 // Alignment offsets are used to determine object age. |
| 198 kNewObjectAlignmentOffset = kWordSize, | 200 kNewObjectAlignmentOffset = kWordSize, |
| 199 kOldObjectAlignmentOffset = 0, | 201 kOldObjectAlignmentOffset = 0, |
| 200 // Object sizes are aligned to kObjectAlignment. | 202 // Object sizes are aligned to kObjectAlignment. |
| 201 kObjectAlignment = 2 * kWordSize, | 203 kObjectAlignment = 2 * kWordSize, |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 819 |
| 818 friend class Function; | 820 friend class Function; |
| 819 }; | 821 }; |
| 820 | 822 |
| 821 | 823 |
| 822 class RawFunction : public RawObject { | 824 class RawFunction : public RawObject { |
| 823 public: | 825 public: |
| 824 enum Kind { | 826 enum Kind { |
| 825 kRegularFunction, | 827 kRegularFunction, |
| 826 kClosureFunction, | 828 kClosureFunction, |
| 829 kConvertedClosureFunction, |
| 827 kSignatureFunction, // represents a signature only without actual code. | 830 kSignatureFunction, // represents a signature only without actual code. |
| 828 kGetterFunction, // represents getter functions e.g: get foo() { .. }. | 831 kGetterFunction, // represents getter functions e.g: get foo() { .. }. |
| 829 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. | 832 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. |
| 830 kConstructor, | 833 kConstructor, |
| 831 kImplicitGetter, // represents an implicit getter for fields. | 834 kImplicitGetter, // represents an implicit getter for fields. |
| 832 kImplicitSetter, // represents an implicit setter for fields. | 835 kImplicitSetter, // represents an implicit setter for fields. |
| 833 kImplicitStaticFinalGetter, // represents an implicit getter for static | 836 kImplicitStaticFinalGetter, // represents an implicit getter for static |
| 834 // final fields (incl. static const fields). | 837 // final fields (incl. static const fields). |
| 835 kMethodExtractor, // converts method into implicit closure on the receiver. | 838 kMethodExtractor, // converts method into implicit closure on the receiver. |
| 836 kNoSuchMethodDispatcher, // invokes noSuchMethod. | 839 kNoSuchMethodDispatcher, // invokes noSuchMethod. |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 kTypedDataInt8ArrayViewCid + 15); | 2499 kTypedDataInt8ArrayViewCid + 15); |
| 2497 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2500 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2498 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2501 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2499 return (kNullCid - kTypedDataInt8ArrayCid); | 2502 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2500 } | 2503 } |
| 2501 | 2504 |
| 2502 | 2505 |
| 2503 } // namespace dart | 2506 } // namespace dart |
| 2504 | 2507 |
| 2505 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2508 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
| OLD | NEW |