about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-25 22:25:12 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-26 09:03:13 -0700
commitb2e36ec82782b40c34bf181a82bd518b8943cb66 (patch)
tree44c18821c6378e3f0c23058d6096be6a9606b820
parent15152795cead7ed7d6673a0c2ac996ac9c346945 (diff)
downloadmu-b2e36ec82782b40c34bf181a82bd518b8943cb66.tar.gz
4418
Use 'dump' consistently to mean 'to screen' (stderr), and 'save' to mean
'to disk'.
-rw-r--r--003trace.cc4
-rw-r--r--020run.cc8
-rw-r--r--029tools.cc2
-rw-r--r--050scenario.cc2
4 files changed, 8 insertions, 8 deletions
diff --git a/003trace.cc b/003trace.cc
index 20a0b48e..57604ee0 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -117,7 +117,7 @@ struct trace_stream {
     return *curr_stream;
   }
 
-  void dump() {
+  void save() {
     ofstream fout("last_run");
     fout << readable_contents("");
     fout.close();
@@ -220,7 +220,7 @@ struct lease_tracer {
 lease_tracer::lease_tracer() { Trace_stream = new trace_stream; }
 lease_tracer::~lease_tracer() {
   if (!Trace_stream) return;  // in case tests close Trace_stream
-  if (Save_trace) Trace_stream->dump();
+  if (Save_trace) Trace_stream->save();
   delete Trace_stream, Trace_stream = NULL;
 }
 :(before "End Includes")
diff --git a/020run.cc b/020run.cc
index da43e5e7..7a4c7020 100644
--- a/020run.cc
+++ b/020run.cc
@@ -227,7 +227,7 @@ transform_all();
 //? DUMP("");
 //? exit(0);
 if (trace_contains_errors()) {
-  if (Start_tracing && Trace_stream) Trace_stream->dump();
+  if (Start_tracing && Trace_stream) Trace_stream->save();
   return 1;
 }
 save_snapshots();
@@ -245,7 +245,7 @@ if (!Run_tests && contains_key(Recipe_ordinal, "main") && contains_key(Recipe, g
   trace(2, "run") << "=== Starting to run" << end();
   assert(Num_calls_to_transform_all == 1);
   run_main(argc, argv);
-  if (Start_tracing && Trace_stream) Trace_stream->dump();
+  if (Start_tracing && Trace_stream) Trace_stream->save();
 }
 :(code)
 void run_main(int argc, char* argv[]) {
@@ -266,7 +266,7 @@ else if (is_equal(*arg, "--trace")) {
 void cleanup_main() {
   if (!Trace_stream) return;
   if (Save_trace)
-    Trace_stream->dump();
+    Trace_stream->save();
   delete Trace_stream;
   Trace_stream = NULL;
 }
@@ -422,7 +422,7 @@ void run(const string& form) {
   transform_all();
   if (tmp.empty()) return;
   if (trace_contains_errors()) {
-    if (Start_tracing && Trace_stream) Trace_stream->dump();
+    if (Start_tracing && Trace_stream) Trace_stream->save();
     return;
   }
   // if a test defines main, it probably wants to start there regardless of
diff --git a/029tools.cc b/029tools.cc
index 244b72b2..be3c04e2 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -179,7 +179,7 @@ case _SAVE_TRACE: {
 }
 :(before "End Primitive Recipe Implementations")
 case _SAVE_TRACE: {
-  if (Save_trace) Trace_stream->dump();
+  if (Save_trace) Trace_stream->save();
   break;
 }
 
diff --git a/050scenario.cc b/050scenario.cc
index e84a18e9..b4170f8c 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -229,7 +229,7 @@ void run_mu_scenario(const scenario& s) {
   if (!Hide_errors && trace_contains_errors() && !Scenario_testing_scenario)
     Passed = false;
   if (not_already_inside_test && Trace_stream) {
-    if (Save_trace) Trace_stream->dump();
+    if (Save_trace) Trace_stream->save();
     delete Trace_stream;
     Trace_stream = NULL;
   }