| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 RawObject* owner_; // Class or patch class or mixin class | 807 RawObject* owner_; // Class or patch class or mixin class |
| 808 // where this field is defined. | 808 // where this field is defined. |
| 809 RawAbstractType* type_; | 809 RawAbstractType* type_; |
| 810 RawInstance* value_; // Offset in words for instance and value for static. | 810 RawInstance* value_; // Offset in words for instance and value for static. |
| 811 RawArray* dependent_code_; | 811 RawArray* dependent_code_; |
| 812 RawSmi* guarded_list_length_; | 812 RawSmi* guarded_list_length_; |
| 813 RawObject** to() { | 813 RawObject** to() { |
| 814 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); | 814 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); |
| 815 } | 815 } |
| 816 | 816 |
| 817 // TODO(rmacnak): Make guarded_cid and is_nullable be cid_t. | |
| 818 int32_t token_pos_; | 817 int32_t token_pos_; |
| 819 int32_t guarded_cid_; | 818 classid_t guarded_cid_; |
| 820 int32_t is_nullable_; // kNullCid if field can contain null value and | 819 classid_t is_nullable_; // kNullCid if field can contain null value and |
| 821 // any other value otherwise. | 820 // any other value otherwise. |
| 822 // Offset to the guarded length field inside an instance of class matching | 821 // Offset to the guarded length field inside an instance of class matching |
| 823 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code | 822 // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code |
| 824 // generated on platforms with weak addressing modes (ARM, MIPS). | 823 // generated on platforms with weak addressing modes (ARM, MIPS). |
| 825 int8_t guarded_list_length_in_object_offset_; | 824 int8_t guarded_list_length_in_object_offset_; |
| 826 | 825 |
| 827 uint8_t kind_bits_; // static, final, const, has initializer. | 826 uint8_t kind_bits_; // static, final, const, has initializer. |
| 828 }; | 827 }; |
| 829 | 828 |
| 830 | 829 |
| 831 class RawLiteralToken : public RawObject { | 830 class RawLiteralToken : public RawObject { |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2162 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2164 kTypedDataInt8ArrayViewCid + 15); | 2163 kTypedDataInt8ArrayViewCid + 15); |
| 2165 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2164 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2166 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2165 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2167 return (kNullCid - kTypedDataInt8ArrayCid); | 2166 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2168 } | 2167 } |
| 2169 | 2168 |
| 2170 } // namespace dart | 2169 } // namespace dart |
| 2171 | 2170 |
| 2172 #endif // VM_RAW_OBJECT_H_ | 2171 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |