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

Unified Diff: courgette/disassembler_elf_32_arm.h

Issue 2462993003: [Courgette] Refactor: Add and use Instruction*Receptor classes; call ParseFile() in 2 passes. (Closed)
Patch Set: Make AssemblyProgram::CreateInstruction*Receptor() return CheckBool. 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 side-by-side diff with in-line comments
Download patch
Index: courgette/disassembler_elf_32_arm.h
diff --git a/courgette/disassembler_elf_32_arm.h b/courgette/disassembler_elf_32_arm.h
index 24b8aa83c7002b642ddb543ff0cb6c81b31b1a34..21b6001354982e93c9831b661132f816404a7849 100644
--- a/courgette/disassembler_elf_32_arm.h
+++ b/courgette/disassembler_elf_32_arm.h
@@ -17,6 +17,7 @@
namespace courgette {
class AssemblyProgram;
+class InstructionReceptor;
enum ARM_RVA {
ARM_OFF8,
@@ -40,8 +41,8 @@ class DisassemblerElf32ARM : public DisassemblerElf32 {
// TypedRVA interfaces.
CheckBool ComputeRelativeTarget(const uint8_t* op_pointer) override;
- CheckBool EmitInstruction(AssemblyProgram* program,
- Label* label) override;
+ CheckBool EmitInstruction(Label* label,
+ InstructionReceptor* receptor) override;
uint16_t op_size() const override;
uint16_t c_op() const { return c_op_; }
@@ -86,8 +87,8 @@ class DisassemblerElf32ARM : public DisassemblerElf32 {
CheckBool RelToRVA(Elf32_Rel rel,
RVA* result) const override WARN_UNUSED_RESULT;
CheckBool ParseRelocationSection(const Elf32_Shdr* section_header,
- AssemblyProgram* program)
- override WARN_UNUSED_RESULT;
+ InstructionReceptor* receptor) const override
+ WARN_UNUSED_RESULT;
CheckBool ParseRel32RelocsFromSection(const Elf32_Shdr* section)
override WARN_UNUSED_RESULT;

Powered by Google App Engine
This is Rietveld 408576698