From eead4ac17ec9d5e750269a7d36bf6c36a6fd60c6 Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Sun, 3 Jun 2012 07:15:25 -0700 Subject: Implement proxy stub for compiler_llvm. Change-Id: Id8ba59c62795d885a18b3cc634e7ef370a2d2f97 --- src/compiler_llvm/compiler_llvm.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/compiler_llvm/compiler_llvm.cc') diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index 6d30912ee2..95e9803f68 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -30,7 +30,7 @@ #include "oat_compilation_unit.h" #include "oat_file.h" #include "stl_util.h" -#include "upcall_compiler.h" +#include "stub_compiler.h" #include #include @@ -225,8 +225,8 @@ const void* CompilerLLVM::GetMethodCodeAddr(const CompiledMethod* cm) const { const Method::InvokeStub* CompilerLLVM:: GetMethodInvokeStubAddr(const CompiledInvokeStub* cm) const { - return elf_loader_->GetMethodInvokeStubAddr(cm->GetElfIndex(), - cm->GetElfFuncIndex()); + return elf_loader_->GetMethodInvokeStubAddr(cm->GetStubElfIndex(), + cm->GetInvokeStubElfFuncIndex()); } @@ -279,10 +279,15 @@ CompiledInvokeStub* CompilerLLVM::CreateInvokeStub(bool is_static, MutexLock GUARD_CUNIT(curr_cunit_->cunit_lock_); - UniquePtr upcall_compiler( - new UpcallCompiler(curr_cunit_, *compiler_)); + UniquePtr stub_compiler( + new StubCompiler(curr_cunit_, *compiler_)); - return upcall_compiler->CreateStub(is_static, shorty); + CompiledInvokeStub* compiled_stub = new CompiledInvokeStub(curr_cunit_->GetElfIndex()); + + compiled_stub->SetInvokeStub(stub_compiler->CreateInvokeStub(is_static, shorty)); + compiled_stub->SetProxyStub(stub_compiler->CreateProxyStub(is_static, shorty)); + + return compiled_stub; } } // namespace compiler_llvm -- cgit v1.2.3-59-g8ed1b