summaryrefslogtreecommitdiffstats
path: root/compiler/jni
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-08-12 23:19:23 -0700
committerAndreas Gampe <agampe@google.com>2014-08-22 21:20:08 -0700
commit53c913bb71b218714823c8c87a1f92830c336f61 (patch)
tree96aebfc9ae62eb1454b78286236567e2b6f3e5c7 /compiler/jni
parente18aa4316eb9a15cd6b1051f27a1ce49967c170e (diff)
downloadart-53c913bb71b218714823c8c87a1f92830c336f61.zip
art-53c913bb71b218714823c8c87a1f92830c336f61.tar.gz
art-53c913bb71b218714823c8c87a1f92830c336f61.tar.bz2
ART: Clean up compiler
Clean up the compiler: less extern functions, dis-entangle compilers, hide some compiler specifics, lower global includes. Change-Id: Ibaf88d02505d86994d7845cf0075be5041cc8438
Diffstat (limited to 'compiler/jni')
-rw-r--r--compiler/jni/quick/jni_compiler.cc11
-rw-r--r--compiler/jni/quick/jni_compiler.h32
2 files changed, 38 insertions, 5 deletions
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index 8e87021..78a228b 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 <algorithm>
#include <memory>
#include <vector>
@@ -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 0000000..46277f1
--- /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_