/// <summary> /// Extracts type information from the typeless rewritten programs. /// </summary> /// <param name="host"></param> /// <param name="ivs"></param> public void ReconstructTypes() { if (Project is null) { return; } foreach (var program in Project.Programs.Where(p => p.NeedsTypeReconstruction)) { var analyzer = new TypeAnalyzer(eventListener); try { analyzer.RewriteProgram(program); } catch (Exception ex) { eventListener.Error( new NullCodeLocation(program.Location.FilesystemPath), ex, "An internal error occurred while reconstructing data types in {0}.", program.Location); } finally { host.WriteTypes(program, analyzer.WriteTypes); } } }
/// <summary> /// Extracts type information from the typeless rewritten programs. /// </summary> /// <param name="host"></param> /// <param name="ivs"></param> public void ReconstructTypes() { foreach (var program in Project.Programs.Where(p => p.NeedsTypeReconstruction)) { var analyzer = new TypeAnalyzer(eventListener); try { analyzer.RewriteProgram(program); } catch (Exception ex) { eventListener.Error(new NullCodeLocation(""), ex, "Error when reconstructing types."); } finally { host.WriteTypes(program, analyzer.WriteTypes); } } }