diff options
| author | 2012-06-03 07:15:25 -0700 | |
|---|---|---|
| committer | 2012-06-03 09:12:30 -0700 | |
| commit | eead4ac17ec9d5e750269a7d36bf6c36a6fd60c6 (patch) | |
| tree | 911602ed79cde974cba5b6a18d57fc27987436ef /src/compiler_llvm/compiler_llvm.cc | |
| parent | de479be99328d2113bf483e082c9ecf235a34d69 (diff) | |
Implement proxy stub for compiler_llvm.
Change-Id: Id8ba59c62795d885a18b3cc634e7ef370a2d2f97
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 17 |
1 files changed, 11 insertions, 6 deletions
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 <llvm/LinkAllPasses.h> #include <llvm/LinkAllVMCore.h> @@ -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<UpcallCompiler> upcall_compiler( - new UpcallCompiler(curr_cunit_, *compiler_)); + UniquePtr<StubCompiler> 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 |