From 4e42a59fd9db94aa9b2d48c15c8aa1cc908d8356 Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Tue, 10 Apr 2012 20:13:54 -0700 Subject: Don't need to resolve method on slow path. Also, add exception landding pad to fix test 088. Change-Id: I095ddb9aea59733f805d01e9d5f5a654de4fdb13 --- src/compiler_llvm/method_compiler.cc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/compiler_llvm/method_compiler.cc') 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 = -- cgit v1.2.3-59-g8ed1b