summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-01-29 10:55:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-01-29 10:55:12 +0000
commit0d5917fedc6f62715759c24f14810733c409ebff (patch)
tree70a8b60c768894d635cf63b0a480baa5073d2bed /compiler/optimizing/builder.cc
parent4a50662eeaa0b1a26be66e7584fb765151dabc59 (diff)
parent1cf95287364948689f6a1a320567acd7728e94a3 (diff)
Merge "Small optimization for recursive calls: avoid dex cache."
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 9c2facb75e..86567ed3ef 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -613,9 +613,12 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
// Sharpening to kDirect only works if we compile PIC.
DCHECK((optimized_invoke_type == invoke_type) || (optimized_invoke_type != kDirect)
|| compiler_driver_->GetCompilerOptions().GetCompilePic());
+ bool is_recursive =
+ (target_method.dex_method_index == outer_compilation_unit_->GetDexMethodIndex());
+ DCHECK(!is_recursive || (target_method.dex_file == outer_compilation_unit_->GetDexFile()));
invoke = new (arena_) HInvokeStaticOrDirect(
arena_, number_of_arguments, return_type, dex_pc, target_method.dex_method_index,
- optimized_invoke_type);
+ is_recursive, optimized_invoke_type);
}
size_t start_index = 0;