It's "opcode" not "opCode".
Similarly "Opcode" not "OpCode".
This appears to be the general worldwide consensus on the matter. Other
residents of my office didn't seem to mind one way or the other how it's
spelled in our code, but for whatever reason, it really bugged me.
Change-Id: Ia0b73d19c54aefc0f543a9c9451dda22ee876a59
diff --git a/vm/compiler/Frontend.c b/vm/compiler/Frontend.c
index 092412e..9015719 100644
--- a/vm/compiler/Frontend.c
+++ b/vm/compiler/Frontend.c
@@ -27,7 +27,7 @@
bool printMe)
{
u2 instr = *codePtr;
- OpCode opcode = dexOpCodeFromCodeUnit(instr);
+ Opcode opcode = dexOpcodeFromCodeUnit(instr);
int insnWidth;
// Don't parse instruction data
@@ -59,7 +59,7 @@
unsigned int *target, bool *isInvoke,
const Method **callee)
{
- switch (insn->dalvikInsn.opCode) {
+ switch (insn->dalvikInsn.opcode) {
/* Target is not compile-time constant */
case OP_RETURN_VOID:
case OP_RETURN:
@@ -157,7 +157,7 @@
static inline bool isGoto(MIR *insn)
{
- switch (insn->dalvikInsn.opCode) {
+ switch (insn->dalvikInsn.opcode) {
case OP_GOTO:
case OP_GOTO_16:
case OP_GOTO_32:
@@ -172,7 +172,7 @@
*/
static inline bool isUnconditionalBranch(MIR *insn)
{
- switch (insn->dalvikInsn.opCode) {
+ switch (insn->dalvikInsn.opcode) {
case OP_RETURN_VOID:
case OP_RETURN:
case OP_RETURN_WIDE:
@@ -205,19 +205,19 @@
static int analyzeInlineTarget(DecodedInstruction *dalvikInsn, int attributes,
int offset)
{
- int flags = dexGetInstrFlags(dalvikInsn->opCode);
- int dalvikOpCode = dalvikInsn->opCode;
+ int flags = dexGetInstrFlags(dalvikInsn->opcode);
+ int dalvikOpcode = dalvikInsn->opcode;
if (flags & kInstrInvoke) {
attributes &= ~METHOD_IS_LEAF;
}
if (!(flags & kInstrCanReturn)) {
- if (!(dvmCompilerDataFlowAttributes[dalvikOpCode] &
+ if (!(dvmCompilerDataFlowAttributes[dalvikOpcode] &
DF_IS_GETTER)) {
attributes &= ~METHOD_IS_GETTER;
}
- if (!(dvmCompilerDataFlowAttributes[dalvikOpCode] &
+ if (!(dvmCompilerDataFlowAttributes[dalvikOpcode] &
DF_IS_SETTER)) {
attributes &= ~METHOD_IS_SETTER;
}
@@ -229,7 +229,7 @@
* otherwise.
*/
if (flags & kInstrCanReturn) {
- if (dalvikOpCode == OP_RETURN_VOID) {
+ if (dalvikOpcode == OP_RETURN_VOID) {
attributes &= ~METHOD_IS_GETTER;
}
else {
@@ -241,7 +241,7 @@
attributes &= ~METHOD_IS_THROW_FREE;
}
- if (offset == 0 && dalvikOpCode == OP_RETURN_VOID) {
+ if (offset == 0 && dalvikOpcode == OP_RETURN_VOID) {
attributes |= METHOD_IS_EMPTY;
}
@@ -250,7 +250,7 @@
* If so, don't inline the callee as there is no stack frame for the
* interpreter to single-step through the instruction.
*/
- if (SINGLE_STEP_OP(dalvikOpCode)) {
+ if (SINGLE_STEP_OP(dalvikOpcode)) {
attributes &= ~(METHOD_IS_GETTER | METHOD_IS_SETTER);
}
@@ -569,7 +569,7 @@
dvmCompilerAppendMIR(curBB, insn);
cUnit.numInsts++;
- int flags = dexGetInstrFlags(insn->dalvikInsn.opCode);
+ int flags = dexGetInstrFlags(insn->dalvikInsn.opcode);
if (flags & kInstrInvoke) {
assert(numInsts == 1);
@@ -641,7 +641,7 @@
/* Link the taken and fallthrough blocks */
BasicBlock *searchBB;
- int flags = dexGetInstrFlags(lastInsn->dalvikInsn.opCode);
+ int flags = dexGetInstrFlags(lastInsn->dalvikInsn.opcode);
if (flags & kInstrInvoke) {
cUnit.hasInvoke = true;
@@ -737,8 +737,8 @@
cUnit.hasLoop = true;
}
- if (lastInsn->dalvikInsn.opCode == OP_PACKED_SWITCH ||
- lastInsn->dalvikInsn.opCode == OP_SPARSE_SWITCH) {
+ if (lastInsn->dalvikInsn.opcode == OP_PACKED_SWITCH ||
+ lastInsn->dalvikInsn.opcode == OP_SPARSE_SWITCH) {
int i;
const u2 *switchData = desc->method->insns + lastInsn->offset +
lastInsn->dalvikInsn.vB;
@@ -756,7 +756,7 @@
}
s4 *targets = (s4 *) (switchData + 2 +
- (lastInsn->dalvikInsn.opCode == OP_PACKED_SWITCH ?
+ (lastInsn->dalvikInsn.opcode == OP_PACKED_SWITCH ?
2 : size * 2));
/* One chaining cell for the first MAX_CHAINED_SWITCH_CASES cases */
@@ -965,7 +965,7 @@
bool dvmCompilerCanIncludeThisInstruction(const Method *method,
const DecodedInstruction *insn)
{
- switch (insn->opCode) {
+ switch (insn->opcode) {
case OP_NEW_INSTANCE:
case OP_CHECK_CAST: {
ClassObject *classPtr = (void*)
@@ -1201,7 +1201,7 @@
* aligned to 4-byte boundary (alignment instruction to be
* inserted later.
*/
- if (dexGetInstrFlags(curBB->lastMIRInsn->dalvikInsn.opCode)
+ if (dexGetInstrFlags(curBB->lastMIRInsn->dalvikInsn.opcode)
& kInstrInvoke) {
newBB->isFallThroughFromInvoke = true;
}