diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-06-05 17:42:53 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-06-06 13:12:17 -0700 |
commit | 61c5ebc6aee2cac1c363de6fbdac25ada1697fdb (patch) | |
tree | 444936c3e3718b692ba7f1981b863190f26b4ed7 /runtime/mirror/class.cc | |
parent | 25c4f6a25b3de9b9d7ca5162f1629753a0b7f003 (diff) | |
download | art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.zip art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.gz art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.bz2 |
Change FieldHelper to use a handle.
Fixed compaction bugs related to FieldHelper::GetType in:
artSet32InstanceFromCode
SetFieldValueImpl
CheckReceiver
Field_set
interpreter::DoFieldPut
MethodVerifier::VerifyISGet
MethodVerifier::VerifyISPut
MethodVerifier::VerifyIGetQuick
Bug: 13077697
Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 4b02c0f..06c2796 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -517,11 +517,9 @@ ArtMethod* Class::FindClassInitializer() { ArtField* Class::FindDeclaredInstanceField(const StringPiece& name, const StringPiece& type) { // Is the field in this class? // Interfaces are not relevant because they can't contain instance fields. - FieldHelper fh; for (size_t i = 0; i < NumInstanceFields(); ++i) { ArtField* f = GetInstanceField(i); - fh.ChangeField(f); - if (name == fh.GetName() && type == fh.GetTypeDescriptor()) { + if (name == f->GetName() && type == f->GetTypeDescriptor()) { return f; } } @@ -566,11 +564,9 @@ ArtField* Class::FindInstanceField(const DexCache* dex_cache, uint32_t dex_field ArtField* Class::FindDeclaredStaticField(const StringPiece& name, const StringPiece& type) { DCHECK(type != NULL); - FieldHelper fh; for (size_t i = 0; i < NumStaticFields(); ++i) { ArtField* f = GetStaticField(i); - fh.ChangeField(f); - if (name == fh.GetName() && type == fh.GetTypeDescriptor()) { + if (name == f->GetName() && type == f->GetTypeDescriptor()) { return f; } } |