diff options
author | 2017-07-27 14:14:28 +0100 | |
---|---|---|
committer | 2017-07-27 15:30:47 +0100 | |
commit | b45528c1f1b83ca8c970f439b54fbfcfda6908ea (patch) | |
tree | e8f493a7b21064d353d112ea1378d7819db385aa /compiler/optimizing/inliner.cc | |
parent | 2c2e13ec24bff70db6e49270b9d4d787add9925e (diff) |
ART: Refactor retrieval of types through ArtMethod.
Split Get*() functions that take a "bool resolve"
argument into Lookup*() and Resolve*() functions.
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I0b7eaa1fadc2ffa8c0168203790467f91a126963
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r-- | compiler/optimizing/inliner.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 38a1a8c024..0141c26352 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -1948,7 +1948,7 @@ static bool IsReferenceTypeRefinement(ReferenceTypeInfo declared_rti, declared_rti.IsStrictSupertypeOf(actual_rti); } -ReferenceTypeInfo HInliner::GetClassRTI(mirror::Class* klass) { +ReferenceTypeInfo HInliner::GetClassRTI(ObjPtr<mirror::Class> klass) { return ReferenceTypePropagation::IsAdmissible(klass) ? ReferenceTypeInfo::Create(handles_->NewHandle(klass)) : graph_->GetInexactObjectRti(); @@ -1976,9 +1976,8 @@ bool HInliner::ArgumentTypesMoreSpecific(HInvoke* invoke_instruction, ArtMethod* ++param_idx, ++input_idx) { HInstruction* input = invoke_instruction->InputAt(input_idx); if (input->GetType() == Primitive::kPrimNot) { - mirror::Class* param_cls = resolved_method->GetClassFromTypeIndex( - param_list->GetTypeItem(param_idx).type_idx_, - /* resolve */ false); + ObjPtr<mirror::Class> param_cls = resolved_method->LookupResolvedClassFromTypeIndex( + param_list->GetTypeItem(param_idx).type_idx_); if (IsReferenceTypeRefinement(GetClassRTI(param_cls), /* declared_can_be_null */ true, input)) { @@ -2027,7 +2026,7 @@ void HInliner::FixUpReturnReferenceType(ArtMethod* resolved_method, // TODO: we could be more precise by merging the phi inputs but that requires // some functionality from the reference type propagation. DCHECK(return_replacement->IsPhi()); - mirror::Class* cls = resolved_method->GetReturnType(false /* resolve */); + ObjPtr<mirror::Class> cls = resolved_method->LookupResolvedReturnType(); return_replacement->SetReferenceTypeInfo(GetClassRTI(cls)); } } |