From f04364f0ff789935d05490ee684f01c3de431780 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Fri, 10 Feb 2012 12:01:39 +0800 Subject: Add upcall compiler. Upcall compiler compiles the invoke stub for native-to-managed method invocation. Change-Id: I09fb1e4b3f166e8da5de73e8f39509cd9be6c152 --- src/compiler_llvm/compiler_llvm.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (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 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 #include @@ -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 upcall_compiler( + new UpcallCompiler(insn_set_, *compiler_)); + + return upcall_compiler->CreateStub(is_static, shorty); +} + + } // namespace compiler_llvm } // namespace art -- cgit v1.2.3-59-g8ed1b