diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2021-01-05 15:30:41 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2021-01-06 10:43:05 +0000 |
commit | cb5f97df7fd3d40a6c92fa46ba98894d5d327efb (patch) | |
tree | 0dd0ef8bb3776517cb24c6a418ff6827a1a25b0a /compiler/optimizing/instruction_builder.cc | |
parent | f6b9e40be37818012cf13341ea968d5761bb64e4 (diff) |
Use ResolveFieldJLS in compiler.
Now that the compiler compiles methods that have
IncompatibleClassChangeError, we need to use the right ResolveField
method.
Missed from previous commit:
https://android-review.googlesource.com/c/platform/art/+/1539969
Test: art/test/run-test --host --prebuild --compact-dex-level fast --jit --runtime-option -Xjitthreshold:0 --no-relocate --runtime-option -Xcheck:jni 073-mismatched-field
Change-Id: I41bc878f20512f5fb9b7ca3b3e1db7e933a8c672
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 0531d725e7..cd03e054b5 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -2040,10 +2040,9 @@ ArtField* HInstructionBuilder::ResolveField(uint16_t field_idx, bool is_static, ClassLinker* class_linker = dex_compilation_unit_->GetClassLinker(); Handle<mirror::ClassLoader> class_loader = dex_compilation_unit_->GetClassLoader(); - ArtField* resolved_field = class_linker->ResolveField(field_idx, - dex_compilation_unit_->GetDexCache(), - class_loader, - is_static); + ArtField* resolved_field = class_linker->ResolveFieldJLS(field_idx, + dex_compilation_unit_->GetDexCache(), + class_loader); DCHECK_EQ(resolved_field == nullptr, soa.Self()->IsExceptionPending()) << "field=" << ((resolved_field == nullptr) ? "null" : resolved_field->PrettyField()) @@ -2055,8 +2054,6 @@ ArtField* HInstructionBuilder::ResolveField(uint16_t field_idx, bool is_static, return nullptr; } - // Check static/instance. The class linker has a fast path for looking into the dex cache - // and does not check static/instance if it hits it. if (UNLIKELY(resolved_field->IsStatic() != is_static)) { return nullptr; } |