initClass(method.getClassName());
private void invokeSpecial(VariableReader receiver, VariableReader instance, MethodReference method, List<? extends VariableReader> arguments) { CallLocation callLocation = new CallLocation(caller.getMethod(), currentLocation); dependencyChecker.linkClass(method.getClassName(), callLocation).initClass(callLocation); MethodDependency methodDep = dependencyChecker.linkMethod(method, callLocation); if (methodDep.isMissing()) { return; } methodDep.use(); DependencyNode[] targetParams = methodDep.getVariables(); for (int i = 0; i < arguments.size(); ++i) { DependencyNode value = nodes[arguments.get(i).getIndex()]; DependencyNode param = targetParams[i + 1]; if (value != null && param != null) { value.connect(param); } } if (instance != null) { nodes[instance.getIndex()].connect(targetParams[0]); } if (methodDep.getResult() != null && receiver != null) { DependencyNode receiverNode = nodes[receiver.getIndex()]; if (methodDep.getResult() != null && receiverNode != null) { methodDep.getResult().connect(receiverNode); } } methodDep.getThrown().addConsumer(currentExceptionConsumer); initClass(method.getClassName()); }
@Override public void getField(VariableReader receiver, VariableReader instance, FieldReference field, ValueType fieldType) { FieldDependency fieldDep = dependencyChecker.linkField(field, new CallLocation(caller.getMethod(), currentLocation)); if (!(fieldType instanceof ValueType.Primitive)) { DependencyNode receiverNode = nodes[receiver.getIndex()]; if (receiverNode != null) { fieldDep.getValue().connect(receiverNode); } } initClass(field.getClassName()); }
@Override public void putField(VariableReader instance, FieldReference field, VariableReader value, ValueType fieldType) { FieldDependency fieldDep = dependencyChecker.linkField(field, new CallLocation(caller.getMethod(), currentLocation)); if (!(fieldType instanceof ValueType.Primitive)) { DependencyNode valueNode = nodes[value.getIndex()]; if (valueNode != null) { valueNode.connect(fieldDep.getValue()); } } initClass(field.getClassName()); }