diff options
| author | 2012-02-10 12:01:39 +0800 | |
|---|---|---|
| committer | 2012-02-19 02:50:04 -0800 | |
| commit | f04364f0ff789935d05490ee684f01c3de431780 (patch) | |
| tree | a47070af79126f5aa315480280b7b44ba7205ef1 /src/compiler_llvm/compiler_llvm.cc | |
| parent | 7caf37e2aebdb9e6f10f691a8148dd3d3405f157 (diff) | |
Add upcall compiler.
Upcall compiler compiles the invoke stub for native-to-managed
method invocation.
Change-Id: I09fb1e4b3f166e8da5de73e8f39509cd9be6c152
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index 8a9b3622e5..21a7bb95e9 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -19,6 +19,7 @@ #include "compiler.h" #include "ir_builder.h" #include "method_compiler.h" +#include "upcall_compiler.h" #include <llvm/ADT/OwningPtr.h> #include <llvm/Bitcode/ReaderWriter.h> @@ -104,5 +105,17 @@ CompilerLLVM::CompileDexMethod(DexFile::CodeItem const* code_item, } +CompiledInvokeStub* CompilerLLVM::CreateInvokeStub(bool is_static, + char const *shorty) { + + MutexLock GUARD(compiler_lock_); + + UniquePtr<UpcallCompiler> upcall_compiler( + new UpcallCompiler(insn_set_, *compiler_)); + + return upcall_compiler->CreateStub(is_static, shorty); +} + + } // namespace compiler_llvm } // namespace art |