- //
- // FlowGraph calleeFlowGraph = getFlowGraph(mdCallee);
- //
- // NTuple<Descriptor> methodInvokeBaseDescTuple = mapMethodInvokeNodeToBaseTuple.get(min);
- // NTuple<Location> methodInvokeBaseLocTuple = null;
- // if (methodInvokeBaseDescTuple != null) {
- // methodInvokeBaseLocTuple = translateToLocTuple(mdCaller, methodInvokeBaseDescTuple);
- // }
-
- // ////////////////
- // ////////////////
-
- // If the location of an argument has a composite location
- // need to assign a proper composite location to the corresponding callee parameter
- // System.out.println("---translate arg composite location to callee param. min="
- // + min.printNode(0));
- // Map<Integer, NTuple<Descriptor>> mapIdxToArgTuple =
- // mapMethodInvokeNodeToArgIdxMap.get(min);
- // Set<Integer> idxSet = mapIdxToArgTuple.keySet();
- // for (Iterator iterator2 = idxSet.iterator(); iterator2.hasNext();) {
- // Integer idx = (Integer) iterator2.next();
- //
- // if (idx == 0 && !min.getMethod().isStatic()) {
- // continue;
- // }
- //
- // NTuple<Descriptor> argTuple = mapIdxToArgTuple.get(idx);
- // if (argTuple.size() > 0) {
- // // check if an arg tuple has been already assigned to a composite location
- // NTuple<Location> argLocTuple = translateToLocTuple(mdCaller, argTuple);
- // Location argLocalLoc = argLocTuple.get(0);
- //
- // // if (!isPrimitiveType(argTuple)) {
- // if (callerMapLocToCompLoc.containsKey(argLocalLoc)) {
- //
- // CompositeLocation argLocalCompositeLocation = callerMapLocToCompLoc.get(argLocalLoc);
- // CompositeLocation argCompLoc = argLocalCompositeLocation.clone();
- // for (int i = 1; i < argLocTuple.size(); i++) {
- // argCompLoc.addLocation(argLocTuple.get(i));
- // }
- //
- // FlowNode calleeParamFlowNode = calleeFlowGraph.getParamFlowNode(idx);
- //
- // System.out
- // .println("----- argLocTuple=" + argLocTuple + " argLocalLoc=+" + argLocalLoc);
- // System.out.println("-------need to translate argCompLoc=" + argCompLoc
- // + " with baseTuple=" + methodInvokeBaseLocTuple + " calleeParamLocTuple="
- // + calleeParamFlowNode);
- //
- // // CompositeLocation paramCompLoc = translateArgCompLocToParamCompLoc(min, argCompLoc);
- // // calleeParamFlowNode.setCompositeLocation(paramCompLoc);
- //
- // // if (baseLocTuple != null && callerCompLoc.getTuple().startsWith(baseLocTuple)) {
- // //
- // // FlowNode calleeParamFlowNode = calleeFlowGraph.getParamFlowNode(idx);
- // // NTuple<Descriptor> calleeParamDescTuple = calleeParamFlowNode.getDescTuple();
- // // NTuple<Location> calleeParamLocTuple
- // // =###translateCompositeLocationAssignmentToFlowGraph mdCaller=public static void
- // // huffcodetab.huffman_decoder(int htIdx, int x, BitReserve br)
- //
- // // translateToLocTuple(mdCallee, calleeParamDescTuple);
- // //
- // // System.out.println("---need to translate callerCompLoc=" + callerCompLoc
- // // + " with baseTuple=" + baseLocTuple + " calleeParamLocTuple="
- // // + calleeParamLocTuple);
- // //
- // // CompositeLocation newCalleeCompLoc =
- // // translateCompositeLocationToCallee(callerCompLoc, baseLocTuple, mdCallee);
- // //
- // // calleeGlobalGraph.addMapLocationToInferCompositeLocation(calleeParamLocTuple.get(0),
- // // newCalleeCompLoc);
- // //
- // // System.out.println("---callee loc=" + calleeParamLocTuple.get(0)
- // // + " newCalleeCompLoc=" + newCalleeCompLoc);
- // //
- // // // System.out.println("###need to assign composite location to=" +
- // // // calleeParamDescTuple
- // // // + " with baseTuple=" + baseLocTuple);
- // // }
- //
- // }
- // }
- // }