From a7323974309c3b81cfe342db635d0bf30f36ff62 Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Fri, 6 May 2011 17:02:43 -0700 Subject: Establish a subclass relationships among the field types. Change-Id: Id349b359489bb6b1bbb4ab78d29d85c0e6b33799 --- vm/compiler/codegen/arm/CodegenDriver.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vm/compiler/codegen/arm/CodegenDriver.cpp') diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp index 1a8ac4203..908e5bd70 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.cpp +++ b/vm/compiler/codegen/arm/CodegenDriver.cpp @@ -1630,7 +1630,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) case OP_SGET_BYTE_JUMBO: case OP_SGET_SHORT: case OP_SGET_SHORT_JUMBO: { - int valOffset = offsetof(StaticField, value); + int valOffset = OFFSETOF_MEMBER(StaticField, value); int tReg = dvmCompilerAllocTemp(cUnit); bool isVolatile; const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? @@ -1679,7 +1679,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) } case OP_SGET_WIDE: case OP_SGET_WIDE_JUMBO: { - int valOffset = offsetof(StaticField, value); + int valOffset = OFFSETOF_MEMBER(StaticField, value); const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? mir->meta.calleeMethod : cUnit->method; void *fieldPtr = (void*) @@ -1719,7 +1719,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) case OP_SPUT_BYTE_JUMBO: case OP_SPUT_SHORT: case OP_SPUT_SHORT_JUMBO: { - int valOffset = offsetof(StaticField, value); + int valOffset = OFFSETOF_MEMBER(StaticField, value); int tReg = dvmCompilerAllocTemp(cUnit); int objHead; bool isVolatile; @@ -1756,7 +1756,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) loadConstant(cUnit, tReg, (int) fieldPtr); if (isSputObject) { objHead = dvmCompilerAllocTemp(cUnit); - loadWordDisp(cUnit, tReg, offsetof(Field, clazz), objHead); + loadWordDisp(cUnit, tReg, OFFSETOF_MEMBER(Field, clazz), objHead); } HEAP_ACCESS_SHADOW(true); storeWordDisp(cUnit, tReg, valOffset ,rlSrc.lowReg); @@ -1776,7 +1776,7 @@ static bool handleFmt21c_Fmt31c_Fmt41c(CompilationUnit *cUnit, MIR *mir) case OP_SPUT_WIDE: case OP_SPUT_WIDE_JUMBO: { int tReg = dvmCompilerAllocTemp(cUnit); - int valOffset = offsetof(StaticField, value); + int valOffset = OFFSETOF_MEMBER(StaticField, value); const Method *method = (mir->OptimizationFlags & MIR_CALLEE) ? mir->meta.calleeMethod : cUnit->method; void *fieldPtr = (void*) -- cgit v1.2.3 From 60fc806b679a3655c228b4093058c59941a49cfe Mon Sep 17 00:00:00 2001 From: Dan Bornstein Date: Thu, 26 May 2011 10:11:58 -0700 Subject: Further conservation of newlines. Friends don't let friends end LOG() strings with newlines. Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00 --- vm/compiler/codegen/arm/CodegenDriver.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vm/compiler/codegen/arm/CodegenDriver.cpp') diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp index b9429a99e..af2897f06 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.cpp +++ b/vm/compiler/codegen/arm/CodegenDriver.cpp @@ -1477,7 +1477,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) { Opcode dalvikOpcode = mir->dalvikInsn.opcode; if ((dalvikOpcode >= OP_UNUSED_3E) && (dalvikOpcode <= OP_UNUSED_43)) { - LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpcode); + LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); return true; } switch (dalvikOpcode) { @@ -1491,7 +1491,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) case OP_UNUSED_79: case OP_UNUSED_7A: case OP_DISPATCH_FF: - LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpcode); + LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); return true; case OP_NOP: break; @@ -2155,7 +2155,7 @@ static bool handleFmt21t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb, break; default: cond = (ArmConditionCode)0; - LOGE("Unexpected opcode (%d) for Fmt21t\n", dalvikOpcode); + LOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode); dvmCompilerAbort(cUnit); } genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]); @@ -2700,7 +2700,7 @@ static bool handleFmt22t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb, break; default: cond = (ArmConditionCode)0; - LOGE("Unexpected opcode (%d) for Fmt22t\n", dalvikOpcode); + LOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode); dvmCompilerAbort(cUnit); } genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]); @@ -4547,7 +4547,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) } } if (notHandled) { - LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled\n", + LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled", mir->offset, dalvikOpcode, dexGetOpcodeName(dalvikOpcode), dalvikFormat); -- cgit v1.2.3 From 291c84f60853d30e1c0d79dd08c5e5164f588e26 Mon Sep 17 00:00:00 2001 From: Dan Bornstein Date: Thu, 26 May 2011 10:46:25 -0700 Subject: Prefer printf format "%#x" over "0x%x". I exist to serve. Change-Id: I8e2880b20eefd466da8515d5b6b0c5cb75d56169 --- vm/compiler/codegen/arm/CodegenDriver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vm/compiler/codegen/arm/CodegenDriver.cpp') diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp index af2897f06..53dd8feff 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.cpp +++ b/vm/compiler/codegen/arm/CodegenDriver.cpp @@ -837,7 +837,7 @@ static bool genArithOpInt(CompilationUnit *cUnit, MIR *mir, op = kOpLsr; break; default: - LOGE("Invalid word arith op: 0x%x(%d)", + LOGE("Invalid word arith op: %#x(%d)", mir->dalvikInsn.opcode, mir->dalvikInsn.opcode); dvmCompilerAbort(cUnit); } @@ -1477,7 +1477,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) { Opcode dalvikOpcode = mir->dalvikInsn.opcode; if ((dalvikOpcode >= OP_UNUSED_3E) && (dalvikOpcode <= OP_UNUSED_43)) { - LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); + LOGE("Codegen: got unused opcode %#x",dalvikOpcode); return true; } switch (dalvikOpcode) { @@ -1491,7 +1491,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) case OP_UNUSED_79: case OP_UNUSED_7A: case OP_DISPATCH_FF: - LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); + LOGE("Codegen: got unused opcode %#x",dalvikOpcode); return true; case OP_NOP: break; @@ -4547,7 +4547,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) } } if (notHandled) { - LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled", + LOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled", mir->offset, dalvikOpcode, dexGetOpcodeName(dalvikOpcode), dalvikFormat); -- cgit v1.2.3