From d5d908dda655c791329563522faad42d7e4ee618 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 12 Jul 2015 00:11:56 -0700 Subject: 1766 --- html/020run.cc.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'html/020run.cc.html') diff --git a/html/020run.cc.html b/html/020run.cc.html index 5d65fa9f..fc5fd15f 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -72,9 +72,9 @@ recipe main [ // Book-keeping while running a recipe. //: Later layers will change this. struct routine { - recipe_number running_recipe; + recipe_ordinal running_recipe; long long int running_step_index; - routine(recipe_number r) :running_recipe(r), running_step_index(0) {} + routine(recipe_ordinal r) :running_recipe(r), running_step_index(0) {} bool completed() const; }; @@ -82,7 +82,7 @@ struct routine { routine* Current_routine = NULL; :(code) -void run(recipe_number r) { +void run(recipe_ordinal r) { routine rr(r); Current_routine = &rr; run_current_routine(); @@ -112,6 +112,7 @@ void run_current_routine() switch (current_instruction().operation) { // Primitive Recipe Implementations case COPY: { +//? if (!ingredients.empty()) cerr << current_instruction().ingredients.at(0).to_string() << ' ' << ingredients.at(0).at(0) << '\n'; //? 1 copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); break; } @@ -167,7 +168,7 @@ if (!Run_tests) ; //? Trace_stream->dump_layer = "all"; //? 2 transform_all(); - recipe_number r = Recipe_number[string("main")]; + recipe_ordinal r = Recipe_ordinal[string("main")]; //? Trace_stream->dump_layer = "all"; //? 1 if (r) run(r); //? dump_memory(); //? 1 @@ -202,7 +203,7 @@ load_permanently("cor void run(string form) { //? cerr << "AAA 2\n"; //? 2 //? cerr << form << '\n'; //? 1 - vector<recipe_number> tmp = load(form); + vector<recipe_ordinal> tmp = load(form); if (tmp.empty()) return; transform_all(); //? cerr << "AAA 3\n"; //? 2 @@ -246,12 +247,13 @@ void write_memory(reagent x(const reagent& r) { return size_of(r.types); } -long long int size_of(const vector<type_number>& types) { +long long int size_of(const vector<type_ordinal>& types) { // End size_of(types) Cases return 1; } bool size_mismatch(const reagent& x, const vector<double>& data) { +//? if (size_of(x) != SIZE(data)) cerr << size_of(x) << " vs " << SIZE(data) << '\n'; //? 2 return size_of(x) != SIZE(data); } -- cgit 1.4.1-2-gfad0