| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 class RawField : public RawObject { | 673 class RawField : public RawObject { |
| 674 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); | 674 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); |
| 675 | 675 |
| 676 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 676 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 677 RawString* name_; | 677 RawString* name_; |
| 678 RawObject* owner_; // Class or patch class or mixin class | 678 RawObject* owner_; // Class or patch class or mixin class |
| 679 // where this field is defined. | 679 // where this field is defined. |
| 680 RawAbstractType* type_; | 680 RawAbstractType* type_; |
| 681 RawInstance* value_; // Offset in words for instance and value for static. | 681 RawInstance* value_; // Offset in words for instance and value for static. |
| 682 RawArray* dependent_code_; | 682 RawArray* dependent_code_; |
| 683 RawSmi* guarded_list_length_; |
| 683 RawObject** to() { | 684 RawObject** to() { |
| 684 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); | 685 return reinterpret_cast<RawObject**>(&ptr()->guarded_list_length_); |
| 685 } | 686 } |
| 686 | 687 |
| 687 intptr_t token_pos_; | 688 intptr_t token_pos_; |
| 688 intptr_t guarded_cid_; | 689 intptr_t guarded_cid_; |
| 689 intptr_t is_nullable_; // kNullCid if field can contain null value and | 690 intptr_t is_nullable_; // kNullCid if field can contain null value and |
| 690 // any other value otherwise. | 691 // any other value otherwise. |
| 691 intptr_t guarded_list_length_; | |
| 692 uint8_t kind_bits_; // static, final, const, has initializer. | 692 uint8_t kind_bits_; // static, final, const, has initializer. |
| 693 }; | 693 }; |
| 694 | 694 |
| 695 | 695 |
| 696 class RawLiteralToken : public RawObject { | 696 class RawLiteralToken : public RawObject { |
| 697 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); | 697 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); |
| 698 | 698 |
| 699 RawObject** from() { | 699 RawObject** from() { |
| 700 return reinterpret_cast<RawObject**>(&ptr()->literal_); | 700 return reinterpret_cast<RawObject**>(&ptr()->literal_); |
| 701 } | 701 } |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 // Make sure this is updated when new TypedData types are added. | 1712 // Make sure this is updated when new TypedData types are added. |
| 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); | 1713 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); |
| 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); | 1714 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); |
| 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); | 1715 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); |
| 1716 return (kNullCid - kTypedDataInt8ArrayCid); | 1716 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1717 } | 1717 } |
| 1718 | 1718 |
| 1719 } // namespace dart | 1719 } // namespace dart |
| 1720 | 1720 |
| 1721 #endif // VM_RAW_OBJECT_H_ | 1721 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |