From a412964bf9f8b2aa78e7a4849990381207140850 Mon Sep 17 00:00:00 2001 From: Jeff Hao Date: Wed, 6 May 2015 17:41:32 -0700 Subject: 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 (cherry picked from commit I47e1524d939eb7e9b1da8186092fafc6e925009e) Change-Id: Ieacd965943759de2b075c30e03cf0a71863f499e --- compiler/dex/mir_method_info.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/dex/mir_method_info.cc b/compiler/dex/mir_method_info.cc index 5654604797..94be1fd4a5 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(invoke_type) << kBitSharpTypeBegin) | -- cgit v1.2.3-59-g8ed1b