From cd05a6274782c50a2b990c18b5f8d5ae5e44d509 Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Wed, 15 Aug 2012 00:02:05 -0700 Subject: Global lock levels for the LLVM side. Change-Id: Id2807c8775686bc38f79e13c097fadda2d96d042 --- src/compiler_llvm/jni_compiler.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/compiler_llvm/jni_compiler.cc') diff --git a/src/compiler_llvm/jni_compiler.cc b/src/compiler_llvm/jni_compiler.cc index b96e0be5c4..1f687f6f20 100644 --- a/src/compiler_llvm/jni_compiler.cc +++ b/src/compiler_llvm/jni_compiler.cc @@ -47,14 +47,7 @@ JniCompiler::JniCompiler(CompilationUnit* cunit, oat_compilation_unit_(oat_compilation_unit), access_flags_(oat_compilation_unit->access_flags_), method_idx_(oat_compilation_unit->method_idx_), - class_linker_(oat_compilation_unit->class_linker_), - class_loader_(oat_compilation_unit->class_loader_), - dex_cache_(oat_compilation_unit->dex_cache_), - dex_file_(oat_compilation_unit->dex_file_), - method_(dex_cache_->GetResolvedMethod(method_idx_)) { - - // Check: Ensure that the method is resolved - CHECK_NE(method_, static_cast(NULL)); + dex_file_(oat_compilation_unit->dex_file_) { // Check: Ensure that JNI compiler will only get "native" method CHECK((access_flags_ & kAccNative) != 0); @@ -272,9 +265,11 @@ void JniCompiler::CreateFunction() { // LLVM function name std::string func_name(ElfFuncName(cunit_->GetIndex())); + const bool is_static = (access_flags_ & kAccStatic) != 0; + // Get function type llvm::FunctionType* func_type = - GetFunctionType(method_idx_, method_->IsStatic(), false); + GetFunctionType(method_idx_, is_static, false); // Create function func_ = llvm::Function::Create(func_type, llvm::Function::ExternalLinkage, -- cgit v1.2.3-59-g8ed1b