Chromium Code Reviews| 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 657 | 657 |
| 658 class RawField : public RawObject { | 658 class RawField : public RawObject { |
| 659 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); | 659 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); |
| 660 | 660 |
| 661 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 661 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 662 RawString* name_; | 662 RawString* name_; |
| 663 RawObject* owner_; // Class or patch class or mixin class | 663 RawObject* owner_; // Class or patch class or mixin class |
| 664 // where this field is defined. | 664 // where this field is defined. |
| 665 RawAbstractType* type_; | 665 RawAbstractType* type_; |
| 666 RawInstance* value_; // Offset in words for instance and value for static. | 666 RawInstance* value_; // Offset in words for instance and value for static. |
| 667 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->value_); } | 667 RawArray* dependent_code_; |
| 668 RawObject** to() { | |
| 669 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); | |
| 670 } | |
| 668 | 671 |
| 669 intptr_t token_pos_; | 672 intptr_t token_pos_; |
| 673 intptr_t guarded_cid_; | |
| 674 intptr_t is_nullable_; // kNullCid if field can contain null value and | |
|
Ivan Posva
2013/03/19 04:42:05
As far as I understand this is a boolean value. Wh
Vyacheslav Egorov (Google)
2013/03/19 06:58:59
Having a boolean complicates checking and initiali
Ivan Posva
2013/03/19 15:48:51
In that case please update the comment.
Vyacheslav Egorov (Google)
2013/03/19 19:57:50
Done.
| |
| 675 // kIllegalCid otherwise. | |
| 670 uint8_t kind_bits_; // static, final, const, has initializer. | 676 uint8_t kind_bits_; // static, final, const, has initializer. |
| 671 }; | 677 }; |
| 672 | 678 |
| 673 | 679 |
| 674 class RawLiteralToken : public RawObject { | 680 class RawLiteralToken : public RawObject { |
| 675 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); | 681 RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); |
| 676 | 682 |
| 677 RawObject** from() { | 683 RawObject** from() { |
| 678 return reinterpret_cast<RawObject**>(&ptr()->literal_); | 684 return reinterpret_cast<RawObject**>(&ptr()->literal_); |
| 679 } | 685 } |
| (...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1875 inline intptr_t RawObject::NumberOfTypedDataClasses() { | 1881 inline intptr_t RawObject::NumberOfTypedDataClasses() { |
| 1876 // Make sure this is updated when new TypedData types are added. | 1882 // Make sure this is updated when new TypedData types are added. |
| 1877 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11); | 1883 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayCid + 11); |
| 1878 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11); | 1884 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 11); |
| 1879 return (kNullCid - kTypedDataInt8ArrayCid); | 1885 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1880 } | 1886 } |
| 1881 | 1887 |
| 1882 } // namespace dart | 1888 } // namespace dart |
| 1883 | 1889 |
| 1884 #endif // VM_RAW_OBJECT_H_ | 1890 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |