Expanding ClassLinkerTest/LibCore to cover more Class details
- Ensure SetReferenceOffsets is always called
- Change Field to use StringPiece instead of const char*
- Removed "shrunk vtable" logging noise
- Fix small bug in Class::Status logging
- Rename Field signature to descriptor for clarity
- Add Class:IsSynthetic
Change-Id: I453f480ad7a87a6a391418684771c92d62f116c9
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 5db2bea..01e1119 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -367,8 +367,8 @@
Field* dst) {
const DexFile::FieldId& field_id = dex_file.GetFieldId(src.field_idx_);
dst->klass_ = klass;
- dst->name_ = dex_file.dexStringById(field_id.name_idx_);
- dst->signature_ = dex_file.dexStringByTypeIdx(field_id.type_idx_);
+ dst->name_.set(dex_file.dexStringById(field_id.name_idx_));
+ dst->descriptor_.set(dex_file.dexStringByTypeIdx(field_id.type_idx_));
dst->access_flags_ = src.access_flags_;
}
@@ -1144,9 +1144,6 @@
if (actual_count < max_count) {
// TODO: do not assign to the vtable field until it is fully constructed.
klass->vtable_ = klass->vtable_->CopyOf(actual_count);
- LG << "shrunk vtable: "
- << "was " << max_count << ", "
- << "now " << actual_count;
}
} else {
CHECK(klass->GetDescriptor() == "Ljava/lang/Object;");
@@ -1457,8 +1454,8 @@
break;
}
}
- klass->SetReferenceOffsets(reference_offsets);
}
+ klass->SetReferenceOffsets(reference_offsets);
}
Class* ClassLinker::ResolveClass(const Class* referrer,