comparison agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children d1605aabd0a1
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
271 field.getType()); 271 field.getType());
272 } 272 }
273 return (OopField) field; 273 return (OopField) field;
274 } 274 }
275 275
276 public NarrowOopField getNarrowOopField(String fieldName) throws WrongTypeException {
277 return (NarrowOopField) new BasicNarrowOopField(getOopField(fieldName));
278 }
279
276 public AddressField getAddressField(String fieldName) { 280 public AddressField getAddressField(String fieldName) {
277 // This type can not be inferred (for now), so provide a wrapper 281 // This type can not be inferred (for now), so provide a wrapper
278 Field field = getField(fieldName); 282 Field field = getField(fieldName);
279 if (field == null) { 283 if (field == null) {
280 return null; 284 return null;
285 /** This method should only be used by the builder of the 289 /** This method should only be used by the builder of the
286 TypeDataBase. Throws a RuntimeException if a field with this 290 TypeDataBase. Throws a RuntimeException if a field with this
287 name was already present in this class. */ 291 name was already present in this class. */
288 public void addField(Field field) { 292 public void addField(Field field) {
289 if (nameToFieldMap.get(field.getName()) != null) { 293 if (nameToFieldMap.get(field.getName()) != null) {
290 throw new RuntimeException("field of name \"" + field.getName() + "\" already present"); 294 throw new RuntimeException("field of name \"" + field.getName() + "\" already present in type " + this);
291 } 295 }
292 296
293 nameToFieldMap.put(field.getName(), field); 297 nameToFieldMap.put(field.getName(), field);
294 fieldList.add(field); 298 fieldList.add(field);
295 } 299 }