diff options
author | 2024-11-28 16:28:04 +0000 | |
---|---|---|
committer | 2025-01-16 11:36:58 +0000 | |
commit | 990cf07523a5c6ae437a0bd0cc80fb63320def5e (patch) | |
tree | 7d7160e014b14368c6cd8dcfcbfe9e2996f19e51 /runtime/interpreter/unstarted_runtime.cc | |
parent | ae13bd8a14183069642a5eed4793cf34f5a2eadc (diff) |
Merge sFields and iFields.
Test: test.py
Change-Id: Ib97fca637a8866a41a4389b150c6000d9fb6d99b
Diffstat (limited to 'runtime/interpreter/unstarted_runtime.cc')
-rw-r--r-- | runtime/interpreter/unstarted_runtime.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc index 9149f3a6c2..07ab73f38e 100644 --- a/runtime/interpreter/unstarted_runtime.cc +++ b/runtime/interpreter/unstarted_runtime.cc @@ -356,20 +356,12 @@ void UnstartedRuntime::UnstartedClassGetDeclaredField( ObjPtr<mirror::Class> klass = shadow_frame->GetVRegReference(arg_offset)->AsClass(); ObjPtr<mirror::String> name2 = shadow_frame->GetVRegReference(arg_offset + 1)->AsString(); ArtField* found = nullptr; - for (ArtField& field : klass->GetIFields()) { + for (ArtField& field : klass->GetFields()) { if (name2->Equals(field.GetName())) { found = &field; break; } } - if (found == nullptr) { - for (ArtField& field : klass->GetSFields()) { - if (name2->Equals(field.GetName())) { - found = &field; - break; - } - } - } if (found != nullptr && ShouldDenyAccessToMember(found, shadow_frame)) { found = nullptr; } |