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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 class RawField : public RawObject { | 821 class RawField : public RawObject { |
822 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); | 822 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); |
823 | 823 |
824 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 824 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
825 RawString* name_; | 825 RawString* name_; |
826 RawObject* owner_; // Class or patch class or mixin class | 826 RawObject* owner_; // Class or patch class or mixin class |
827 // where this field is defined. | 827 // where this field is defined. |
828 RawAbstractType* type_; | 828 RawAbstractType* type_; |
829 RawInstance* value_; // Offset in words for instance and value for static. | 829 RawInstance* value_; // Offset in words for instance and value for static. |
830 RawArray* dependent_code_; | 830 RawArray* dependent_code_; |
| 831 RawFunction* initializer_; |
831 RawSmi* guarded_list_length_; | 832 RawSmi* guarded_list_length_; |
832 RawObject** to() { | 833 RawObject** to() { |
833 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); | 834 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); |
834 } | 835 } |
835 | 836 |
836 int32_t token_pos_; | 837 int32_t token_pos_; |
837 classid_t guarded_cid_; | 838 classid_t guarded_cid_; |
838 classid_t is_nullable_; // kNullCid if field can contain null value and | 839 classid_t is_nullable_; // kNullCid if field can contain null value and |
839 // any other value otherwise. | 840 // any other value otherwise. |
840 // Offset to the guarded length field inside an instance of class matching | 841 // Offset to the guarded length field inside an instance of class matching |
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2188 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2189 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2189 kTypedDataInt8ArrayViewCid + 15); | 2190 kTypedDataInt8ArrayViewCid + 15); |
2190 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2191 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2191 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2192 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2192 return (kNullCid - kTypedDataInt8ArrayCid); | 2193 return (kNullCid - kTypedDataInt8ArrayCid); |
2193 } | 2194 } |
2194 | 2195 |
2195 } // namespace dart | 2196 } // namespace dart |
2196 | 2197 |
2197 #endif // VM_RAW_OBJECT_H_ | 2198 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |