diff src/share/vm/memory/genRemSet.cpp @ 12350:ab68fc0101ce

8025855: Simplify GenRemSet code slightly Summary: Remove a few redundant switch-statements Reviewed-by: jcoomes, tschatzl
author jwilhelm
date Thu, 03 Oct 2013 13:19:19 +0200
parents da91efe96a93
children de6a9e811145
line wrap: on
line diff
--- a/src/share/vm/memory/genRemSet.cpp	Wed Oct 02 18:24:58 2013 +0200
+++ b/src/share/vm/memory/genRemSet.cpp	Thu Oct 03 13:19:19 2013 +0200
@@ -32,13 +32,8 @@
 // enumeration.)
 
 uintx GenRemSet::max_alignment_constraint(Name nm) {
-  switch (nm) {
-  case GenRemSet::CardTable:
-    return CardTableRS::ct_max_alignment_constraint();
-  default:
-    guarantee(false, "Unrecognized GenRemSet type.");
-    return (0); // Make Windows compiler happy
-  }
+  assert(nm == GenRemSet::CardTable, "Unrecognized GenRemSet type.");
+  return CardTableRS::ct_max_alignment_constraint();
 }
 
 class HasAccumulatedModifiedOopsClosure : public KlassClosure {