// searches the library for unresolved symbols // the result is true if new symbols were added private bool searchLibrary(string currFileName) { if (AssemblerErrors.ErrorReports.Count > 0) { return(false); // don't bother searching if there were errors } bool result = false; using (ArmElfLibReader archive = new ArmElfLibReader(currFileName)) { IList <ArmFileInfo> newLibMembers = new List <ArmFileInfo>(); bool progress = true; while (progress) { progress = false; IList <string> defined = new List <string>(); // copy the list of externals so that we can modify it inside the loop string[] externs = new string[externSymbols.Keys.Count]; externSymbols.Keys.CopyTo(externs, 0); foreach (string sy in externs) { if (globalSymbols.ContainsKey(sy)) { defined.Add(sy); continue; } string fn; FileStream member = archive.GetLibraryFile(sy, out fn); if (member == null) { continue; } defined.Add(sy); ArmFileInfo fileInfo = new ObjFileInfo(member, currFileName, fn, globalSymbols, externSymbols); newLibMembers.Add(fileInfo); fileInfo.Pass = pass; fileInfo.StartPass(); // this call might change externSymbols progress = true; result = true; } foreach (string sy in defined) { externSymbols.Remove(sy); } } foreach (ArmFileInfo af in newLibMembers) { FileInfoTable.Add(af); fileList.Add(af.FileName); } } return(result); }
// perform pass 1 over all the input files public void PerformPass() { pass = 1; for (int i = 0; i < fileList.Count; i++) { processFile(i); } if (externSymbols.Count > 0) { revisitLibraries(); } passComplete[1] = true; //Debug.WriteLine(String.Format( // "{0} errors detected in pass 1", AssemblerErrors.ErrorReports.Count)); // We are finished with the libraries, remove them from the list for (int j = fileList.Count - 1; j >= 0; j--) { string fn = fileList[j]; if (fn != null) { string suffix = getSuffix(fn); if (suffix != ".a") { // we also remove included library files when errors were discovered; // this helps reduce the codeview tab list to a reasonable length if (suffix != ".o)" || AssemblerErrors.ErrorReports.Count == 0) { continue; } } } fileList.RemoveAt(j); FileInfoTable.RemoveAt(j); } }
public VirtualDiskDownloadService(ClientEngine torrentClientEngine, FileInfoTable<TorrentManager> torrentManagerTable) { _clientEngine = torrentClientEngine; _torrentManagerTable = torrentManagerTable; }
public DistributedDiskManager(DiskManager diskManager, FileInfoTable<TorrentManager> tmTable) { _diskManager = diskManager; _torrentManagerTable = tmTable; }