diff options
| author | 2018-02-20 16:24:05 +0000 | |
|---|---|---|
| committer | 2018-02-20 16:24:05 +0000 | |
| commit | 38321bb87c3630afaef76f312e90df5bca6a0554 (patch) | |
| tree | 2e5e4b1968493b8fb929f75c3b0e46d7fe780fd1 /compiler/optimizing/code_generator.h | |
| parent | 11088ad5d79fe9ac7875b625fcea01ddf42db3bf (diff) | |
| parent | 59eb30f96d87e3e72a060099a292ae14dd5fe1c8 (diff) | |
Merge "ART: Clean up patching data in codegens."
Diffstat (limited to 'compiler/optimizing/code_generator.h')
| -rw-r--r-- | compiler/optimizing/code_generator.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 3c5a37f958..60de722285 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -618,14 +618,18 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { protected: // Patch info used for recording locations of required linker patches and their targets, - // i.e. target method, string, type or code identified by their dex file and index. + // i.e. target method, string, type or code identified by their dex file and index, + // or .data.bimg.rel.ro entries identified by the boot image offset. template <typename LabelType> struct PatchInfo { - PatchInfo(const DexFile& target_dex_file, uint32_t target_index) - : dex_file(target_dex_file), index(target_index) { } - - const DexFile& dex_file; - uint32_t index; + PatchInfo(const DexFile* dex_file, uint32_t off_or_idx) + : target_dex_file(dex_file), offset_or_index(off_or_idx), label() { } + + // Target dex file or null for .data.bmig.rel.ro patches. + const DexFile* target_dex_file; + // Either the boot image offset (to write to .data.bmig.rel.ro) or string/type/method index. + uint32_t offset_or_index; + // Label for the instruction to patch. LabelType label; }; |