Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.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 |
---|---|
465 TypeArray fields = getFields(); | 465 TypeArray fields = getFields(); |
466 int length = (int) fields.getLength(); | 466 int length = (int) fields.getLength(); |
467 for (int index = 0; index < length; index += NEXT_OFFSET) { | 467 for (int index = 0; index < length; index += NEXT_OFFSET) { |
468 short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); | 468 short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); |
469 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); | 469 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); |
470 | |
471 FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex)); | 470 FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex)); |
472 AccessFlags access = new AccessFlags(accessFlags); | 471 AccessFlags access = new AccessFlags(accessFlags); |
473 if (access.isStatic()) { | 472 if (access.isStatic()) { |
474 visitField(visitor, type, index); | 473 visitField(visitor, type, index); |
475 } | 474 } |
788 private Field newField(int index) { | 787 private Field newField(int index) { |
789 TypeArray fields = getFields(); | 788 TypeArray fields = getFields(); |
790 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); | 789 short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); |
791 FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex)); | 790 FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex)); |
792 if (type.isOop()) { | 791 if (type.isOop()) { |
793 return new OopField(this, index); | 792 if (VM.getVM().isCompressedOopsEnabled()) { |
793 return new NarrowOopField(this, index); | |
794 } else { | |
795 return new OopField(this, index); | |
796 } | |
794 } | 797 } |
795 if (type.isByte()) { | 798 if (type.isByte()) { |
796 return new ByteField(this, index); | 799 return new ByteField(this, index); |
797 } | 800 } |
798 if (type.isChar()) { | 801 if (type.isChar()) { |