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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 796 |
797 class RawNamespace : public RawObject { | 797 class RawNamespace : public RawObject { |
798 RAW_HEAP_OBJECT_IMPLEMENTATION(Namespace); | 798 RAW_HEAP_OBJECT_IMPLEMENTATION(Namespace); |
799 | 799 |
800 RawObject** from() { | 800 RawObject** from() { |
801 return reinterpret_cast<RawObject**>(&ptr()->library_); | 801 return reinterpret_cast<RawObject**>(&ptr()->library_); |
802 } | 802 } |
803 RawLibrary* library_; // library with name dictionary. | 803 RawLibrary* library_; // library with name dictionary. |
804 RawArray* show_names_; // list of names that are exported. | 804 RawArray* show_names_; // list of names that are exported. |
805 RawArray* hide_names_; // blacklist of names that are not exported. | 805 RawArray* hide_names_; // blacklist of names that are not exported. |
| 806 RawField* metadata_field_; // remembers the token pos of metadata if any, |
| 807 // and the metadata values if computed. |
806 RawObject** to() { | 808 RawObject** to() { |
807 return reinterpret_cast<RawObject**>(&ptr()->hide_names_); | 809 return reinterpret_cast<RawObject**>(&ptr()->metadata_field_); |
808 } | 810 } |
809 }; | 811 }; |
810 | 812 |
811 | 813 |
812 class RawCode : public RawObject { | 814 class RawCode : public RawObject { |
813 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); | 815 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); |
814 | 816 |
815 RawObject** from() { | 817 RawObject** from() { |
816 return reinterpret_cast<RawObject**>(&ptr()->instructions_); | 818 return reinterpret_cast<RawObject**>(&ptr()->instructions_); |
817 } | 819 } |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 // Make sure this is updated when new TypedData types are added. | 1775 // Make sure this is updated when new TypedData types are added. |
1774 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1776 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
1775 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); | 1777 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); |
1776 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1778 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
1777 return (kNullCid - kTypedDataInt8ArrayCid); | 1779 return (kNullCid - kTypedDataInt8ArrayCid); |
1778 } | 1780 } |
1779 | 1781 |
1780 } // namespace dart | 1782 } // namespace dart |
1781 | 1783 |
1782 #endif // VM_RAW_OBJECT_H_ | 1784 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |