Move opcode names into OpcodeInfo.
This also allowed me to remove the Instruction argument from the
CodeReader visitor methods. Per previous discussion, this also gets
rid of the redundant argument output in FindUsages. I can clean up
CodeReader some more in a follow-up.
Change-Id: I7a65e8d74498e201fd169cddde0d1f19d6f33f81
diff --git a/opcode-gen/opcode-gen.awk b/opcode-gen/opcode-gen.awk
index e269abf..2f1a830 100644
--- a/opcode-gen/opcode-gen.awk
+++ b/opcode-gen/opcode-gen.awk
@@ -96,10 +96,9 @@
printf(" public static final Dop %s =\n" \
" new Dop(Opcodes.%s, Opcodes.%s,\n" \
- " Opcodes.%s, Form%s.THE_ONE, %s,\n" \
- " \"%s\");\n\n",
+ " Opcodes.%s, Form%s.THE_ONE, %s);\n\n",
constName[i], constName[i], family[i], nextOp, format[i],
- hasResult[i], name[i]);
+ hasResult[i]);
}
}
@@ -119,9 +118,9 @@
}
printf(" public static final Info %s =\n" \
- " new Info(Opcodes.%s,\n" \
+ " new Info(Opcodes.%s, \"%s\",\n" \
" InstructionCodec.FORMAT_%s, %s);\n\n", \
- constName[i], constName[i], toupper(format[i]), itype);
+ constName[i], constName[i], name[i], toupper(format[i]), itype);
}
}