summaryrefslogtreecommitdiffstats
path: root/compiler/dex
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-09-06 10:49:58 -0700
committerIan Rogers <irogers@google.com>2013-09-06 10:49:58 -0700
commit65ec92cf13c9d11c83711443a02e4249163d47f1 (patch)
tree81057698128ffca7069e3c78b0113129d717ad0f /compiler/dex
parent866709c85da0c0d2c76968713e4dc4a35dce27fd (diff)
downloadart-65ec92cf13c9d11c83711443a02e4249163d47f1.zip
art-65ec92cf13c9d11c83711443a02e4249163d47f1.tar.gz
art-65ec92cf13c9d11c83711443a02e4249163d47f1.tar.bz2
Refactor CompilerDriver::ComputeInvokeInfo
Don't use non-const reference arguments. Move ins before outs. Change-Id: I4a7b8099abe91ea60f93a56077f4989303fa4876
Diffstat (limited to 'compiler/dex')
-rw-r--r--compiler/dex/dex_to_dex_compiler.cc9
-rw-r--r--compiler/dex/mir_dataflow.cc8
-rw-r--r--compiler/dex/quick/gen_invoke.cc8
3 files changed, 13 insertions, 12 deletions
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
index 3fa0eab..7eef62c 100644
--- a/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -248,10 +248,11 @@ void DexCompiler::CompileInvokeVirtual(Instruction* inst,
uintptr_t direct_method;
// TODO: support devirtualization.
const bool kEnableDevirtualization = false;
- bool fast_path = driver_.ComputeInvokeInfo(&unit_, dex_pc, invoke_type,
- target_method, vtable_idx,
- direct_code, direct_method,
- false, kEnableDevirtualization);
+ bool fast_path = driver_.ComputeInvokeInfo(&unit_, dex_pc,
+ false, kEnableDevirtualization,
+ &invoke_type,
+ &target_method, &vtable_idx,
+ &direct_code, &direct_method);
if (fast_path && original_invoke_type == invoke_type) {
if (vtable_idx >= 0 && IsUint(16, vtable_idx)) {
VLOG(compiler) << "Quickening " << Instruction::Name(inst->Opcode())
diff --git a/compiler/dex/mir_dataflow.cc b/compiler/dex/mir_dataflow.cc
index 42ca5dc..be62276 100644
--- a/compiler/dex/mir_dataflow.cc
+++ b/compiler/dex/mir_dataflow.cc
@@ -1221,10 +1221,10 @@ bool MIRGraph::InvokeUsesMethodStar(MIR* mir) {
uint32_t current_offset = static_cast<uint32_t>(current_offset_);
bool fast_path =
cu_->compiler_driver->ComputeInvokeInfo(&m_unit, current_offset,
- type, target_method,
- vtable_idx,
- direct_code, direct_method,
- false, true) &&
+ false, true,
+ &type, &target_method,
+ &vtable_idx,
+ &direct_code, &direct_method) &&
!(cu_->enable_debug & (1 << kDebugSlowInvokePath));
return (((type == kDirect) || (type == kStatic)) &&
fast_path && ((direct_code == 0) || (direct_method == 0)));
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
index a4ab15d..fa60818 100644
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -1356,10 +1356,10 @@ void Mir2Lir::GenInvoke(CallInfo* info) {
bool fast_path =
cu_->compiler_driver->ComputeInvokeInfo(mir_graph_->GetCurrentDexCompilationUnit(),
current_dalvik_offset_,
- info->type, target_method,
- vtable_idx,
- direct_code, direct_method,
- true, true) && !SLOW_INVOKE_PATH;
+ true, true,
+ &info->type, &target_method,
+ &vtable_idx,
+ &direct_code, &direct_method) && !SLOW_INVOKE_PATH;
if (info->type == kInterface) {
if (fast_path) {
p_null_ck = &null_ck;