comparison src/share/vm/utilities/globalDefinitions.cpp @ 6848:8e47bac5643a

7054512: Compress class pointers after perm gen removal Summary: support of compress class pointers in the compilers. Reviewed-by: kvn, twisti
author roland
date Tue, 09 Oct 2012 10:11:38 +0200
parents 8a02ca5e5576
children cc32ccaaf47f
comparison
equal deleted inserted replaced
6847:65d07d9ee446 6848:8e47bac5643a
109 case T_INT: 109 case T_INT:
110 case T_FLOAT: 110 case T_FLOAT:
111 case T_DOUBLE: 111 case T_DOUBLE:
112 case T_LONG: 112 case T_LONG:
113 case T_OBJECT: 113 case T_OBJECT:
114 case T_ADDRESS: // random raw pointer 114 case T_ADDRESS: // random raw pointer
115 case T_METADATA: // metadata pointer 115 case T_METADATA: // metadata pointer
116 case T_NARROWOOP: // compressed pointer 116 case T_NARROWOOP: // compressed pointer
117 case T_CONFLICT: // might as well support a bottom type 117 case T_NARROWKLASS: // compressed klass pointer
118 case T_VOID: // padding or other unaddressed word 118 case T_CONFLICT: // might as well support a bottom type
119 case T_VOID: // padding or other unaddressed word
119 // layout type must map to itself 120 // layout type must map to itself
120 assert(vt == ft, ""); 121 assert(vt == ft, "");
121 break; 122 break;
122 default: 123 default:
123 // non-layout type must map to a (different) layout type 124 // non-layout type must map to a (different) layout type
177 _type2aelembytes[T_ARRAY] = heapOopSize; 178 _type2aelembytes[T_ARRAY] = heapOopSize;
178 } 179 }
179 180
180 181
181 // Map BasicType to signature character 182 // Map BasicType to signature character
182 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0}; 183 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0, 0};
183 184
184 // Map BasicType to Java type name 185 // Map BasicType to Java type name
185 const char* type2name_tab[T_CONFLICT+1] = { 186 const char* type2name_tab[T_CONFLICT+1] = {
186 NULL, NULL, NULL, NULL, 187 NULL, NULL, NULL, NULL,
187 "boolean", 188 "boolean",
196 "array", 197 "array",
197 "void", 198 "void",
198 "*address*", 199 "*address*",
199 "*narrowoop*", 200 "*narrowoop*",
200 "*metadata*", 201 "*metadata*",
202 "*narrowklass*",
201 "*conflict*" 203 "*conflict*"
202 }; 204 };
203 205
204 206
205 BasicType name2type(const char* name) { 207 BasicType name2type(const char* name) {
211 return T_ILLEGAL; 213 return T_ILLEGAL;
212 } 214 }
213 215
214 216
215 // Map BasicType to size in words 217 // Map BasicType to size in words
216 int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, -1}; 218 int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, -1};
217 219
218 BasicType type2field[T_CONFLICT+1] = { 220 BasicType type2field[T_CONFLICT+1] = {
219 (BasicType)0, // 0, 221 (BasicType)0, // 0,
220 (BasicType)0, // 1, 222 (BasicType)0, // 1,
221 (BasicType)0, // 2, 223 (BasicType)0, // 2,
232 T_OBJECT, // T_ARRAY = 13, 234 T_OBJECT, // T_ARRAY = 13,
233 T_VOID, // T_VOID = 14, 235 T_VOID, // T_VOID = 14,
234 T_ADDRESS, // T_ADDRESS = 15, 236 T_ADDRESS, // T_ADDRESS = 15,
235 T_NARROWOOP, // T_NARROWOOP= 16, 237 T_NARROWOOP, // T_NARROWOOP= 16,
236 T_METADATA, // T_METADATA = 17, 238 T_METADATA, // T_METADATA = 17,
237 T_CONFLICT // T_CONFLICT = 18, 239 T_NARROWKLASS, // T_NARROWKLASS = 18,
240 T_CONFLICT // T_CONFLICT = 19,
238 }; 241 };
239 242
240 243
241 BasicType type2wfield[T_CONFLICT+1] = { 244 BasicType type2wfield[T_CONFLICT+1] = {
242 (BasicType)0, // 0, 245 (BasicType)0, // 0,
255 T_OBJECT, // T_ARRAY = 13, 258 T_OBJECT, // T_ARRAY = 13,
256 T_VOID, // T_VOID = 14, 259 T_VOID, // T_VOID = 14,
257 T_ADDRESS, // T_ADDRESS = 15, 260 T_ADDRESS, // T_ADDRESS = 15,
258 T_NARROWOOP, // T_NARROWOOP = 16, 261 T_NARROWOOP, // T_NARROWOOP = 16,
259 T_METADATA, // T_METADATA = 17, 262 T_METADATA, // T_METADATA = 17,
260 T_CONFLICT // T_CONFLICT = 18, 263 T_NARROWKLASS, // T_NARROWKLASS = 18,
264 T_CONFLICT // T_CONFLICT = 19,
261 }; 265 };
262 266
263 267
264 int _type2aelembytes[T_CONFLICT+1] = { 268 int _type2aelembytes[T_CONFLICT+1] = {
265 0, // 0 269 0, // 0
266 0, // 1 270 0, // 1
267 0, // 2 271 0, // 2
268 0, // 3 272 0, // 3
269 T_BOOLEAN_aelem_bytes, // T_BOOLEAN = 4, 273 T_BOOLEAN_aelem_bytes, // T_BOOLEAN = 4,
270 T_CHAR_aelem_bytes, // T_CHAR = 5, 274 T_CHAR_aelem_bytes, // T_CHAR = 5,
271 T_FLOAT_aelem_bytes, // T_FLOAT = 6, 275 T_FLOAT_aelem_bytes, // T_FLOAT = 6,
272 T_DOUBLE_aelem_bytes, // T_DOUBLE = 7, 276 T_DOUBLE_aelem_bytes, // T_DOUBLE = 7,
273 T_BYTE_aelem_bytes, // T_BYTE = 8, 277 T_BYTE_aelem_bytes, // T_BYTE = 8,
274 T_SHORT_aelem_bytes, // T_SHORT = 9, 278 T_SHORT_aelem_bytes, // T_SHORT = 9,
275 T_INT_aelem_bytes, // T_INT = 10, 279 T_INT_aelem_bytes, // T_INT = 10,
276 T_LONG_aelem_bytes, // T_LONG = 11, 280 T_LONG_aelem_bytes, // T_LONG = 11,
277 T_OBJECT_aelem_bytes, // T_OBJECT = 12, 281 T_OBJECT_aelem_bytes, // T_OBJECT = 12,
278 T_ARRAY_aelem_bytes, // T_ARRAY = 13, 282 T_ARRAY_aelem_bytes, // T_ARRAY = 13,
279 0, // T_VOID = 14, 283 0, // T_VOID = 14,
280 T_OBJECT_aelem_bytes, // T_ADDRESS = 15, 284 T_OBJECT_aelem_bytes, // T_ADDRESS = 15,
281 T_NARROWOOP_aelem_bytes,// T_NARROWOOP= 16, 285 T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 16,
282 T_OBJECT_aelem_bytes, // T_METADATA = 17, 286 T_OBJECT_aelem_bytes, // T_METADATA = 17,
283 0 // T_CONFLICT = 18, 287 T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 18,
288 0 // T_CONFLICT = 19,
284 }; 289 };
285 290
286 #ifdef ASSERT 291 #ifdef ASSERT
287 int type2aelembytes(BasicType t, bool allow_address) { 292 int type2aelembytes(BasicType t, bool allow_address) {
288 assert(allow_address || t != T_ADDRESS, " "); 293 assert(allow_address || t != T_ADDRESS, " ");