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

Unified Diff: courgette/encoded_program.h

Issue 1935203002: [Courgette] Using LabelManager to reduce Courgette-apply peak RAM by 25%. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: courgette/encoded_program.h
diff --git a/courgette/encoded_program.h b/courgette/encoded_program.h
index d0ce945f34f9f0db01248516bce99c07b6701d2f..814a45cf35306bb8e3274dc87dec64b3bcdc0e05 100644
--- a/courgette/encoded_program.h
+++ b/courgette/encoded_program.h
@@ -50,10 +50,11 @@ class EncodedProgram {
// (1) The image base can be specified at any time.
void set_image_base(uint64_t base) { image_base_ = base; }
- // (2) Address tables and indexes defined first.
- CheckBool DefineLabels(const RVAToLabel& abs32_labels,
- const RVAToLabel& rel32_labels) WARN_UNUSED_RESULT;
+ // (2) Address tables and indexes imported first.
+ CheckBool ImportLabels(const LabelManager& abs32_label_manager,
+ const LabelManager& rel32_label_manager)
+ WARN_UNUSED_RESULT;
// (3) Add instructions in the order needed to generate bytes of file.
// NOTE: If any of these methods ever fail, the EncodedProgram instance
@@ -114,6 +115,14 @@ class EncodedProgram {
typedef NoThrowBuffer<OP> OPVector;
void DebuggingSummary();
+
+ // Helper for ImportLabels().
+ static CheckBool WriteRvasToList(const LabelManager& label_manager,
+ RvaVector* rvas);
+
+ // Helper for ImportLabels().
+ static void FillUnassignedRvaSlots(RvaVector* rvas);
+
CheckBool GeneratePeRelocations(SinkStream* buffer,
uint8_t type) WARN_UNUSED_RESULT;
CheckBool GenerateElfRelocations(Elf32_Word pending_elf_relocation_table,

Powered by Google App Engine
This is Rietveld 408576698