summaryrefslogtreecommitdiff
path: root/dex2oat
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-06-14 11:58:13 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2025-02-07 07:06:46 -0800
commitf850690a901c01d95210e3ecf66aa7255206aafc (patch)
tree98e871f5de2416109316eb25076380ed80638beb /dex2oat
parent08f1b58976bae5514a0d6877b4e8f68ff15bcafb (diff)
Use `ClassAccessor::GetViewDescriptor()` more.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 338123769 Change-Id: Ib8206f037ece05374e16b8a3816520ea9bc70931
Diffstat (limited to 'dex2oat')
-rw-r--r--dex2oat/dex2oat_test.cc2
-rw-r--r--dex2oat/driver/compiler_driver.cc5
2 files changed, 4 insertions, 3 deletions
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index 7013bbce0c..9d837cbf67 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -1797,7 +1797,7 @@ TEST_F(Dex2oatTest, AppImageResolveStrings) {
bool mutated_successfully = false;
// Change the dex instructions to make an opcode that spans past the end of the code item.
for (ClassAccessor accessor : dex->GetClasses()) {
- if (accessor.GetDescriptor() == std::string("LStringLiterals$StartupClass;")) {
+ if (accessor.GetDescriptorView() == "LStringLiterals$StartupClass;") {
classes.push_back(accessor.GetClassIdx());
}
for (const ClassAccessor::Method& method : accessor.GetMethods()) {
diff --git a/dex2oat/driver/compiler_driver.cc b/dex2oat/driver/compiler_driver.cc
index fc2d94a342..ddf9bbda84 100644
--- a/dex2oat/driver/compiler_driver.cc
+++ b/dex2oat/driver/compiler_driver.cc
@@ -1813,7 +1813,8 @@ static void LoadAndUpdateStatus(const ClassAccessor& accessor,
// a boot image class, or a class in a different dex file for multidex, and
// we should not update the status in that case.
if (&cls->GetDexFile() == &accessor.GetDexFile()) {
- VLOG(compiler) << "Updating class status of " << accessor.GetDescriptor() << " to " << status;
+ VLOG(compiler) << "Updating class status of " << accessor.GetDescriptorView()
+ << " to " << status;
ObjectLock<mirror::Class> lock(self, cls);
mirror::Class::SetStatus(cls, status, self);
}
@@ -1880,7 +1881,7 @@ bool CompilerDriver::FastVerify(jobject jclass_loader,
// If the class will be in the image, we can rely on the ArtMethods
// telling that they need access checks.
VLOG(compiler) << "Promoting "
- << std::string(accessor.GetDescriptor())
+ << accessor.GetDescriptorView()
<< " from needs access checks to verified given it is an image class";
status = ClassStatus::kVerified;
}