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

Unified Diff: courgette/disassembler.h

Issue 2854113002: [Courgette] Reduce AssemblyProgram to reduce Courgette-apply RAM floor and disk churn. (Closed)
Patch Set: Update courgette_fuzzer in libfuzzer. Created 3 years, 7 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
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/disassembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler.h
diff --git a/courgette/disassembler.h b/courgette/disassembler.h
index d3175d42c8b148c3beec93b5820207d93007965c..5b1bb8debaf2e5dcbeaa1532e0f2b98feeab01d6 100644
--- a/courgette/disassembler.h
+++ b/courgette/disassembler.h
@@ -18,6 +18,7 @@
namespace courgette {
class AssemblyProgram;
+class EncodedProgram;
class Disassembler : public AddressTranslator {
public:
@@ -91,9 +92,13 @@ class Disassembler : public AddressTranslator {
virtual bool ParseHeader() = 0;
// Extracts and stores references from the main image. Returns a new
- // AssemblyProgram initialized using data parsed from the main image and
- // |annotate_labels|, or null on failure.
- std::unique_ptr<AssemblyProgram> Disassemble(bool annotate_labels);
+ // AssemblyProgram with initialized Labels, or null on failure.
+ std::unique_ptr<AssemblyProgram> CreateProgram(bool annotate);
+
+ // Goes through the entire program (with the help of |program|), computes all
+ // instructions, and stores them into |encoded|.
+ Status DisassembleAndEncode(AssemblyProgram* program,
+ EncodedProgram* encoded);
// ok() may always be called but returns true only after ParseHeader()
// succeeds.
« no previous file with comments | « courgette/courgette_tool.cc ('k') | courgette/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698