diff options
| author | 2013-12-18 11:01:49 +0100 | |
|---|---|---|
| committer | 2013-12-18 15:54:11 +0100 | |
| commit | 5dce0c9721af5f9024765c16958ad2f77389aa15 (patch) | |
| tree | 844a38afca7a83b264ca1c038500253cbcaf829b | |
| parent | 460dd85f3f08f5de2f4ec2b5013a5892f789d619 (diff) | |
Generate devirtualization map only for native compilation.
Since devirtualization is only supported by the quick compiler, we do not need
to generate devirtualization map for non-compiled method.
Bug: 12171022
Change-Id: Ic7d6882396a05b70c4b8067bd14b7a339e0a93ab
| -rw-r--r-- | compiler/dex/verified_methods_data.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/dex/verified_methods_data.cc b/compiler/dex/verified_methods_data.cc index 454b92cd85..e5b2b036a2 100644 --- a/compiler/dex/verified_methods_data.cc +++ b/compiler/dex/verified_methods_data.cc @@ -78,6 +78,14 @@ bool VerifiedMethodsData::ProcessVerifiedMethod(verifier::MethodVerifier* method VerifyGcMap(method_verifier, *dex_gc_map); } SetDexGcMap(ref, dex_gc_map); + + // TODO: move this out when DEX-to-DEX supports devirtualization. + if (method_verifier->HasVirtualOrInterfaceInvokes()) { + PcToConcreteMethodMap* pc_to_concrete_method = GenerateDevirtMap(method_verifier); + if (pc_to_concrete_method != NULL) { + SetDevirtMap(ref, pc_to_concrete_method); + } + } } if (method_verifier->HasCheckCasts()) { @@ -86,13 +94,6 @@ bool VerifiedMethodsData::ProcessVerifiedMethod(verifier::MethodVerifier* method SetSafeCastMap(ref, method_to_safe_casts); } } - - if (method_verifier->HasVirtualOrInterfaceInvokes()) { - PcToConcreteMethodMap* pc_to_concrete_method = GenerateDevirtMap(method_verifier); - if (pc_to_concrete_method != NULL) { - SetDevirtMap(ref, pc_to_concrete_method); - } - } return true; } |