Commit a18e6d13 authored by Ben Cheng's avatar Ben Cheng
Browse files

Initialize the vC field of inlined getters/setters.

To eliminate a benign Valgrind warning.

Change-Id: I5f0ae53b8c86fe476f0b7ddfb6589191aea464f6
parent ee155d4f
......@@ -46,6 +46,13 @@ static bool inlineGetter(CompilationUnit *cUnit,
MIR *newGetterMIR = (MIR *)dvmCompilerNew(sizeof(MIR), true);
DecodedInstruction getterInsn;
/*
* Not all getter instructions have vC but vC will be read by
* dvmCompilerGetDalvikDisassembly unconditionally.
* Initialize it here to get Valgrind happy.
*/
getterInsn.vC = 0;
dexDecodeInstruction(calleeMethod->insns, &getterInsn);
if (!dvmCompilerCanIncludeThisInstruction(calleeMethod, &getterInsn))
......@@ -137,6 +144,13 @@ static bool inlineSetter(CompilationUnit *cUnit,
MIR *newSetterMIR = (MIR *)dvmCompilerNew(sizeof(MIR), true);
DecodedInstruction setterInsn;
/*
* Not all setter instructions have vC but vC will be read by
* dvmCompilerGetDalvikDisassembly unconditionally.
* Initialize it here to get Valgrind happy.
*/
setterInsn.vC = 0;
dexDecodeInstruction(calleeMethod->insns, &setterInsn);
if (!dvmCompilerCanIncludeThisInstruction(calleeMethod, &setterInsn))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment