summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.cc
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-04-10 20:13:54 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-10 20:21:06 -0700
commit4e42a59fd9db94aa9b2d48c15c8aa1cc908d8356 (patch)
tree35733ca7a5a0b71ae308c223de2e7bce8eb2dfde /src/compiler_llvm/method_compiler.cc
parent836eb8086a58cefb2cd7c31df86ac071f80f0fda (diff)
Don't need to resolve method on slow path.
Also, add exception landding pad to fix test 088. Change-Id: I095ddb9aea59733f805d01e9d5f5a654de4fdb13
Diffstat (limited to 'src/compiler_llvm/method_compiler.cc')
-rw-r--r--src/compiler_llvm/method_compiler.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 49717fca02..52a4456000 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -2826,23 +2826,23 @@ void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc,
}
// Load the method object
- llvm::Value* callee_method_object_addr_ = NULL;
+ llvm::Value* callee_method_object_addr = NULL;
if (!is_fast_path) {
- callee_method_object_addr_ =
+ callee_method_object_addr =
EmitCallRuntimeForCalleeMethodObjectAddr(callee_method_idx, invoke_type,
this_addr, dex_pc, is_fast_path);
} else {
switch (invoke_type) {
case kStatic:
case kDirect:
- callee_method_object_addr_ =
+ callee_method_object_addr =
EmitLoadSDCalleeMethodObjectAddr(callee_method_idx);
break;
case kVirtual:
DCHECK(vtable_idx != -1);
- callee_method_object_addr_ =
+ callee_method_object_addr =
EmitLoadVirtualCalleeMethodObjectAddr(vtable_idx, this_addr);
break;
@@ -2852,28 +2852,28 @@ void MethodCompiler::EmitInsn_Invoke(uint32_t dex_pc,
break;
case kInterface:
- callee_method_object_addr_ =
+ callee_method_object_addr =
EmitCallRuntimeForCalleeMethodObjectAddr(callee_method_idx,
invoke_type, this_addr,
dex_pc, is_fast_path);
break;
}
- }
- // Ensure the callee method object is resolved, linked, and its declaring
- // class is initialized.
- bool is_virtual = (dec_insn.opcode == Instruction::INVOKE_VIRTUAL) ||
- (dec_insn.opcode == Instruction::INVOKE_VIRTUAL_RANGE) ||
- (dec_insn.opcode == Instruction::INVOKE_SUPER) ||
- (dec_insn.opcode == Instruction::INVOKE_SUPER_RANGE);
+ // Ensure the callee method object is resolved.
+ bool is_virtual = (dec_insn.opcode == Instruction::INVOKE_VIRTUAL) ||
+ (dec_insn.opcode == Instruction::INVOKE_VIRTUAL_RANGE) ||
+ (dec_insn.opcode == Instruction::INVOKE_SUPER) ||
+ (dec_insn.opcode == Instruction::INVOKE_SUPER_RANGE);
- llvm::Value* caller_method_object_addr = EmitLoadMethodObjectAddr();
+ llvm::Value* caller_method_object_addr = EmitLoadMethodObjectAddr();
- llvm::Value* callee_method_object_addr =
- EmitEnsureResolved(callee_method_object_addr_,
- caller_method_object_addr,
- callee_method_idx,
- is_virtual);
+ callee_method_object_addr = EmitEnsureResolved(callee_method_object_addr,
+ caller_method_object_addr,
+ callee_method_idx,
+ is_virtual);
+
+ EmitGuard_ExceptionLandingPad(dex_pc);
+ }
#if 0
llvm::Value* code_field_offset_value =