void addLineFunctionInfo(int offset,int firstLine,int lastLine,String funcName){
  int line;
  if (funcName == null || funcName.length() == 0) {
    funcName="<anonymous$" + (++m_anonymousFunctionCounter) + ">";
  }
 else {
    int colon=funcName.lastIndexOf(':');
    int slash=funcName.lastIndexOf('/');
    if (colon > -1 || slash > -1) {
      int greater=Math.max(colon,slash);
      funcName=funcName.substring(greater + 1);
    }
 else {
      int dot=funcName.lastIndexOf('.');
      if (dot > -1) {
        String pkg=funcName.substring(0,dot);
        funcName=funcName.substring(dot + 1);
        setPackageName(pkg);
      }
    }
  }
  m_line2Offset.ensureCapacity(firstLine + 1);
  while (firstLine >= m_line2Offset.size())   m_line2Offset.add(null);
  m_line2Offset.set(firstLine,new Integer(offset));
  m_line2Func.ensureCapacity(lastLine + 1);
  while (lastLine >= m_line2Func.size())   m_line2Func.add(null);
  for (line=firstLine; line <= lastLine; ++line) {
    Object funcs=m_line2Func.get(line);
    if (funcs == null) {
      m_line2Func.set(line,funcName);
    }
 else     if (funcs instanceof String) {
      String oldFunc=(String)funcs;
      m_line2Func.set(line,new String[]{oldFunc,funcName});
    }
 else     if (funcs instanceof String[]) {
      String[] oldFuncs=(String[])funcs;
      String[] newFuncs=new String[oldFuncs.length + 1];
      System.arraycopy(oldFuncs,0,newFuncs,0,oldFuncs.length);
      newFuncs[newFuncs.length - 1]=funcName;
      m_line2Func.set(line,newFuncs);
    }
  }
  if (m_func2FirstLine.get(funcName) == null) {
    m_func2FirstLine.put(funcName,new Integer(firstLine));
    m_func2LastLine.put(funcName,new Integer(lastLine));
  }
}

void addLineFunctionInfo ( int offset , int firstLine , int lastLine , String funcName ) { int line ; if ( funcName == null || funcName . length ( ) == 0 ) { funcName = "<anonymous$" + ( ++ m_anonymousFunctionCounter ) + ">" ; } else { int colon = funcName . lastIndexOf ( ':' ) ; int slash = funcName . lastIndexOf ( '/' ) ; if ( colon > - 1 || slash > - 1 ) { int greater = Math . max ( colon , slash ) ; funcName = funcName . substring ( greater + 1 ) ; } else { int dot = funcName . lastIndexOf ( '.' ) ; if ( dot > - 1 ) { String pkg = funcName . substring ( 0 , dot ) ; funcName = funcName . substring ( dot + 1 ) ; setPackageName ( pkg ) ; } } } m_line2Offset . ensureCapacity ( firstLine + 1 ) ; while ( firstLine >= m_line2Offset . size ( ) ) m_line2Offset . add ( null ) ; m_line2Offset . set ( firstLine , new Integer ( offset ) ) ; m_line2Func . ensureCapacity ( lastLine + 1 ) ; while ( lastLine >= m_line2Func . size ( ) ) m_line2Func . add ( null ) ; for ( line = firstLine ; line <= lastLine ; ++ line ) { Object funcs = m_line2Func . get ( line ) ; if ( funcs == null ) { m_line2Func . set ( line , funcName ) ; } else if ( funcs instanceof String ) { String oldFunc = ( String ) funcs ; m_line2Func . set ( line , new String [ ] { oldFunc , funcName } ) ; } else if ( funcs instanceof String [ ] ) { String [ ] oldFuncs = ( String [ ] ) funcs ; String [ ] newFuncs = new String [ oldFuncs . length + 1 ] ; System . arraycopy ( oldFuncs , 0 , newFuncs , 0 , oldFuncs . length ) ; newFuncs [ newFuncs . length - 1 ] = funcName ; m_line2Func . set ( line , newFuncs ) ; } } if ( m_func2FirstLine . get ( funcName ) == null ) { m_func2FirstLine . put ( funcName , new Integer ( firstLine ) ) ; m_func2LastLine . put ( funcName , new Integer ( lastLine ) ) ; } }
called by dswfinfo in order to add function name / line / offset mapping information to the module .
