Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: runtime/vm/raw_object.h

Issue 1902563002: Add per-library cache of exported names (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleanup Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 RawString* name_; 1018 RawString* name_;
1019 RawString* url_; 1019 RawString* url_;
1020 RawScript* script_; 1020 RawScript* script_;
1021 RawString* private_key_; 1021 RawString* private_key_;
1022 RawArray* dictionary_; // Top-level names in this library. 1022 RawArray* dictionary_; // Top-level names in this library.
1023 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc. 1023 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc.
1024 RawClass* toplevel_class_; // Class containing top-level elements. 1024 RawClass* toplevel_class_; // Class containing top-level elements.
1025 RawGrowableObjectArray* patch_classes_; 1025 RawGrowableObjectArray* patch_classes_;
1026 RawArray* imports_; // List of Namespaces imported without prefix. 1026 RawArray* imports_; // List of Namespaces imported without prefix.
1027 RawArray* exports_; // List of re-exported Namespaces. 1027 RawArray* exports_; // List of re-exported Namespaces.
1028 RawArray* exports2_; // Copy of exports_, used by background
1029 // compiler to detect cycles without colliding
1030 // with mutator thread lookups.
1031 RawInstance* load_error_; // Error iff load_state_ == kLoadError. 1028 RawInstance* load_error_; // Error iff load_state_ == kLoadError.
1032 RawObject** to_snapshot() { 1029 RawObject** to_snapshot() {
1033 return reinterpret_cast<RawObject**>(&ptr()->load_error_); 1030 return reinterpret_cast<RawObject**>(&ptr()->load_error_);
1034 } 1031 }
1035 RawArray* resolved_names_; // Cache of resolved names in library scope. 1032 RawArray* resolved_names_; // Cache of resolved names in library scope.
1033 RawArray* exported_names_; // Cache of exported names by library.
1036 RawArray* loaded_scripts_; // Array of scripts loaded in this library. 1034 RawArray* loaded_scripts_; // Array of scripts loaded in this library.
1037 RawObject** to() { 1035 RawObject** to() {
1038 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_); 1036 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_);
1039 } 1037 }
1040 1038
1041 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives. 1039 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives.
1042 Dart_NativeEntrySymbol native_entry_symbol_resolver_; 1040 Dart_NativeEntrySymbol native_entry_symbol_resolver_;
1043 classid_t index_; // Library id number. 1041 classid_t index_; // Library id number.
1044 uint16_t num_imports_; // Number of entries in imports_. 1042 uint16_t num_imports_; // Number of entries in imports_.
1045 int8_t load_state_; // Of type LibraryState. 1043 int8_t load_state_; // Of type LibraryState.
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2369 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2372 kTypedDataInt8ArrayViewCid + 15); 2370 kTypedDataInt8ArrayViewCid + 15);
2373 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2371 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2374 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2372 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2375 return (kNullCid - kTypedDataInt8ArrayCid); 2373 return (kNullCid - kTypedDataInt8ArrayCid);
2376 } 2374 }
2377 2375
2378 } // namespace dart 2376 } // namespace dart
2379 2377
2380 #endif // VM_RAW_OBJECT_H_ 2378 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698