rta: log results of analysis in the log directory
authorJean Privat <jean@pryen.org>
Thu, 26 Feb 2015 13:45:27 +0000 (20:45 +0700)
committerJean Privat <jean@pryen.org>
Thu, 26 Feb 2015 13:45:27 +0000 (20:45 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

src/rapid_type_analysis.nit

index 2d9fee4..f5c1dc2 100644 (file)
@@ -36,6 +36,13 @@ redef class ModelBuilder
        do
                var analysis = new RapidTypeAnalysis(self, mainmodule)
                analysis.run_analysis
+
+               if toolcontext.opt_log.value then
+                       var basename = toolcontext.log_directory / mainmodule.name
+                       analysis.live_methods_to_tree.write_to_file(basename + ".rta_methods.txt")
+                       analysis.live_types_to_csv.write_to_file(basename + ".rta_types.csv")
+               end
+
                return analysis
        end
 end