diff options
author | 2025-02-28 17:20:02 +0000 | |
---|---|---|
committer | 2025-03-03 00:23:03 -0800 | |
commit | 3477cfd772c29976a705e70a9cbc20f6c3ecfc81 (patch) | |
tree | cd0b0a3bd9853c18191958a6c3ac212e6157b070 | |
parent | e36b5d67dca61eb0a27384ef2a5502c21d8af714 (diff) |
Re-order two lines for performance.
Follow-up from aosp/3510073
Test: test.py
Change-Id: I9ee6a310276022cdf612dca5a47bb5c326bc08e4
-rw-r--r-- | runtime/interpreter/mterp/nterp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/interpreter/mterp/nterp.cc b/runtime/interpreter/mterp/nterp.cc index 8ce7e42a84..a66ecd0855 100644 --- a/runtime/interpreter/mterp/nterp.cc +++ b/runtime/interpreter/mterp/nterp.cc @@ -398,8 +398,8 @@ static ArtField* FindFieldFast(ArtMethod* caller, uint16_t field_index) return nullptr; } - const dex::FieldId& field_id = caller->GetDexFile()->GetFieldId(field_index); ObjPtr<mirror::Class> cls = caller->GetDeclaringClass(); + const dex::FieldId& field_id = cls->GetDexFile().GetFieldId(field_index); if (cls->GetDexTypeIndex() == field_id.class_idx_) { // Field is in the same class as the caller, no need to do access checks. return cls->FindDeclaredField(field_index); |