1.1 --- a/src/share/vm/adlc/output_h.cpp Wed Sep 18 14:34:56 2013 -0700 1.2 +++ b/src/share/vm/adlc/output_h.cpp Thu Sep 19 17:31:42 2013 +0200 1.3 @@ -1539,7 +1539,20 @@ 1.4 if ( instr->is_ideal_jump() ) { 1.5 fprintf(fp, " GrowableArray<Label*> _index2label;\n"); 1.6 } 1.7 - fprintf(fp,"public:\n"); 1.8 + 1.9 + fprintf(fp, "public:\n"); 1.10 + 1.11 + Attribute *att = instr->_attribs; 1.12 + // Fields of the node specified in the ad file. 1.13 + while (att != NULL) { 1.14 + if (strncmp(att->_ident, "ins_field_", 10) == 0) { 1.15 + const char *field_name = att->_ident+10; 1.16 + const char *field_type = att->_val; 1.17 + fprintf(fp, " %s _%s;\n", field_type, field_name); 1.18 + } 1.19 + att = (Attribute *)att->_next; 1.20 + } 1.21 + 1.22 fprintf(fp," MachOper *opnd_array(uint operand_index) const {\n"); 1.23 fprintf(fp," assert(operand_index < _num_opnds, \"invalid _opnd_array index\");\n"); 1.24 fprintf(fp," return _opnd_array[operand_index];\n"); 1.25 @@ -1586,8 +1599,9 @@ 1.26 Attribute *attr = instr->_attribs; 1.27 bool avoid_back_to_back = false; 1.28 while (attr != NULL) { 1.29 - if (strcmp(attr->_ident,"ins_cost") && 1.30 - strcmp(attr->_ident,"ins_short_branch")) { 1.31 + if (strcmp (attr->_ident,"ins_cost") && 1.32 + strncmp(attr->_ident,"ins_field_", 10) != 0 && 1.33 + strcmp (attr->_ident,"ins_short_branch")) { 1.34 fprintf(fp," int %s() const { return %s; }\n", 1.35 attr->_ident, attr->_val); 1.36 }