summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-05-06 17:41:32 -0700
committerJeff Hao <jeffhao@google.com>2015-05-06 18:16:27 -0700
commit5c8fe3028655b2f1fcab77080272f071cc0d8bc4 (patch)
treec526fad034772dfa3c56583ae6e4e3ecc7ad1cd9
parentf7083ed806da454ba6a50ddef34799559f863fd4 (diff)
downloadart-5c8fe3028655b2f1fcab77080272f071cc0d8bc4.tar.gz
art-5c8fe3028655b2f1fcab77080272f071cc0d8bc4.tar.bz2
art-5c8fe3028655b2f1fcab77080272f071cc0d8bc4.zip
In quick compiler, force string init invoke to be fast path.
Was running into an issue where a secondary dex file was falling back on the quick compiler, and IsFastInvoke returned 0 because the referrer_class was nullptr, causing the string init to be slow path. The string init technically does not have to be fast path, but there's no reason to duplicate the logic to call off a thread pointer on the slow path. Bug: 20870917 Change-Id: I47e1524d939eb7e9b1da8186092fafc6e925009e
-rw-r--r--compiler/dex/mir_method_info.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/mir_method_info.cc b/compiler/dex/mir_method_info.cc
index 565460479..94be1fd4a 100644
--- a/compiler/dex/mir_method_info.cc
+++ b/compiler/dex/mir_method_info.cc
@@ -169,7 +169,8 @@ void MirMethodLoweringInfo::Resolve(CompilerDriver* compiler_driver,
~(kFlagFastPath | kFlagIsIntrinsic | kFlagIsSpecial | kFlagClassIsInitialized |
(kInvokeTypeMask << kBitSharpTypeBegin));
it->flags_ = other_flags |
- (fast_path_flags != 0 ? kFlagFastPath : 0u) |
+ // String init path is a special always-fast path.
+ (fast_path_flags != 0 || string_init ? kFlagFastPath : 0u) |
((is_intrinsic_or_special & kInlineIntrinsic) != 0 ? kFlagIsIntrinsic : 0u) |
((is_intrinsic_or_special & kInlineSpecial) != 0 ? kFlagIsSpecial : 0u) |
(static_cast<uint16_t>(invoke_type) << kBitSharpTypeBegin) |