diff options
| author | 2018-02-15 15:43:09 +0000 | |
|---|---|---|
| committer | 2018-02-15 15:43:09 +0000 | |
| commit | d991e5119a2bb61542899da9708f794dc60677c4 (patch) | |
| tree | ff691c06933fe8f50fa707b17740a3fd992417f3 /compiler/optimizing/instruction_builder.cc | |
| parent | 416ed78d28673dd67f9c3fbca6a0d53eb864c769 (diff) | |
| parent | f665f847744aef65f8d4ad46cbf410f911dbfb25 (diff) | |
Merge "Pass the right dex_file/method_index for String.<init>."
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
| -rw-r--r-- | compiler/optimizing/instruction_builder.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 64a1eccf60..a38e2717cf 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -960,14 +960,18 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, HInvokeStaticOrDirect::CodePtrLocation::kCallArtMethod, dchecked_integral_cast<uint64_t>(string_init_entry_point) }; - MethodReference target_method(dex_file_, method_idx); + ScopedObjectAccess soa(Thread::Current()); + MethodReference target_method(resolved_method->GetDexFile(), + resolved_method->GetDexMethodIndex()); + // We pass null for the resolved_method to ensure optimizations + // don't rely on it. HInvoke* invoke = new (allocator_) HInvokeStaticOrDirect( allocator_, number_of_arguments - 1, DataType::Type::kReference /*return_type */, dex_pc, method_idx, - nullptr, + nullptr /* resolved_method */, dispatch_info, invoke_type, target_method, |