Description[Courgette] Refactor: Add AssemblyProgram::DispatchInstructionLabels() to hide InstructionVector usage.
To reduce Courgette memory usage (and possibly solve installer crashes),
we plan to make AssemblyProgram store instructions more efficiently. We
start by hiding AssemblyProgram's InstructionVector usage from
AdjustmentMethod and AdjustmentMethod2.
Previously AdjustmentMethod[2] get AssemblyProgram's instruction vector,
and loop over it to extract labels from abs32/rel32 instructions. This
CL moves the loop into AssemblyProgram::DispatchInstructionLabels().
Callers now specify a map of handlers, without needing to know how
instructions are stored in AssemblyProgram.
Committed: https://crrev.com/99a5a8c3c7923a01d37a6d6d63203234d310e320
Cr-Commit-Position: refs/heads/master@{#428522}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Rename 'Dispatch' to 'Handle'. #
Messages
Total messages: 13 (6 generated)
|