hotspot/src/share/vm/utilities/globalDefinitions.cpp
changeset 202 dc13bf0e5d5d
parent 1 489c9b5090e2
child 360 21d113ecbf6a
--- a/hotspot/src/share/vm/utilities/globalDefinitions.cpp	Fri Feb 22 17:55:13 2008 -0800
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.cpp	Mon Feb 25 15:05:44 2008 -0800
@@ -214,7 +214,7 @@
 };
 
 
-int type2aelembytes[T_CONFLICT+1] = {
+int _type2aelembytes[T_CONFLICT+1] = {
   0,                      // 0
   0,                      // 1
   0,                      // 2
@@ -230,10 +230,16 @@
   T_OBJECT_aelem_bytes,   // T_OBJECT   = 12,
   T_ARRAY_aelem_bytes,    // T_ARRAY    = 13,
   0,                      // T_VOID     = 14,
-  T_INT_aelem_bytes,      // T_ADDRESS  = 15,
+  T_OBJECT_aelem_bytes,   // T_ADDRESS  = 15,
   0                       // T_CONFLICT = 16,
 };
 
+#ifdef ASSERT
+int type2aelembytes(BasicType t, bool allow_address) {
+  assert(allow_address || t != T_ADDRESS, " ");
+  return _type2aelembytes[t];
+}
+#endif
 
 // Support for 64-bit integer arithmetic