--- a/hotspot/src/share/vm/adlc/output_h.cpp Mon Jul 23 13:04:59 2012 -0700
+++ b/hotspot/src/share/vm/adlc/output_h.cpp Tue Jul 24 10:51:00 2012 -0700
@@ -674,16 +674,19 @@
else if( inst.is_ideal_mem() ) {
// Print out the field name if available to improve readability
fprintf(fp, " if (ra->C->alias_type(adr_type())->field() != NULL) {\n");
- fprintf(fp, " st->print(\" ! Field \");\n");
- fprintf(fp, " if( ra->C->alias_type(adr_type())->is_volatile() )\n");
- fprintf(fp, " st->print(\" Volatile\");\n");
- fprintf(fp, " ra->C->alias_type(adr_type())->field()->holder()->name()->print_symbol_on(st);\n");
+ fprintf(fp, " ciField* f = ra->C->alias_type(adr_type())->field();\n");
+ fprintf(fp, " st->print(\" ! Field: \");\n");
+ fprintf(fp, " if (f->is_volatile())\n");
+ fprintf(fp, " st->print(\"volatile \");\n");
+ fprintf(fp, " f->holder()->name()->print_symbol_on(st);\n");
fprintf(fp, " st->print(\".\");\n");
- fprintf(fp, " ra->C->alias_type(adr_type())->field()->name()->print_symbol_on(st);\n");
+ fprintf(fp, " f->name()->print_symbol_on(st);\n");
+ fprintf(fp, " if (f->is_constant())\n");
+ fprintf(fp, " st->print(\" (constant)\");\n");
fprintf(fp, " } else\n");
// Make sure 'Volatile' gets printed out
- fprintf(fp, " if( ra->C->alias_type(adr_type())->is_volatile() )\n");
- fprintf(fp, " st->print(\" Volatile!\");\n");
+ fprintf(fp, " if (ra->C->alias_type(adr_type())->is_volatile())\n");
+ fprintf(fp, " st->print(\" volatile!\");\n");
}
// Complete the definition of the format function