in src/main/java/com/intellij/rt/debugger/agent/CaptureAgent.java [506:525]
public void loadKey(MethodVisitor mv,
boolean isStatic,
Type[] argumentTypes,
String methodDisplayName,
CaptureInstrumentor instrumentor) {
int index = isStatic ? 0 : 1;
if (myIdx >= argumentTypes.length) {
throw new IllegalStateException(
"Argument with id " + myIdx + " is not available, method " + methodDisplayName + " has only " + argumentTypes.length);
}
int sort = argumentTypes[myIdx].getSort();
if (sort != Type.OBJECT && sort != Type.ARRAY) {
throw new IllegalStateException(
"Argument with id " + myIdx + " in method " + methodDisplayName + " must be an object");
}
for (int i = 0; i < myIdx; i++) {
index += argumentTypes[i].getSize();
}
mv.visitVarInsn(Opcodes.ALOAD, index);
}