///<summary> /// Determines the signature of the procedures, /// the locations and types of all the values in the program. ///</summary> public virtual void AnalyzeDataFlow() { if (project is null) { return; } var eventListener = services.RequireService <DecompilerEventListener>(); foreach (var program in project.Programs) { if (eventListener.IsCanceled()) { return; } var ir = new DynamicLinker(project, program, eventListener); var dfa = new DataFlowAnalysis(program, ir, services); dfa.ClearTestFiles(); if (program.NeedsSsaTransform) { eventListener.ShowStatus("Performing interprocedural analysis."); dfa.UntangleProcedures(); } eventListener.ShowStatus("Building complex expressions."); dfa.BuildExpressionTrees(); host.WriteIntermediateCode(program, (name, procs, writer) => { EmitProgram(program, procs, dfa, name, writer); }); } eventListener.ShowStatus("Interprocedural analysis complete."); }
///<summary> /// Determines the signature of the procedures, /// the locations and types of all the values in the program. ///</summary> public virtual void AnalyzeDataFlow() { var eventListener = services.RequireService <DecompilerEventListener>(); foreach (var program in project.Programs) { eventListener.ShowStatus("Performing interprocedural analysis."); var ir = new ImportResolver(project, program, eventListener); var dfa = new DataFlowAnalysis(program, ir, eventListener); if (program.NeedsSsaTransform) { dfa.UntangleProcedures(); } dfa.BuildExpressionTrees(); host.WriteIntermediateCode(program, (name, writer) => { EmitProgram(program, dfa, name, writer); }); } eventListener.ShowStatus("Interprocedural analysis complete."); }