summaryrefslogtreecommitdiffstats
path: root/compiler/dex/mir_graph.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/dex/mir_graph.cc')
-rw-r--r--compiler/dex/mir_graph.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc
index 76b5e44df0..f354a49111 100644
--- a/compiler/dex/mir_graph.cc
+++ b/compiler/dex/mir_graph.cc
@@ -1673,12 +1673,6 @@ void MIRGraph::GetBlockName(BasicBlock* bb, char* name) {
}
}
-const char* MIRGraph::GetShortyFromTargetIdx(int target_idx) {
- // TODO: for inlining support, use current code unit.
- const DexFile::MethodId& method_id = cu_->dex_file->GetMethodId(target_idx);
- return cu_->dex_file->GetShorty(method_id.proto_idx_);
-}
-
const char* MIRGraph::GetShortyFromMethodReference(const MethodReference& target_method) {
const DexFile::MethodId& method_id =
target_method.dex_file->GetMethodId(target_method.dex_method_index);
@@ -1724,8 +1718,7 @@ void MIRGraph::DumpMIRGraph() {
* high-word loc for wide arguments. Also pull up any following
* MOVE_RESULT and incorporate it into the invoke.
*/
-CallInfo* MIRGraph::NewMemCallInfo(BasicBlock* bb, MIR* mir, InvokeType type,
- bool is_range) {
+CallInfo* MIRGraph::NewMemCallInfo(BasicBlock* bb, MIR* mir, InvokeType type, bool is_range) {
CallInfo* info = static_cast<CallInfo*>(arena_->Alloc(sizeof(CallInfo),
kArenaAllocMisc));
MIR* move_result_mir = FindMoveResult(bb, mir);
@@ -1744,6 +1737,13 @@ CallInfo* MIRGraph::NewMemCallInfo(BasicBlock* bb, MIR* mir, InvokeType type,
info->opt_flags = mir->optimization_flags;
info->type = type;
info->is_range = is_range;
+ if (IsInstructionQuickInvoke(mir->dalvikInsn.opcode)) {
+ const auto& method_info = GetMethodLoweringInfo(mir);
+ info->method_ref = method_info.GetTargetMethod();
+ } else {
+ info->method_ref = MethodReference(GetCurrentDexCompilationUnit()->GetDexFile(),
+ mir->dalvikInsn.vB);
+ }
info->index = mir->dalvikInsn.vB;
info->offset = mir->offset;
info->mir = mir;