| 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 | 755 |
| 756 int32_t line_offset_; | 756 int32_t line_offset_; |
| 757 int32_t col_offset_; | 757 int32_t col_offset_; |
| 758 int8_t kind_; // Of type Kind. | 758 int8_t kind_; // Of type Kind. |
| 759 }; | 759 }; |
| 760 | 760 |
| 761 | 761 |
| 762 class RawLibrary : public RawObject { | 762 class RawLibrary : public RawObject { |
| 763 enum LibraryState { | 763 enum LibraryState { |
| 764 kAllocated, // Initial state. | 764 kAllocated, // Initial state. |
| 765 kLoadRequested, // Compiler or script requested load of library. |
| 765 kLoadInProgress, // Library is in the process of being loaded. | 766 kLoadInProgress, // Library is in the process of being loaded. |
| 766 kLoaded, // Library is loaded. | 767 kLoaded, // Library is loaded. |
| 767 kLoadError, // Error occurred during load of the Library. | 768 kLoadError, // Error occurred during load of the Library. |
| 768 }; | 769 }; |
| 769 | 770 |
| 770 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); | 771 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); |
| 771 | 772 |
| 772 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 773 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 773 RawString* name_; | 774 RawString* name_; |
| 774 RawString* url_; | 775 RawString* url_; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); | 1148 RAW_HEAP_OBJECT_IMPLEMENTATION(Instance); |
| 1148 }; | 1149 }; |
| 1149 | 1150 |
| 1150 | 1151 |
| 1151 class RawLibraryPrefix : public RawInstance { | 1152 class RawLibraryPrefix : public RawInstance { |
| 1152 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix); | 1153 RAW_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix); |
| 1153 | 1154 |
| 1154 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 1155 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 1155 RawString* name_; // Library prefix name. | 1156 RawString* name_; // Library prefix name. |
| 1156 RawArray* imports_; // Libraries imported with this prefix. | 1157 RawArray* imports_; // Libraries imported with this prefix. |
| 1158 RawLibrary* importer_; // Library which declares this prefix. |
| 1157 RawArray* dependent_code_; // Code that refers to deferred, unloaded | 1159 RawArray* dependent_code_; // Code that refers to deferred, unloaded |
| 1158 // library prefix. | 1160 // library prefix. |
| 1159 RawObject** to() { | 1161 RawObject** to() { |
| 1160 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); | 1162 return reinterpret_cast<RawObject**>(&ptr()->dependent_code_); |
| 1161 } | 1163 } |
| 1162 int32_t num_imports_; // Number of library entries in libraries_. | 1164 int32_t num_imports_; // Number of library entries in libraries_. |
| 1163 bool is_deferred_load_; | 1165 bool is_deferred_load_; |
| 1164 bool is_loaded_; | 1166 bool is_loaded_; |
| 1165 }; | 1167 }; |
| 1166 | 1168 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1865 COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1864 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 1866 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 1865 kTypedDataInt8ArrayViewCid + 15); | 1867 kTypedDataInt8ArrayViewCid + 15); |
| 1866 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1868 COMPILE_ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1867 return (kNullCid - kTypedDataInt8ArrayCid); | 1869 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1868 } | 1870 } |
| 1869 | 1871 |
| 1870 } // namespace dart | 1872 } // namespace dart |
| 1871 | 1873 |
| 1872 #endif // VM_RAW_OBJECT_H_ | 1874 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |