summaryrefslogtreecommitdiffstats
path: root/compiler/oat_writer.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-02-27 12:26:20 -0800
committerAndreas Gampe <agampe@google.com>2014-03-03 23:27:12 +0000
commit2da882315a61072664f7ce3c212307342e907207 (patch)
tree67d777be044f5b60e2f13ab7968b63c581904ea9 /compiler/oat_writer.cc
parent762d4e5b9e777ae64c4ba581af9c84b78a5e96a6 (diff)
downloadart-2da882315a61072664f7ce3c212307342e907207.zip
art-2da882315a61072664f7ce3c212307342e907207.tar.gz
art-2da882315a61072664f7ce3c212307342e907207.tar.bz2
Initial changes towards Generic JNI option
Some initial changes that lead to an UNIMPLEMENTED. Works by not compiling for JNI right now and tracking native methods which have neither quick nor portable code. Uses new trampoline. Change-Id: I5448654044eb2717752fd7359f4ef8bd5c17be6e
Diffstat (limited to 'compiler/oat_writer.cc')
-rw-r--r--compiler/oat_writer.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc
index a400bdd..181240e 100644
--- a/compiler/oat_writer.cc
+++ b/compiler/oat_writer.cc
@@ -60,6 +60,7 @@ OatWriter::OatWriter(const std::vector<const DexFile*>& dex_files,
size_portable_imt_conflict_trampoline_(0),
size_portable_resolution_trampoline_(0),
size_portable_to_interpreter_bridge_(0),
+ size_quick_generic_jni_trampoline_(0),
size_quick_imt_conflict_trampoline_(0),
size_quick_resolution_trampoline_(0),
size_quick_to_interpreter_bridge_(0),
@@ -256,6 +257,7 @@ size_t OatWriter::InitOatCode(size_t offset) {
DO_TRAMPOLINE(portable_imt_conflict_trampoline_, PortableImtConflictTrampoline);
DO_TRAMPOLINE(portable_resolution_trampoline_, PortableResolutionTrampoline);
DO_TRAMPOLINE(portable_to_interpreter_bridge_, PortableToInterpreterBridge);
+ DO_TRAMPOLINE(quick_generic_jni_trampoline_, QuickGenericJniTrampoline);
DO_TRAMPOLINE(quick_imt_conflict_trampoline_, QuickImtConflictTrampoline);
DO_TRAMPOLINE(quick_resolution_trampoline_, QuickResolutionTrampoline);
DO_TRAMPOLINE(quick_to_interpreter_bridge_, QuickToInterpreterBridge);
@@ -268,6 +270,7 @@ size_t OatWriter::InitOatCode(size_t offset) {
oat_header_->SetPortableImtConflictTrampolineOffset(0);
oat_header_->SetPortableResolutionTrampolineOffset(0);
oat_header_->SetPortableToInterpreterBridgeOffset(0);
+ oat_header_->SetQuickGenericJniTrampolineOffset(0);
oat_header_->SetQuickImtConflictTrampolineOffset(0);
oat_header_->SetQuickResolutionTrampolineOffset(0);
oat_header_->SetQuickToInterpreterBridgeOffset(0);
@@ -576,6 +579,7 @@ bool OatWriter::Write(OutputStream* out) {
DO_STAT(size_portable_imt_conflict_trampoline_);
DO_STAT(size_portable_resolution_trampoline_);
DO_STAT(size_portable_to_interpreter_bridge_);
+ DO_STAT(size_quick_generic_jni_trampoline_);
DO_STAT(size_quick_imt_conflict_trampoline_);
DO_STAT(size_quick_resolution_trampoline_);
DO_STAT(size_quick_to_interpreter_bridge_);
@@ -675,6 +679,7 @@ size_t OatWriter::WriteCode(OutputStream* out, const size_t file_offset) {
DO_TRAMPOLINE(portable_imt_conflict_trampoline_);
DO_TRAMPOLINE(portable_resolution_trampoline_);
DO_TRAMPOLINE(portable_to_interpreter_bridge_);
+ DO_TRAMPOLINE(quick_generic_jni_trampoline_);
DO_TRAMPOLINE(quick_imt_conflict_trampoline_);
DO_TRAMPOLINE(quick_resolution_trampoline_);
DO_TRAMPOLINE(quick_to_interpreter_bridge_);