summaryrefslogtreecommitdiffstats
path: root/compiler/dex
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2013-09-06 16:43:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-06 16:43:43 +0000
commit866709c85da0c0d2c76968713e4dc4a35dce27fd (patch)
treeb2fb26bfe6c7ef9ae340d2ebb3d7c0060a8f1582 /compiler/dex
parent936bf024b26f84f9332d195a581912e95d9cbe4b (diff)
parent1e54d68ce8e77dfe63340275d11a072c5184c89a (diff)
downloadart-866709c85da0c0d2c76968713e4dc4a35dce27fd.zip
art-866709c85da0c0d2c76968713e4dc4a35dce27fd.tar.gz
art-866709c85da0c0d2c76968713e4dc4a35dce27fd.tar.bz2
Merge "Disable devirtualization detection in DEX-to-DEX compiler." into dalvik-dev
Diffstat (limited to 'compiler/dex')
-rw-r--r--compiler/dex/dex_to_dex_compiler.cc5
-rw-r--r--compiler/dex/mir_dataflow.cc2
-rw-r--r--compiler/dex/quick/gen_invoke.cc2
3 files changed, 5 insertions, 4 deletions
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
index a392f82..3fa0eab 100644
--- a/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -246,11 +246,12 @@ void DexCompiler::CompileInvokeVirtual(Instruction* inst,
int vtable_idx;
uintptr_t direct_code;
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);
- // TODO: support devirtualization.
+ false, kEnableDevirtualization);
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 3a73717..42ca5dc 100644
--- a/compiler/dex/mir_dataflow.cc
+++ b/compiler/dex/mir_dataflow.cc
@@ -1224,7 +1224,7 @@ bool MIRGraph::InvokeUsesMethodStar(MIR* mir) {
type, target_method,
vtable_idx,
direct_code, direct_method,
- false) &&
+ false, true) &&
!(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 073b550..a4ab15d 100644
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -1359,7 +1359,7 @@ void Mir2Lir::GenInvoke(CallInfo* info) {
info->type, target_method,
vtable_idx,
direct_code, direct_method,
- true) && !SLOW_INVOKE_PATH;
+ true, true) && !SLOW_INVOKE_PATH;
if (info->type == kInterface) {
if (fast_path) {
p_null_ck = &null_ck;