src/share/vm/oops/fieldInfo.hpp

Print this page
rev 4323 : 8010121: Simplify ShouldNotReachHere/Fatal/ShouldNotReachHere2/others?
Summary: Removed ShouldNotReachHere2(msg) and replaced it by fatal(msg)
Reviewed-by:
Contributed-by: niclas.adlertz@oracle.com

@@ -106,15 +106,15 @@
     switch(lo & FIELDINFO_TAG_MASK) {
       case FIELDINFO_TAG_OFFSET:
         return build_int_from_shorts(_shorts[low_packed_offset], _shorts[high_packed_offset]) >> FIELDINFO_TAG_SIZE;
 #ifndef PRODUCT
       case FIELDINFO_TAG_TYPE_PLAIN:
-        ShouldNotReachHere2("Asking offset for the plain type field");
+        fatal("Asking offset for the plain type field");
       case FIELDINFO_TAG_TYPE_CONTENDED:
-        ShouldNotReachHere2("Asking offset for the contended type field");
+        fatal("Asking offset for the contended type field");
       case FIELDINFO_TAG_BLANK:
-        ShouldNotReachHere2("Asking offset for the blank field");
+        fatal("Asking offset for the blank field");
 #endif
     }
     ShouldNotReachHere();
     return 0;
   }

@@ -126,13 +126,13 @@
         return false;
       case FIELDINFO_TAG_TYPE_CONTENDED:
         return true;
 #ifndef PRODUCT
       case FIELDINFO_TAG_OFFSET:
-        ShouldNotReachHere2("Asking contended flag for the field with offset");
+        fatal("Asking contended flag for the field with offset");
       case FIELDINFO_TAG_BLANK:
-        ShouldNotReachHere2("Asking contended flag for the blank field");
+        fatal("Asking contended flag for the blank field");
 #endif
     }
     ShouldNotReachHere();
     return false;
   }

@@ -144,13 +144,13 @@
         return 0;
       case FIELDINFO_TAG_TYPE_CONTENDED:
         return _shorts[high_packed_offset];
 #ifndef PRODUCT
       case FIELDINFO_TAG_OFFSET:
-        ShouldNotReachHere2("Asking the contended group for the field with offset");
+        fatal("Asking the contended group for the field with offset");
       case FIELDINFO_TAG_BLANK:
-        ShouldNotReachHere2("Asking the contended group for the blank field");
+        fatal("Asking the contended group for the blank field");
 #endif
     }
     ShouldNotReachHere();
     return 0;
  }

@@ -161,13 +161,13 @@
       case FIELDINFO_TAG_TYPE_PLAIN:
       case FIELDINFO_TAG_TYPE_CONTENDED:
         return (lo >> FIELDINFO_TAG_SIZE);
 #ifndef PRODUCT
       case FIELDINFO_TAG_OFFSET:
-        ShouldNotReachHere2("Asking the field type for field with offset");
+        fatal("Asking the field type for field with offset");
       case FIELDINFO_TAG_BLANK:
-        ShouldNotReachHere2("Asking the field type for the blank field");
+        fatal("Asking the field type for the blank field");
 #endif
     }
     ShouldNotReachHere();
     return 0;
   }

@@ -209,11 +209,11 @@
         return;
 #ifndef PRODUCT
       case FIELDINFO_TAG_TYPE_PLAIN:
       case FIELDINFO_TAG_TYPE_CONTENDED:
       case FIELDINFO_TAG_OFFSET:
-        ShouldNotReachHere2("Setting the field type with overwriting");
+        fatal("Setting the field type with overwriting");
 #endif
     }
     ShouldNotReachHere();
   }
 

@@ -224,15 +224,15 @@
         _shorts[low_packed_offset] |= FIELDINFO_TAG_TYPE_CONTENDED;
         _shorts[high_packed_offset] = val;
         return;
 #ifndef PRODUCT
       case FIELDINFO_TAG_TYPE_CONTENDED:
-        ShouldNotReachHere2("Overwriting contended group");
+        fatal("Overwriting contended group");
       case FIELDINFO_TAG_BLANK:
-        ShouldNotReachHere2("Setting contended group for the blank field");
+        fatal("Setting contended group for the blank field");
       case FIELDINFO_TAG_OFFSET:
-        ShouldNotReachHere2("Setting contended group for field with offset");
+        fatal("Setting contended group for field with offset");
 #endif
     }
     ShouldNotReachHere();
   }