diff options
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index e581af22aa..7f358eaa6b 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -499,6 +499,21 @@ void CodeGenerator::BuildStackMaps(std::vector<uint8_t>* data) { } void CodeGenerator::RecordPcInfo(HInstruction* instruction, uint32_t dex_pc) { + if (instruction != nullptr && instruction->IsTypeConversion()) { + // The code generated for some type conversions may call the + // runtime, thus normally requiring a subsequent call to this + // method. However, the method verifier does not produce PC + // information for Dex type conversion instructions, as it + // considers them as "atomic" (they cannot join a GC). + // Therefore we do not currently record PC information for such + // instructions. As this may change later, we added this special + // case so that code generators may nevertheless call + // CodeGenerator::RecordPcInfo without triggering an error in + // CodeGenerator::BuildNativeGCMap ("Missing ref for dex pc 0x") + // thereafter. + return; + } + // Collect PC infos for the mapping table. struct PcInfo pc_info; pc_info.dex_pc = dex_pc; |