summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-02-27 16:10:48 -0800
committerMathieu Chartier <mathieuc@google.com>2015-03-20 16:22:48 -0700
commit6ced4092bc425c6aa402d47be5e6c9e6ad2291ec (patch)
tree9ec51241cf7ccd9eb1acd8cfe1cc574a073e02cd /compiler
parent6cc763c8b8157fb42dd44e1dfb84812546500dc1 (diff)
downloadart-6ced4092bc425c6aa402d47be5e6c9e6ad2291ec.zip
art-6ced4092bc425c6aa402d47be5e6c9e6ad2291ec.tar.gz
art-6ced4092bc425c6aa402d47be5e6c9e6ad2291ec.tar.bz2
Enable more direct code for JIT
Hard to measure the performance impact, but it should be faster. Bug: 17950037 Change-Id: Ib8d216bb3b305dc390b5df7ee92427fd6bd8aab3
Diffstat (limited to 'compiler')
-rw-r--r--compiler/driver/compiler_driver.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 34963a9..100d49a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1398,8 +1398,11 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(InvokeType* type, InvokeType
}
} else {
bool method_in_image = heap->FindSpaceFromObject(method, false)->IsImageSpace();
- if (method_in_image || compiling_boot) {
+ if (method_in_image || compiling_boot || runtime->UseJit()) {
// We know we must be able to get to the method in the image, so use that pointer.
+ // In the case where we are the JIT, we can always use direct pointers since we know where
+ // the method and its code are / will be. We don't sharpen to interpreter bridge since we
+ // check IsQuickToInterpreterBridge above.
CHECK(!method->IsAbstract());
*type = sharp_type;
*direct_method = force_relocations ? -1 : reinterpret_cast<uintptr_t>(method);