| Index: vm/class_finalizer.h
|
| ===================================================================
|
| --- vm/class_finalizer.h (revision 1726)
|
| +++ vm/class_finalizer.h (working copy)
|
| @@ -24,6 +24,11 @@
|
| // finalized.
|
| class ClassFinalizer : public AllStatic {
|
| public:
|
| + enum {
|
| + kGeneratingSnapshot = true,
|
| + kNotGeneratingSnapshot = false
|
| + };
|
| +
|
| // Add 'interface' to 'interface_list' if it is not already in the list and
|
| // return true. Also return true if 'interface' is not added, because it is
|
| // not unique, i.e. it is already in the list.
|
| @@ -48,14 +53,20 @@
|
| // The function returns true if the finalization was successful.
|
| // If finalization fails, an error message is set in the sticky error field
|
| // in the object store.
|
| - static bool FinalizePendingClasses();
|
| + static bool FinalizePendingClasses() {
|
| + return FinalizePendingClasses(kNotGeneratingSnapshot);
|
| + }
|
| + static bool FinalizePendingClassesForSnapshotCreation() {
|
| + return FinalizePendingClasses(kGeneratingSnapshot);
|
| + }
|
|
|
| // Verify that the pending classes have been properly prefinalized. This is
|
| // needed during bootstrapping where the classes have been preloaded.
|
| static void VerifyBootstrapClasses();
|
|
|
| private:
|
| - static void FinalizeClass(const Class& cls);
|
| + static bool FinalizePendingClasses(bool generating_snapshot);
|
| + static void FinalizeClass(const Class& cls, bool generating_snapshot);
|
| static bool IsSuperCycleFree(const Class& cls);
|
| static void CheckForLegalConstClass(const Class& cls);
|
| static RawClass* ResolveClass(const Class& cls,
|
|
|