-
huangs authored
For Courgette-gen, label adjustment needs lists of abs32 & rel32 Label* sorted by file offset. Let these lists be "Label Annotations". Previously these were extracted during label adjustment from list of instructions in AssemblyProgram, but now we wish to remove these stored instructions. This CL make AssemblyProgram store Label annotations. These are computed only when needed (Courgette-gen / -gen1a). Details: - Add ParseDetecteExecutableWithAnnotation() alongside ParseDetecteExecutable(), to avoid affecting flows that don't require Label Annotations. - AssemblyProgram: Add |*_label_annotations_| as storage vectors. These are optionally populated in InstructionStoreReceptor when Disassembler::Disassemble() gets called. - InstructionCountReceptor now put into use. - Simplify Label adjustment: AssemblyProgram::HandleInstructionLabels() is replaced with visiting AssemblyProgram's Label Annotations. - Subtle: GraphAdjuster now includes abs64. The class doesn't get used, but the change is logical anyway. BUG=660980 Review-Url: https://codereview.chromium.org/2793153003 Cr-Commit-Position: refs/heads/master@{#464536}
c4155eb6