public int addGetArrayField(final TypeReference elementType, final int baseObject, final int indexValue) { int result = nextLocal++; statements.add(insts.ArrayLoadInstruction(statements.size(), result, baseObject, indexValue, elementType)); return result; }
public int addGetArrayField(final TypeReference elementType, final int baseObject, final int indexValue) { int result = nextLocal++; statements.add(insts.ArrayLoadInstruction(statements.size(), result, baseObject, indexValue, elementType)); return result; }
@Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) throws IllegalArgumentException { if (defs != null && defs.length == 0) { throw new IllegalArgumentException("defs.length == 0"); } if (uses != null && uses.length < 2) { throw new IllegalArgumentException("uses.length < 2"); } return insts.ArrayLoadInstruction(iindex, defs == null ? result : defs[0], uses == null ? getArrayRef() : uses[0], uses == null ? getIndex() : uses[1], getElementType()); }
@Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) throws IllegalArgumentException { if (defs != null && defs.length == 0) { throw new IllegalArgumentException("defs.length == 0"); } if (uses != null && uses.length < 2) { throw new IllegalArgumentException("uses.length < 2"); } return insts.ArrayLoadInstruction(iindex, defs == null ? result : defs[0], uses == null ? getArrayRef() : uses[0], uses == null ? getIndex() : uses[1], getElementType()); }
SSAArrayLoadInstruction S = insts.ArrayLoadInstruction(governingMethod.getNumberOfStatements(), defNum, refNumber, idxNumber, type); governingMethod.addStatement(S);
SSAArrayLoadInstruction S = insts.ArrayLoadInstruction(governingMethod.getNumberOfStatements(), defNum, refNumber, idxNumber, type); governingMethod.addStatement(S);
/** * @see com.ibm.wala.shrikeBT.IInstruction.Visitor#visitArrayLoad(IArrayLoadInstruction) */ @Override public void visitArrayGet(ArrayGet instruction) { int index = workingState.getLocal(instruction.offset); int arrayRef = workingState.getLocal(instruction.array); int dest = instruction.destination; // int index = workingState.pop(); // int arrayRef = workingState.pop(); int result = reuseOrCreateDef(); setLocal(dest, result); // workingState.push(result); TypeReference t = instruction.getType(); // if (instruction.isAddressOf()) { // emitInstruction(insts.AddressOfInstruction(result, arrayRef, index, t)); // } else { emitInstruction(insts.ArrayLoadInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); // } }
/** * @see com.ibm.wala.shrikeBT.IInstruction.Visitor#visitArrayLoad(IArrayLoadInstruction) */ @Override public void visitArrayGet(ArrayGet instruction) { int index = workingState.getLocal(instruction.offset); int arrayRef = workingState.getLocal(instruction.array); int dest = instruction.destination; // int index = workingState.pop(); // int arrayRef = workingState.pop(); int result = reuseOrCreateDef(); setLocal(dest, result); // workingState.push(result); TypeReference t = instruction.getType(); // if (instruction.isAddressOf()) { // emitInstruction(insts.AddressOfInstruction(result, arrayRef, index, t)); // } else { emitInstruction(insts.ArrayLoadInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); // } }
@Override public void doArrayRead(WalkContext context, int result, int arrayValue, CAstNode arrayRefNode, int[] dimValues) { TypeReference arrayTypeRef = (TypeReference) arrayRefNode.getChild(1).getValue(); context.cfg().addInstruction(insts.ArrayLoadInstruction(context.cfg().getCurrentInstruction(), result, arrayValue, dimValues[0], arrayTypeRef)); processExceptions(arrayRefNode, context); }
@Override public void doArrayRead(WalkContext context, int result, int arrayValue, CAstNode arrayRefNode, int[] dimValues) { TypeReference arrayTypeRef = (TypeReference) arrayRefNode.getChild(1).getValue(); context.cfg().addInstruction(insts.ArrayLoadInstruction(context.cfg().getCurrentInstruction(), result, arrayValue, dimValues[0], arrayTypeRef)); processExceptions(arrayRefNode, context); }
/** * @see com.ibm.wala.shrikeBT.IInstruction.Visitor#visitArrayLoad(IArrayLoadInstruction) */ @Override public void visitArrayLoad(IArrayLoadInstruction instruction) { int index = workingState.pop(); int arrayRef = workingState.pop(); int result = reuseOrCreateDef(); workingState.push(result); TypeReference t = ShrikeUtil.makeTypeReference(loader, instruction.getType()); if (instruction.isAddressOf()) { emitInstruction(insts.AddressOfInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); } else { emitInstruction(insts.ArrayLoadInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); } }
/** * @see com.ibm.wala.shrikeBT.IInstruction.Visitor#visitArrayLoad(IArrayLoadInstruction) */ @Override public void visitArrayLoad(IArrayLoadInstruction instruction) { int index = workingState.pop(); int arrayRef = workingState.pop(); int result = reuseOrCreateDef(); workingState.push(result); TypeReference t = ShrikeUtil.makeTypeReference(loader, instruction.getType()); if (instruction.isAddressOf()) { emitInstruction(insts.AddressOfInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); } else { emitInstruction(insts.ArrayLoadInstruction(getCurrentInstructionIndex(), result, arrayRef, index, t)); } }
constants.put(Integer.valueOf(indexConst), new ConstantValue(nextParameter++)); int temp = nextLocal++; m.addInstruction(null, insts.ArrayLoadInstruction(m.allInstructions.size(), temp, parametersVn, indexConst, TypeReference.JavaLangObject), false); pc++;
constants.put(Integer.valueOf(indexConst), new ConstantValue(nextParameter++)); int temp = nextLocal++; m.addInstruction(null, insts.ArrayLoadInstruction(m.allInstructions.size(), temp, parametersVn, indexConst, TypeReference.JavaLangObject), false); pc++;
for(int i = 0; i < nargs; i++) { code.addConstant(i+nargs+3, new ConstantValue(i)); code.addStatement(insts.ArrayLoadInstruction(code.getNextProgramCounter(), i+3, 1, i+nargs+3, TypeReference.JavaLangObject)); params[i] = i+3;
for(int i = 0; i < nargs; i++) { code.addConstant(i+nargs+3, new ConstantValue(i)); code.addStatement(insts.ArrayLoadInstruction(code.getNextProgramCounter(), i+3, 1, i+nargs+3, TypeReference.JavaLangObject)); params[i] = i+3;