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

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

Issue 2485993002: VM: Support bootstrapping core libraries from Kernel binaries instead of source. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 RUNTIME_VM_CLASS_FINALIZER_H_ 5 #ifndef RUNTIME_VM_CLASS_FINALIZER_H_
6 #define RUNTIME_VM_CLASS_FINALIZER_H_ 6 #define RUNTIME_VM_CLASS_FINALIZER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const char* format, 63 const char* format,
64 ...) PRINTF_ATTRIBUTE(4, 5); 64 ...) PRINTF_ATTRIBUTE(4, 5);
65 65
66 // Return false if we still have classes pending to be finalized. 66 // Return false if we still have classes pending to be finalized.
67 static bool AllClassesFinalized(); 67 static bool AllClassesFinalized();
68 68
69 // Return whether processing pending classes (ObjectStore::pending_classes_) 69 // Return whether processing pending classes (ObjectStore::pending_classes_)
70 // failed. The function returns true if the processing was successful. 70 // failed. The function returns true if the processing was successful.
71 // If processing fails, an error message is set in the sticky error field 71 // If processing fails, an error message is set in the sticky error field
72 // in the object store. 72 // in the object store.
73 static bool ProcessPendingClasses(); 73 static bool ProcessPendingClasses(bool from_kernel = false);
74 74
75 // Finalize the types appearing in the declaration of class 'cls', i.e. its 75 // Finalize the types appearing in the declaration of class 'cls', i.e. its
76 // type parameters and their upper bounds, its super type and interfaces. 76 // type parameters and their upper bounds, its super type and interfaces.
77 // Note that the fields and functions have not been parsed yet (unless cls 77 // Note that the fields and functions have not been parsed yet (unless cls
78 // is an anonymous top level class). 78 // is an anonymous top level class).
79 static void FinalizeTypesInClass(const Class& cls); 79 static void FinalizeTypesInClass(const Class& cls);
80 80
81 // Finalize the class including its fields and functions. 81 // Finalize the class including its fields and functions.
82 static void FinalizeClass(const Class& cls); 82 static void FinalizeClass(const Class& cls);
83 83
84 #if defined(DART_NO_SNAPSHOT)
85 // Verify that the classes have been properly prefinalized. This is 84 // Verify that the classes have been properly prefinalized. This is
86 // needed during bootstrapping where the classes have been preloaded. 85 // needed during bootstrapping where the classes have been preloaded.
87 static void VerifyBootstrapClasses(); 86 static void VerifyBootstrapClasses();
88 #endif // defined(DART_NO_SNAPSHOT).
89 87
90 // Resolve the class of the type, but not the type's type arguments. 88 // Resolve the class of the type, but not the type's type arguments.
91 // May promote the type to function type by setting its signature field. 89 // May promote the type to function type by setting its signature field.
92 static void ResolveTypeClass(const Class& cls, const Type& type); 90 static void ResolveTypeClass(const Class& cls, const Type& type);
93 91
94 // Resolve the type and target of the redirecting factory. 92 // Resolve the type and target of the redirecting factory.
95 static void ResolveRedirectingFactory(const Class& cls, 93 static void ResolveRedirectingFactory(const Class& cls,
96 const Function& factory); 94 const Function& factory);
97 95
98 // Apply the mixin type to the mixin application class. 96 // Apply the mixin type to the mixin application class.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ...) PRINTF_ATTRIBUTE(4, 5); 173 ...) PRINTF_ATTRIBUTE(4, 5);
176 174
177 // Verify implicit offsets recorded in the VM for direct access to fields of 175 // Verify implicit offsets recorded in the VM for direct access to fields of
178 // Dart instances (e.g: _TypedListView, _ByteDataView). 176 // Dart instances (e.g: _TypedListView, _ByteDataView).
179 static void VerifyImplicitFieldOffsets(); 177 static void VerifyImplicitFieldOffsets();
180 }; 178 };
181 179
182 } // namespace dart 180 } // namespace dart
183 181
184 #endif // RUNTIME_VM_CLASS_FINALIZER_H_ 182 #endif // RUNTIME_VM_CLASS_FINALIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698