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/atomic.h" | 9 #include "vm/atomic.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 RawString* name_; | 1022 RawString* name_; |
1023 RawString* url_; | 1023 RawString* url_; |
1024 RawScript* script_; | 1024 RawScript* script_; |
1025 RawString* private_key_; | 1025 RawString* private_key_; |
1026 RawArray* dictionary_; // Top-level names in this library. | 1026 RawArray* dictionary_; // Top-level names in this library. |
1027 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc. | 1027 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc. |
1028 RawClass* toplevel_class_; // Class containing top-level elements. | 1028 RawClass* toplevel_class_; // Class containing top-level elements. |
1029 RawGrowableObjectArray* patch_classes_; | 1029 RawGrowableObjectArray* patch_classes_; |
1030 RawArray* imports_; // List of Namespaces imported without prefix. | 1030 RawArray* imports_; // List of Namespaces imported without prefix. |
1031 RawArray* exports_; // List of re-exported Namespaces. | 1031 RawArray* exports_; // List of re-exported Namespaces. |
1032 RawArray* exports2_; // Copy of exports_, used by background | |
1033 // compiler to detect cycles without colliding | |
1034 // with mutator thread lookups. | |
1035 RawInstance* load_error_; // Error iff load_state_ == kLoadError. | 1032 RawInstance* load_error_; // Error iff load_state_ == kLoadError. |
1036 RawObject** to_snapshot() { | 1033 RawObject** to_snapshot() { |
1037 return reinterpret_cast<RawObject**>(&ptr()->load_error_); | 1034 return reinterpret_cast<RawObject**>(&ptr()->load_error_); |
1038 } | 1035 } |
1039 RawArray* resolved_names_; // Cache of resolved names in library scope. | 1036 RawArray* resolved_names_; // Cache of resolved names in library scope. |
| 1037 RawArray* exported_names_; // Cache of exported names by library. |
1040 RawArray* loaded_scripts_; // Array of scripts loaded in this library. | 1038 RawArray* loaded_scripts_; // Array of scripts loaded in this library. |
1041 RawObject** to() { | 1039 RawObject** to() { |
1042 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_); | 1040 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_); |
1043 } | 1041 } |
1044 | 1042 |
1045 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives. | 1043 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives. |
1046 Dart_NativeEntrySymbol native_entry_symbol_resolver_; | 1044 Dart_NativeEntrySymbol native_entry_symbol_resolver_; |
1047 classid_t index_; // Library id number. | 1045 classid_t index_; // Library id number. |
1048 uint16_t num_imports_; // Number of entries in imports_. | 1046 uint16_t num_imports_; // Number of entries in imports_. |
1049 int8_t load_state_; // Of type LibraryState. | 1047 int8_t load_state_; // Of type LibraryState. |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2375 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2373 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2376 kTypedDataInt8ArrayViewCid + 15); | 2374 kTypedDataInt8ArrayViewCid + 15); |
2377 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2375 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2378 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2376 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2379 return (kNullCid - kTypedDataInt8ArrayCid); | 2377 return (kNullCid - kTypedDataInt8ArrayCid); |
2380 } | 2378 } |
2381 | 2379 |
2382 } // namespace dart | 2380 } // namespace dart |
2383 | 2381 |
2384 #endif // VM_RAW_OBJECT_H_ | 2382 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |