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

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

Issue 1329503002: Changes to prepare for allowing script snapshots to be taken after running the main application (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review-comments Created 5 years, 3 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 }; 922 };
923 923
924 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); 924 RAW_HEAP_OBJECT_IMPLEMENTATION(Library);
925 925
926 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 926 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
927 RawString* name_; 927 RawString* name_;
928 RawString* url_; 928 RawString* url_;
929 RawScript* script_; 929 RawScript* script_;
930 RawString* private_key_; 930 RawString* private_key_;
931 RawArray* dictionary_; // Top-level names in this library. 931 RawArray* dictionary_; // Top-level names in this library.
932 RawArray* resolved_names_; // Cache of resolved names in library scope.
933 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc. 932 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc.
934 RawArray* anonymous_classes_; // Classes containing top-level elements. 933 RawArray* anonymous_classes_; // Classes containing top-level elements.
935 RawArray* imports_; // List of Namespaces imported without prefix. 934 RawArray* imports_; // List of Namespaces imported without prefix.
936 RawArray* exports_; // List of re-exported Namespaces. 935 RawArray* exports_; // List of re-exported Namespaces.
936 RawInstance* load_error_; // Error iff load_state_ == kLoadError.
937 RawObject** to_snapshot() {
938 return reinterpret_cast<RawObject**>(&ptr()->load_error_);
939 }
940 RawArray* resolved_names_; // Cache of resolved names in library scope.
937 RawArray* loaded_scripts_; // Array of scripts loaded in this library. 941 RawArray* loaded_scripts_; // Array of scripts loaded in this library.
938 RawInstance* load_error_; // Error iff load_state_ == kLoadError.
939 RawObject** to() { 942 RawObject** to() {
940 return reinterpret_cast<RawObject**>(&ptr()->load_error_); 943 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_);
941 } 944 }
942 945
943 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives. 946 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives.
944 Dart_NativeEntrySymbol native_entry_symbol_resolver_; 947 Dart_NativeEntrySymbol native_entry_symbol_resolver_;
945 classid_t index_; // Library id number. 948 classid_t index_; // Library id number.
946 classid_t num_anonymous_; // Number of entries in anonymous_classes_. 949 classid_t num_anonymous_; // Number of entries in anonymous_classes_.
947 uint16_t num_imports_; // Number of entries in imports_. 950 uint16_t num_imports_; // Number of entries in imports_.
948 int8_t load_state_; // Of type LibraryState. 951 int8_t load_state_; // Of type LibraryState.
949 bool corelib_imported_; 952 bool corelib_imported_;
950 bool is_dart_scheme_; 953 bool is_dart_scheme_;
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2201 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2199 kTypedDataInt8ArrayViewCid + 15); 2202 kTypedDataInt8ArrayViewCid + 15);
2200 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2203 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2201 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2204 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2202 return (kNullCid - kTypedDataInt8ArrayCid); 2205 return (kNullCid - kTypedDataInt8ArrayCid);
2203 } 2206 }
2204 2207
2205 } // namespace dart 2208 } // namespace dart
2206 2209
2207 #endif // VM_RAW_OBJECT_H_ 2210 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698