Fix method_verifier_test with the SS collector.
Rename art_default_gc_type to ART_DEFAULT_GC_TYPE.
Bug: 19514492
Change-Id: I3c7920e7a84327c5908462e51e21199b89fb187d
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index cb34473..6a83e72 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -74,8 +74,8 @@
#
# Used to change the default GC. Valid values are CMS, SS, GSS. The default is CMS.
#
-art_default_gc_type ?= CMS
-art_default_gc_type_cflags := -DART_DEFAULT_GC_TYPE_IS_$(art_default_gc_type)
+ART_DEFAULT_GC_TYPE ?= CMS
+art_default_gc_type_cflags := -DART_DEFAULT_GC_TYPE_IS_$(ART_DEFAULT_GC_TYPE)
ART_HOST_CFLAGS :=
ART_TARGET_CFLAGS :=
diff --git a/runtime/verifier/reg_type_cache.cc b/runtime/verifier/reg_type_cache.cc
index 1dfbe51..c248565 100644
--- a/runtime/verifier/reg_type_cache.cc
+++ b/runtime/verifier/reg_type_cache.cc
@@ -580,8 +580,9 @@
}
void RegTypeCache::VisitRoots(RootCallback* callback, void* arg) {
- for (const RegType* entry : entries_) {
- entry->VisitRoots(callback, arg);
+ // Exclude the static roots that are visited by VisitStaticRoots().
+ for (size_t i = primitive_count_; i < entries_.size(); ++i) {
+ entries_[i]->VisitRoots(callback, arg);
}
}