--- old/src/share/vm/adlc/dfa.cpp 2016-07-11 22:46:08.485510529 +0900 +++ new/src/share/vm/adlc/dfa.cpp 2016-07-11 22:46:08.349511005 +0900 @@ -371,7 +371,7 @@ // pairs generated by the ADLC front end to build the contents of the case // statements (a series of if statements). void ArchDesc::buildDFA(FILE* fp) { - int i; + uint i; // Remember operands that are the starting points for chain rules. // Prevent cycles by checking if we have already generated chain. Dict operands_chained_from(cmpstr, hashstr, Form::arena); @@ -424,7 +424,7 @@ if (_dfa_small) { // Now build the individual routines just like the switch entries in large version // Iterate over the table of MatchLists, start at first valid opcode of 1 - for (i = 1; i < _last_opcode; i++) { + for (i = 1; i < static_cast(Opcodes::_last_opcode); i++) { if (_mlistab[i] == NULL) continue; // Generate the routine header statement for this opcode fprintf(fp, "void State::_sub_Op_%s(const Node *n){\n", NodeClassNames[i]); @@ -435,17 +435,17 @@ } } fprintf(fp, "bool State::DFA"); - fprintf(fp, "(int opcode, const Node *n) {\n"); + fprintf(fp, "(Opcodes opcode, const Node *n) {\n"); fprintf(fp, " switch(opcode) {\n"); // Iterate over the table of MatchLists, start at first valid opcode of 1 - for (i = 1; i < _last_opcode; i++) { + for (i = 1; i < static_cast(Opcodes::_last_opcode); i++) { if (_mlistab[i] == NULL) continue; // Generate the case statement for this opcode if (_dfa_small) { - fprintf(fp, " case Op_%s: { _sub_Op_%s(n);\n", NodeClassNames[i], NodeClassNames[i]); + fprintf(fp, " case Opcodes::Op_%s: { _sub_Op_%s(n);\n", NodeClassNames[i], NodeClassNames[i]); } else { - fprintf(fp, " case Op_%s: {\n", NodeClassNames[i]); + fprintf(fp, " case Opcodes::Op_%s: {\n", NodeClassNames[i]); // Walk the list, compacting it gen_dfa_state_body(fp, minimize, status, operands_chained_from, i); } @@ -458,7 +458,7 @@ fprintf(fp, " \n"); fprintf(fp, " default:\n"); fprintf(fp, " tty->print(\"Default case invoked for: \\n\");\n"); - fprintf(fp, " tty->print(\" opcode = %cd, \\\"%cs\\\"\\n\", opcode, NodeClassNames[opcode]);\n", '%', '%'); + fprintf(fp, " tty->print(\" opcode = %cu, \\\"%cs\\\"\\n\", static_cast(opcode), NodeClassNames[static_cast(opcode)]);\n", '%', '%'); fprintf(fp, " return false;\n"); fprintf(fp, " }\n");