提交 1231ceec 编写于 作者: N never

7090654: nightly failures after 7086585

Reviewed-by: kvn
上级 446a6918
...@@ -513,10 +513,9 @@ public class InstanceKlass extends Klass { ...@@ -513,10 +513,9 @@ public class InstanceKlass extends Klass {
void iterateStaticFieldsInternal(OopVisitor visitor) { void iterateStaticFieldsInternal(OopVisitor visitor) {
TypeArray fields = getFields(); TypeArray fields = getFields();
int length = getJavaFieldsCount(); int length = getJavaFieldsCount();
for (int index = 0; index < length; index += FIELD_SLOTS) { for (int index = 0; index < length; index++) {
short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); short accessFlags = getFieldAccessFlags(index);
short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); FieldType type = new FieldType(getFieldSignature(index));
FieldType type = new FieldType(getConstants().getSymbolAt(signatureIndex));
AccessFlags access = new AccessFlags(accessFlags); AccessFlags access = new AccessFlags(accessFlags);
if (access.isStatic()) { if (access.isStatic()) {
visitField(visitor, type, index); visitField(visitor, type, index);
...@@ -545,11 +544,9 @@ public class InstanceKlass extends Klass { ...@@ -545,11 +544,9 @@ public class InstanceKlass extends Klass {
TypeArray fields = getFields(); TypeArray fields = getFields();
int length = getJavaFieldsCount(); int length = getJavaFieldsCount();
for (int index = 0; index < length; index += FIELD_SLOTS) { for (int index = 0; index < length; index++) {
short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET); short accessFlags = getFieldAccessFlags(index);
short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); FieldType type = new FieldType(getFieldSignature(index));
FieldType type = new FieldType(getConstants().getSymbolAt(signatureIndex));
AccessFlags access = new AccessFlags(accessFlags); AccessFlags access = new AccessFlags(accessFlags);
if (!access.isStatic()) { if (!access.isStatic()) {
visitField(visitor, type, index); visitField(visitor, type, index);
...@@ -562,11 +559,9 @@ public class InstanceKlass extends Klass { ...@@ -562,11 +559,9 @@ public class InstanceKlass extends Klass {
TypeArray fields = getFields(); TypeArray fields = getFields();
int length = (int) fields.getLength(); int length = (int) fields.getLength();
ConstantPool cp = getConstants(); ConstantPool cp = getConstants();
for (int i = 0; i < length; i += FIELD_SLOTS) { for (int i = 0; i < length; i++) {
int nameIndex = fields.getShortAt(i + NAME_INDEX_OFFSET); Symbol f_name = getFieldName(i);
int sigIndex = fields.getShortAt(i + SIGNATURE_INDEX_OFFSET); Symbol f_sig = getFieldSignature(i);
Symbol f_name = cp.getSymbolAt(nameIndex);
Symbol f_sig = cp.getSymbolAt(sigIndex);
if (name.equals(f_name) && sig.equals(f_sig)) { if (name.equals(f_name) && sig.equals(f_sig)) {
return newField(i); return newField(i);
} }
...@@ -641,8 +636,8 @@ public class InstanceKlass extends Klass { ...@@ -641,8 +636,8 @@ public class InstanceKlass extends Klass {
/** Get field by its index in the fields array. Only designed for /** Get field by its index in the fields array. Only designed for
use in a debugging system. */ use in a debugging system. */
public Field getFieldByIndex(int fieldArrayIndex) { public Field getFieldByIndex(int fieldIndex) {
return newField(fieldArrayIndex); return newField(fieldIndex);
} }
...@@ -657,7 +652,7 @@ public class InstanceKlass extends Klass { ...@@ -657,7 +652,7 @@ public class InstanceKlass extends Klass {
int length = getJavaFieldsCount(); int length = getJavaFieldsCount();
List immediateFields = new ArrayList(length); List immediateFields = new ArrayList(length);
for (int index = 0; index < length; index += FIELD_SLOTS) { for (int index = 0; index < length; index++) {
immediateFields.add(getFieldByIndex(index)); immediateFields.add(getFieldByIndex(index));
} }
...@@ -845,8 +840,7 @@ public class InstanceKlass extends Klass { ...@@ -845,8 +840,7 @@ public class InstanceKlass extends Klass {
// Creates new field from index in fields TypeArray // Creates new field from index in fields TypeArray
private Field newField(int index) { private Field newField(int index) {
TypeArray fields = getFields(); TypeArray fields = getFields();
short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET); FieldType type = new FieldType(getFieldSignature(index));
FieldType type = new FieldType(getConstants().getSymbolAt(signatureIndex));
if (type.isOop()) { if (type.isOop()) {
if (VM.getVM().isCompressedOopsEnabled()) { if (VM.getVM().isCompressedOopsEnabled()) {
return new NarrowOopField(this, index); return new NarrowOopField(this, index);
......
...@@ -310,7 +310,7 @@ public class VM { ...@@ -310,7 +310,7 @@ public class VM {
usingServerCompiler = false; usingServerCompiler = false;
} else { } else {
// Determine whether C2 is present // Determine whether C2 is present
if (type.getField("_interpreter_invocation_count", false, false) != null) { if (db.lookupType("Matcher", false) != null) {
usingServerCompiler = true; usingServerCompiler = true;
} else { } else {
usingClientCompiler = true; usingClientCompiler = true;
......
...@@ -58,7 +58,7 @@ void JvmtiClassFileReconstituter::write_field_infos() { ...@@ -58,7 +58,7 @@ void JvmtiClassFileReconstituter::write_field_infos() {
// Compute the real number of Java fields // Compute the real number of Java fields
int java_fields = ikh()->java_fields_count(); int java_fields = ikh()->java_fields_count();
write_u2(java_fields * FieldInfo::field_slots); write_u2(java_fields);
for (JavaFieldStream fs(ikh()); !fs.done(); fs.next()) { for (JavaFieldStream fs(ikh()); !fs.done(); fs.next()) {
AccessFlags access_flags = fs.access_flags(); AccessFlags access_flags = fs.access_flags();
int name_index = fs.name_index(); int name_index = fs.name_index();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册