Reuse SIRT for C++ references
Change-Id: I8310e55da42f55f7ec60f6b17face436c77a979f
diff --git a/src/mark_sweep.cc b/src/mark_sweep.cc
index 71983fe..d70d10d 100644
--- a/src/mark_sweep.cc
+++ b/src/mark_sweep.cc
@@ -216,29 +216,8 @@
// Scans the header, static field references, and interface pointers
// of a class object.
inline void MarkSweep::ScanClass(const Object* obj) {
- DCHECK(obj != NULL);
- DCHECK(obj->IsClass());
- const Class* klass = obj->AsClass();
- MarkObject(klass->GetClass());
ScanInstanceFields(obj);
- MarkObject(klass->GetDescriptor());
- MarkObject(klass->GetDexCache());
- MarkObject(klass->GetVerifyErrorClass());
- if (klass->IsArrayClass()) {
- MarkObject(klass->GetComponentType());
- }
- if (klass->IsLoaded()) {
- MarkObject(klass->GetSuperClass());
- }
- MarkObject(klass->GetClassLoader());
- if (klass->IsLoaded()) {
- MarkObject(klass->GetInterfaces());
- MarkObject(klass->GetDirectMethods());
- MarkObject(klass->GetVirtualMethods());
- MarkObject(klass->GetIFields());
- MarkObject(klass->GetSFields());
- }
- ScanStaticFields(klass);
+ ScanStaticFields(obj->AsClass());
}
// Scans the header of all array objects. If the array object is