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

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

Issue 1410383020: Eliminate all but one top-level class per library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address Review Comments Created 5 years 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 734
735 735
736 class RawPatchClass : public RawObject { 736 class RawPatchClass : public RawObject {
737 private: 737 private:
738 RAW_HEAP_OBJECT_IMPLEMENTATION(PatchClass); 738 RAW_HEAP_OBJECT_IMPLEMENTATION(PatchClass);
739 739
740 RawObject** from() { 740 RawObject** from() {
741 return reinterpret_cast<RawObject**>(&ptr()->patched_class_); 741 return reinterpret_cast<RawObject**>(&ptr()->patched_class_);
742 } 742 }
743 RawClass* patched_class_; 743 RawClass* patched_class_;
744 RawClass* source_class_; 744 RawClass* origin_class_;
745 RawScript* script_;
745 RawObject** to() { 746 RawObject** to() {
746 return reinterpret_cast<RawObject**>(&ptr()->source_class_); 747 return reinterpret_cast<RawObject**>(&ptr()->script_);
747 } 748 }
748 749
749 friend class Function; 750 friend class Function;
750 }; 751 };
751 752
752 753
753 class RawFunction : public RawObject { 754 class RawFunction : public RawObject {
754 public: 755 public:
755 enum Kind { 756 enum Kind {
756 kRegularFunction, 757 kRegularFunction,
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 972
972 RAW_HEAP_OBJECT_IMPLEMENTATION(Library); 973 RAW_HEAP_OBJECT_IMPLEMENTATION(Library);
973 974
974 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 975 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
975 RawString* name_; 976 RawString* name_;
976 RawString* url_; 977 RawString* url_;
977 RawScript* script_; 978 RawScript* script_;
978 RawString* private_key_; 979 RawString* private_key_;
979 RawArray* dictionary_; // Top-level names in this library. 980 RawArray* dictionary_; // Top-level names in this library.
980 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc. 981 RawGrowableObjectArray* metadata_; // Metadata on classes, methods etc.
981 RawArray* anonymous_classes_; // Classes containing top-level elements. 982 RawClass* toplevel_class_; // Class containing top-level elements.
982 RawGrowableObjectArray* patch_classes_; 983 RawGrowableObjectArray* patch_classes_;
983 RawArray* imports_; // List of Namespaces imported without prefix. 984 RawArray* imports_; // List of Namespaces imported without prefix.
984 RawArray* exports_; // List of re-exported Namespaces. 985 RawArray* exports_; // List of re-exported Namespaces.
985 RawInstance* load_error_; // Error iff load_state_ == kLoadError. 986 RawInstance* load_error_; // Error iff load_state_ == kLoadError.
986 RawObject** to_snapshot() { 987 RawObject** to_snapshot() {
987 return reinterpret_cast<RawObject**>(&ptr()->load_error_); 988 return reinterpret_cast<RawObject**>(&ptr()->load_error_);
988 } 989 }
989 RawArray* resolved_names_; // Cache of resolved names in library scope. 990 RawArray* resolved_names_; // Cache of resolved names in library scope.
990 RawArray* loaded_scripts_; // Array of scripts loaded in this library. 991 RawArray* loaded_scripts_; // Array of scripts loaded in this library.
991 RawObject** to() { 992 RawObject** to() {
992 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_); 993 return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_);
993 } 994 }
994 995
995 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives. 996 Dart_NativeEntryResolver native_entry_resolver_; // Resolves natives.
996 Dart_NativeEntrySymbol native_entry_symbol_resolver_; 997 Dart_NativeEntrySymbol native_entry_symbol_resolver_;
997 classid_t index_; // Library id number. 998 classid_t index_; // Library id number.
998 classid_t num_anonymous_; // Number of entries in anonymous_classes_.
999 uint16_t num_imports_; // Number of entries in imports_. 999 uint16_t num_imports_; // Number of entries in imports_.
1000 int8_t load_state_; // Of type LibraryState. 1000 int8_t load_state_; // Of type LibraryState.
1001 bool corelib_imported_; 1001 bool corelib_imported_;
1002 bool is_dart_scheme_; 1002 bool is_dart_scheme_;
1003 bool debuggable_; // True if debugger can stop in library. 1003 bool debuggable_; // True if debugger can stop in library.
1004 bool is_in_fullsnapshot_; // True if library is in a full snapshot. 1004 bool is_in_fullsnapshot_; // True if library is in a full snapshot.
1005 1005
1006 friend class Class; 1006 friend class Class;
1007 friend class Isolate; 1007 friend class Isolate;
1008 }; 1008 };
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2266 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2267 kTypedDataInt8ArrayViewCid + 15); 2267 kTypedDataInt8ArrayViewCid + 15);
2268 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2268 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2269 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2269 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2270 return (kNullCid - kTypedDataInt8ArrayCid); 2270 return (kNullCid - kTypedDataInt8ArrayCid);
2271 } 2271 }
2272 2272
2273 } // namespace dart 2273 } // namespace dart
2274 2274
2275 #endif // VM_RAW_OBJECT_H_ 2275 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698