protected boolean propagateIntervals(int start,long L,long R,int target){
  if (!dfsScanSubgraph(start,target))   return false;
  int rep_start=rep_cg[start];
  int rep_target=rep_cg[target];
  ContextsCollector targetContexts=contextsForMethods[target];
  if (rep_start == rep_target) {
    transferInSCC(start,target,L,R,targetContexts);
  }
 else {
    transferInSCC(start,rep_start,L,R,contextsForMethods[rep_start]);
    topQ.clear();
    topQ.add(rep_start);
    while (!topQ.isEmpty()) {
      int s=topQ.poll();
      ContextsCollector sContexts=contextsForMethods[s];
      CgEdge p=call_graph[s];
      while (p != null) {
        int t=p.t;
        int rep_t=rep_cg[t];
        if (in_degree[rep_t] != 0) {
          ContextsCollector reptContexts=contextsForMethods[rep_t];
          long block_size=max_context_size_block[s];
          for (          SimpleInterval si : sContexts.bars) {
            long in_block_offset=(si.L - 1) % block_size;
            long newL=p.map_offset + in_block_offset;
            long newR=si.R - si.L + newL;
            if (rep_t == rep_target) {
              transferInSCC(t,target,newL,newR,targetContexts);
            }
 else {
              transferInSCC(t,rep_t,newL,newR,reptContexts);
            }
          }
          if (--in_degree[rep_t] == 0 && rep_t != rep_target) {
            topQ.add(rep_t);
          }
        }
        p=p.next;
      }
      sContexts.clear();
    }
  }
  return true;
}

protected boolean propagateIntervals ( int start , long L , long R , int target ) { if ( ! dfsScanSubgraph ( start , target ) ) return false ; int rep_start = rep_cg [ start ] ; int rep_target = rep_cg [ target ] ; ContextsCollector targetContexts = contextsForMethods [ target ] ; if ( rep_start == rep_target ) { transferInSCC ( start , target , L , R , targetContexts ) ; } else { transferInSCC ( start , rep_start , L , R , contextsForMethods [ rep_start ] ) ; topQ . clear ( ) ; topQ . add ( rep_start ) ; while ( ! topQ . isEmpty ( ) ) { int s = topQ . poll ( ) ; ContextsCollector sContexts = contextsForMethods [ s ] ; CgEdge p = call_graph [ s ] ; while ( p != null ) { int t = p . t ; int rep_t = rep_cg [ t ] ; if ( in_degree [ rep_t ] != 0 ) { ContextsCollector reptContexts = contextsForMethods [ rep_t ] ; long block_size = max_context_size_block [ s ] ; for ( SimpleInterval si : sContexts . bars ) { long in_block_offset = ( si . L - 1 ) % block_size ; long newL = p . map_offset + in_block_offset ; long newR = si . R - si . L + newL ; if ( rep_t == rep_target ) { transferInSCC ( t , target , newL , newR , targetContexts ) ; } else { transferInSCC ( t , rep_t , newL , newR , reptContexts ) ; } } if ( -- in_degree [ rep_t ] == 0 && rep_t != rep_target ) { topQ . add ( rep_t ) ; } } p = p . next ; } sContexts . clear ( ) ; } } return true ; }
compute the mapping from interval [ l , r ) of method start to the intervals of method target . return true if the mapping is feasible .
