From dcc060c7d4ef56b978beb34ddce8d8ffcec94fa6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Feb 2016 17:17:20 -0800 Subject: 2706 - update html --- html/020run.cc.html | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'html/020run.cc.html') diff --git a/html/020run.cc.html b/html/020run.cc.html index 9e3e13a3..b3545e30 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -97,10 +97,8 @@ void run_current_routine() while (!Current_routine->completed()) // later layers will modify condition { // Running One Instruction -//? trace(9999, "aaaa") << "location 1 contains " << get_or_insert(Memory, 1) << end(); -//? Instructions_running[current_recipe_name()]++; if (current_instruction().is_label) { ++current_step_index(); continue; } - trace(Initial_callstack_depth + Trace_stream->callstack_depth, "run") << current_instruction().to_string() << end(); + trace(Initial_callstack_depth + Trace_stream->callstack_depth, "run") << to_string(current_instruction()) << end(); if (get_or_insert(Memory, 0) != 0) { raise_error << "something wrote to location 0; this should never happen\n" << end(); put(Memory, 0, 0); @@ -108,11 +106,8 @@ void run_current_routine() // read all ingredients from memory, each potentially spanning multiple locations vector<vector<double> > ingredients; if (should_copy_ingredients()) { - for (long long int i = 0; i < SIZE(current_instruction().ingredients); ++i) { + for (long long int i = 0; i < SIZE(current_instruction().ingredients); ++i) ingredients.push_back(read_memory(current_instruction().ingredients.at(i))); -//? Locations_read[current_recipe_name()] += SIZE(ingredients.back()); -//? Locations_read_by_instruction[current_instruction().name] += SIZE(ingredients.back()); - } } // instructions below will write to 'products' vector<vector<double> > products; @@ -128,7 +123,7 @@ void run_current_routine() } } if (SIZE(products) < SIZE(current_instruction().products)) { - raise_error << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products! " << current_instruction().to_string() << '\n' << end(); + raise_error << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products! " << to_string(current_instruction()) << '\n' << end(); } else { for (long long int i = 0; i < SIZE(current_instruction().products); ++i) { @@ -175,6 +170,8 @@ inline bool routine::completed() const //? START_TRACING_UNTIL_END_OF_SCOPE; load_permanently("core.mu"); transform_all(); +//? DUMP(""); +//? exit(0); //: Step 2: load any .mu files provided at the commandline :(before "End Commandline Parsing") @@ -250,12 +247,10 @@ void load_permanently(string filenamereturn; } ifstream fin(filename.c_str()); - fin.peek(); if (!fin) { raise_error << "no such file " << filename << '\n' << end(); return; } - fin >> std::noskipws; trace(9990, "load") << "=== " << filename << end(); load(fin); fin.close(); @@ -275,8 +270,8 @@ void load_all_permanently(string dir(dir.c_str(), &files, NULL, alphasort); for (int i = 0; i < num_files; ++i) { string curr_file = files[i]->d_name; - if (!isdigit(curr_file.at(0))) continue; - load_permanently(dir+'/'+curr_file); + if (isdigit(curr_file.at(0))) + load_permanently(dir+'/'+curr_file); free(files[i]); files[i] = NULL; } @@ -307,7 +302,7 @@ vector<double> read_memory(reagent x(reagent x, vector<double> data) { if (!x.type) { - raise_error << "can't write to " << x.to_string() << "; no type\n" << end(); + raise_error << "can't write to " << to_string(x) << "; no type\n" << end(); return; } if (is_dummy(x)) return; @@ -315,7 +310,7 @@ void write_memory(reagent x.value; if (base == 0) return; if (size_mismatch(x, data)) { - raise_error << maybe(current_recipe_name()) << "size mismatch in storing to " << x.original_string << " (" << size_of(x.type) << " vs " << SIZE(data) << ") at '" << current_instruction().to_string() << "'\n" << end(); + raise_error << maybe(current_recipe_name()) << "size mismatch in storing to " << x.original_string << " (" << size_of(x.type) << " vs " << SIZE(data) << ") at '" << to_string(current_instruction()) << "'\n" << end(); return; } // End write_memory(reagent x, long long int base) Special-cases -- cgit 1.4.1-2-gfad0