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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 | 748 |
749 intptr_t line_offset_; | 749 intptr_t line_offset_; |
750 intptr_t col_offset_; | 750 intptr_t col_offset_; |
751 int8_t kind_; // Of type Kind. | 751 int8_t kind_; // Of type Kind. |
752 }; | 752 }; |
753 | 753 |
754 | 754 |
755 class RawLibrary : public RawObject { | 755 class RawLibrary : public RawObject { |
756 enum LibraryState { | 756 enum LibraryState { |
757 kAllocated, // Initial state. | 757 kAllocated, // Initial state. |
| 758 kLoadRequested, // Compiler or script requested load of library. |
758 kLoadInProgress, // Library is in the process of being loaded. | 759 kLoadInProgress, // Library is in the process of being loaded. |
759 kLoaded, // Library is loaded. | 760 kLoaded, // Library is loaded. |
760 kLoadError, // Error occurred during load of the Library. | 761 kLoadError, // Error occurred during load of the Library. |
761 }; | 762 }; |
762 | 763 |
763 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); | 764 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); |
764 | 765 |
765 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 766 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
766 RawString* name_; | 767 RawString* name_; |
767 RawString* url_; | 768 RawString* url_; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); | 1141 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); |
1141 }; | 1142 }; |
1142 | 1143 |
1143 | 1144 |
1144 class RawLibraryPrefix : public RawInstance { | 1145 class RawLibraryPrefix : public RawInstance { |
1145 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix); | 1146 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix); |
1146 | 1147 |
1147 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 1148 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
1148 RawString* name_; // Library prefix name. | 1149 RawString* name_; // Library prefix name. |
1149 RawArray* imports_; // Libraries imported with this prefix. | 1150 RawArray* imports_; // Libraries imported with this prefix. |
| 1151 RawLibrary* importer_; // Library which declares this prefix. |
1150 RawArray* dependent_code_; // Code that refers to deferred, unloaded | 1152 RawArray* dependent_code_; // Code that refers to deferred, unloaded |
1151 // library prefix. | 1153 // library prefix. |
1152 RawObject** to() { | 1154 RawObject** to() { |
1153 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); | 1155 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); |
1154 } | 1156 } |
1155 intptr_t num_imports_; // Number of library entries in libraries_. | 1157 intptr_t num_imports_; // Number of library entries in libraries_. |
1156 bool is_deferred_load_; | 1158 bool is_deferred_load_; |
1157 bool is_loaded_; | 1159 bool is_loaded_; |
1158 }; | 1160 }; |
1159 | 1161 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1858 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
1857 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1859 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
1858 kTypedDataInt8ArrayViewCid + 15); | 1860 kTypedDataInt8ArrayViewCid + 15); |
1859 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1861 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
1860 return (kNullCid - kTypedDataInt8ArrayCid); | 1862 return (kNullCid - kTypedDataInt8ArrayCid); |
1861 } | 1863 } |
1862 | 1864 |
1863 } // namespace dart | 1865 } // namespace dart |
1864 | 1866 |
1865 #endif // VM_RAW_OBJECT_H_ | 1867 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |