diff options
Diffstat (limited to 'compiler/dex/mir_method_info.cc')
-rw-r--r-- | compiler/dex/mir_method_info.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/dex/mir_method_info.cc b/compiler/dex/mir_method_info.cc index 4580e76e0b..2c33ef18f5 100644 --- a/compiler/dex/mir_method_info.cc +++ b/compiler/dex/mir_method_info.cc @@ -75,10 +75,14 @@ void MirMethodLoweringInfo::Resolve(CompilerDriver* compiler_driver, int fast_path_flags = compiler_driver->IsFastInvoke( soa, dex_cache, class_loader, mUnit, referrer_class.get(), resolved_method, &invoke_type, &target_method, devirt_target, &it->direct_code_, &it->direct_method_); - uint16_t other_flags = it->flags_ & ~kFlagFastPath & ~(kInvokeTypeMask << kBitSharpTypeBegin); + bool needs_clinit = + compiler_driver->NeedsClassInitialization(referrer_class.get(), resolved_method); + uint16_t other_flags = it->flags_ & + ~(kFlagFastPath | kFlagNeedsClassInitialization | (kInvokeTypeMask << kBitSharpTypeBegin)); it->flags_ = other_flags | (fast_path_flags != 0 ? kFlagFastPath : 0u) | - (static_cast<uint16_t>(invoke_type) << kBitSharpTypeBegin); + (static_cast<uint16_t>(invoke_type) << kBitSharpTypeBegin) | + (needs_clinit ? kFlagNeedsClassInitialization : 0u); it->target_dex_file_ = target_method.dex_file; it->target_method_idx_ = target_method.dex_method_index; it->stats_flags_ = fast_path_flags; |