Re-enable class table for image writer
Changes, create one temporary class table per ImageInfo. Don't keep
track of class loaders.
Bug: 26317072
Change-Id: I4f9121194f39031fb8629d60b6feeb2747a77870
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index d423799..f491a5a 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -47,6 +47,8 @@
} // namespace space
} // namespace gc
+class ClassTable;
+
static constexpr int kInvalidImageFd = -1;
// Write a Space built during compilation for use during execution.
@@ -263,8 +265,14 @@
// Cached size of the intern table for when we allocate memory.
size_t intern_table_bytes_ = 0;
- // Intern table associated with this for serialization.
+ // Number of image class table bytes.
+ size_t class_table_bytes_ = 0;
+
+ // Intern table associated with this image for serialization.
std::unique_ptr<InternTable> intern_table_;
+
+ // Class table associated with this image for serialization.
+ std::unique_ptr<ClassTable> class_table_;
};
// We use the lock word to store the offset of the object in the image.
@@ -504,9 +512,6 @@
// null is a valid entry.
std::unordered_set<mirror::ClassLoader*> class_loaders_;
- // Number of image class table bytes.
- size_t class_table_bytes_;
-
// Which mode the image is stored as, see image.h
const ImageHeader::StorageMode image_storage_mode_;