summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/gen_invoke.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-02-24 09:37:21 -0800
committerMathieu Chartier <mathieuc@google.com>2015-02-24 10:47:02 -0800
commite5f13e57ff8fa36342beb33830b3ec5942a61cca (patch)
tree02e370ecc4e0d955f28bfc71a41015f94fbb19b7 /compiler/dex/quick/gen_invoke.cc
parent354d58ba776866ea7b1c71f0d0848d5aaa013ae3 (diff)
downloadandroid_art-e5f13e57ff8fa36342beb33830b3ec5942a61cca.tar.gz
android_art-e5f13e57ff8fa36342beb33830b3ec5942a61cca.tar.bz2
android_art-e5f13e57ff8fa36342beb33830b3ec5942a61cca.zip
Revert "Revert "Add JIT""
Added missing EntryPointToCodePointer. This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399. Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
Diffstat (limited to 'compiler/dex/quick/gen_invoke.cc')
-rwxr-xr-xcompiler/dex/quick/gen_invoke.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
index 8e3df7c7a2..040b07cedd 100755
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -863,11 +863,12 @@ RegLocation Mir2Lir::InlineTarget(CallInfo* info) {
RegLocation res;
if (info->result.location == kLocInvalid) {
// If result is unused, return a sink target based on type of invoke target.
- res = GetReturn(ShortyToRegClass(mir_graph_->GetShortyFromTargetIdx(info->index)[0]));
+ res = GetReturn(
+ ShortyToRegClass(mir_graph_->GetShortyFromMethodReference(info->method_ref)[0]));
} else {
res = info->result;
DCHECK_EQ(LocToRegClass(res),
- ShortyToRegClass(mir_graph_->GetShortyFromTargetIdx(info->index)[0]));
+ ShortyToRegClass(mir_graph_->GetShortyFromMethodReference(info->method_ref)[0]));
}
return res;
}
@@ -876,11 +877,12 @@ RegLocation Mir2Lir::InlineTargetWide(CallInfo* info) {
RegLocation res;
if (info->result.location == kLocInvalid) {
// If result is unused, return a sink target based on type of invoke target.
- res = GetReturnWide(ShortyToRegClass(mir_graph_->GetShortyFromTargetIdx(info->index)[0]));
+ res = GetReturnWide(ShortyToRegClass(
+ mir_graph_->GetShortyFromMethodReference(info->method_ref)[0]));
} else {
res = info->result;
DCHECK_EQ(LocToRegClass(res),
- ShortyToRegClass(mir_graph_->GetShortyFromTargetIdx(info->index)[0]));
+ ShortyToRegClass(mir_graph_->GetShortyFromMethodReference(info->method_ref)[0]));
}
return res;
}
@@ -1418,7 +1420,8 @@ bool Mir2Lir::GenInlinedUnsafePut(CallInfo* info, bool is_long,
void Mir2Lir::GenInvoke(CallInfo* info) {
DCHECK(cu_->compiler_driver->GetMethodInlinerMap() != nullptr);
- if (cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(cu_->dex_file)
+ const DexFile* dex_file = info->method_ref.dex_file;
+ if (cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(dex_file)
->GenIntrinsic(this, info)) {
return;
}
@@ -1428,7 +1431,7 @@ void Mir2Lir::GenInvoke(CallInfo* info) {
void Mir2Lir::GenInvokeNoInline(CallInfo* info) {
int call_state = 0;
LIR* null_ck;
- LIR** p_null_ck = NULL;
+ LIR** p_null_ck = nullptr;
NextCallInsn next_call_insn;
FlushAllRegs(); /* Everything to home location */
// Explicit register usage
@@ -1440,6 +1443,7 @@ void Mir2Lir::GenInvokeNoInline(CallInfo* info) {
info->type = method_info.GetSharpType();
bool fast_path = method_info.FastPath();
bool skip_this;
+
if (info->type == kInterface) {
next_call_insn = fast_path ? NextInterfaceCallInsn : NextInterfaceCallInsnWithAccessCheck;
skip_this = fast_path;
@@ -1469,7 +1473,8 @@ void Mir2Lir::GenInvokeNoInline(CallInfo* info) {
// Finish up any of the call sequence not interleaved in arg loading
while (call_state >= 0) {
call_state = next_call_insn(cu_, info, call_state, target_method, method_info.VTableIndex(),
- method_info.DirectCode(), method_info.DirectMethod(), original_type);
+ method_info.DirectCode(), method_info.DirectMethod(),
+ original_type);
}
LIR* call_insn = GenCallInsn(method_info);
MarkSafepointPC(call_insn);