From 53c913bb71b218714823c8c87a1f92830c336f61 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 12 Aug 2014 23:19:23 -0700 Subject: ART: Clean up compiler Clean up the compiler: less extern functions, dis-entangle compilers, hide some compiler specifics, lower global includes. Change-Id: Ibaf88d02505d86994d7845cf0075be5041cc8438 --- compiler/jni/quick/jni_compiler.cc | 11 ++++++----- compiler/jni/quick/jni_compiler.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 compiler/jni/quick/jni_compiler.h (limited to 'compiler/jni') diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc index 8e870210b9..78a228be47 100644 --- a/compiler/jni/quick/jni_compiler.cc +++ b/compiler/jni/quick/jni_compiler.cc @@ -14,6 +14,8 @@ * limitations under the License. */ +#include "jni_compiler.h" + #include #include #include @@ -546,10 +548,9 @@ static void SetNativeParameter(Assembler* jni_asm, } } -} // namespace art - -extern "C" art::CompiledMethod* ArtQuickJniCompileMethod(art::CompilerDriver* compiler, - uint32_t access_flags, uint32_t method_idx, - const art::DexFile& dex_file) { +CompiledMethod* ArtQuickJniCompileMethod(CompilerDriver* compiler, uint32_t access_flags, + uint32_t method_idx, const DexFile& dex_file) { return ArtJniCompileMethodInternal(compiler, access_flags, method_idx, dex_file); } + +} // namespace art diff --git a/compiler/jni/quick/jni_compiler.h b/compiler/jni/quick/jni_compiler.h new file mode 100644 index 0000000000..46277f105c --- /dev/null +++ b/compiler/jni/quick/jni_compiler.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ART_COMPILER_JNI_QUICK_JNI_COMPILER_H_ +#define ART_COMPILER_JNI_QUICK_JNI_COMPILER_H_ + +#include "dex_file.h" + +namespace art { + +class CompilerDriver; +class CompiledMethod; + +CompiledMethod* ArtQuickJniCompileMethod(CompilerDriver* compiler, uint32_t access_flags, + uint32_t method_idx, const DexFile& dex_file); + +} // namespace art + +#endif // ART_COMPILER_JNI_QUICK_JNI_COMPILER_H_ -- cgit v1.2.3