From bfa3f5ba3930fb3919d94e97929a2b962d104e10 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 2 Jun 2017 00:44:32 -0700 Subject: 3900 --- html/027call_ingredient.cc.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'html/027call_ingredient.cc.html') diff --git a/html/027call_ingredient.cc.html b/html/027call_ingredient.cc.html index 9ab7933f..66862563 100644 --- a/html/027call_ingredient.cc.html +++ b/html/027call_ingredient.cc.html @@ -92,10 +92,10 @@ if ('onhashchange' in window) { 29 30 :(before "End Call Housekeeping") 31 for (int i = 0; i < SIZE(ingredients); ++i) { - 32 current_call().ingredient_atoms.push_back(ingredients.at(i)); + 32 current_call().ingredient_atoms.push_back(ingredients.at(i)); 33 reagent/*copy*/ ingredient = call_instruction.ingredients.at(i); 34 // End Compute Call Ingredient - 35 current_call().ingredients.push_back(ingredient); + 35 current_call().ingredients.push_back(ingredient); 36 // End Populate Call Ingredient 37 } 38 @@ -114,33 +114,33 @@ if ('onhashchange' in window) { 51 :(before "End Primitive Recipe Implementations") 52 case NEXT_INGREDIENT: { 53 assert(!Current_routine->calls.empty()); - 54 if (current_call().next_ingredient_to_process < SIZE(current_call().ingredient_atoms)) { - 55 ¦ reagent/*copy*/ product = current_instruction().products.at(0); + 54 if (current_call().next_ingredient_to_process < SIZE(current_call().ingredient_atoms)) { + 55 ¦ reagent/*copy*/ product = current_instruction().products.at(0); 56 ¦ // End Preprocess NEXT_INGREDIENT product - 57 ¦ if (current_recipe_name() == "main") { + 57 ¦ if (current_recipe_name() == "main") { 58 ¦ ¦ // no ingredient types since the call might be implicit; assume ingredients are always strings 59 ¦ ¦ // todo: how to test this? 60 ¦ ¦ if (!is_mu_text(product)) 61 ¦ ¦ ¦ raise << "main: wrong type for ingredient '" << product.original_string << "'\n" << end(); 62 ¦ } 63 ¦ else if (!types_coercible(product, - 64 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ current_call().ingredients.at(current_call().next_ingredient_to_process))) { - 65 ¦ ¦ raise << maybe(current_recipe_name()) << "wrong type for ingredient '" << product.original_string << "'\n" << end(); + 64 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ current_call().ingredients.at(current_call().next_ingredient_to_process))) { + 65 ¦ ¦ raise << maybe(current_recipe_name()) << "wrong type for ingredient '" << product.original_string << "'\n" << end(); 66 ¦ ¦ // End next-ingredient Type Mismatch Error 67 ¦ } 68 ¦ products.push_back( - 69 ¦ ¦ ¦ current_call().ingredient_atoms.at(current_call().next_ingredient_to_process)); + 69 ¦ ¦ ¦ current_call().ingredient_atoms.at(current_call().next_ingredient_to_process)); 70 ¦ assert(SIZE(products) == 1); products.resize(2); // push a new vector 71 ¦ products.at(1).push_back(1); 72 ¦ ++current_call().next_ingredient_to_process; 73 } 74 else { - 75 ¦ if (SIZE(current_instruction().products) < 2) - 76 ¦ ¦ raise << maybe(current_recipe_name()) << "no ingredient to save in '" << current_instruction().products.at(0).original_string << "'\n" << end(); - 77 ¦ if (current_instruction().products.empty()) break; + 75 ¦ if (SIZE(current_instruction().products) < 2) + 76 ¦ ¦ raise << maybe(current_recipe_name()) << "no ingredient to save in '" << current_instruction().products.at(0).original_string << "'\n" << end(); + 77 ¦ if (current_instruction().products.empty()) break; 78 ¦ products.resize(2); 79 ¦ // pad the first product with sufficient zeros to match its type - 80 ¦ products.at(0).resize(size_of(current_instruction().products.at(0))); + 80 ¦ products.at(0).resize(size_of(current_instruction().products.at(0))); 81 ¦ products.at(1).push_back(0); 82 } 83 break; @@ -181,7 +181,7 @@ if ('onhashchange' in window) { 118 } 119 :(before "End Primitive Recipe Implementations") 120 case REWIND_INGREDIENTS: { -121 current_call().next_ingredient_to_process = 0; +121 current_call().next_ingredient_to_process = 0; 122 break; 123 } 124 @@ -214,16 +214,16 @@ if ('onhashchange' in window) { 151 } 152 :(before "End Primitive Recipe Implementations") 153 case INGREDIENT: { -154 if (static_cast<int>(ingredients.at(0).at(0)) < SIZE(current_call().ingredient_atoms)) { -155 ¦ current_call().next_ingredient_to_process = ingredients.at(0).at(0); +154 if (static_cast<int>(ingredients.at(0).at(0)) < SIZE(current_call().ingredient_atoms)) { +155 ¦ current_call().next_ingredient_to_process = ingredients.at(0).at(0); 156 ¦ products.push_back( -157 ¦ ¦ ¦ current_call().ingredient_atoms.at(current_call().next_ingredient_to_process)); +157 ¦ ¦ ¦ current_call().ingredient_atoms.at(current_call().next_ingredient_to_process)); 158 ¦ assert(SIZE(products) == 1); products.resize(2); // push a new vector 159 ¦ products.at(1).push_back(1); 160 ¦ ++current_call().next_ingredient_to_process; 161 } 162 else { -163 ¦ if (SIZE(current_instruction().products) > 1) { +163 ¦ if (SIZE(current_instruction().products) > 1) { 164 ¦ ¦ products.resize(2); 165 ¦ ¦ products.at(0).push_back(0); // todo: will fail noisily if we try to read a compound value 166 ¦ ¦ products.at(1).push_back(0); -- cgit 1.4.1-2-gfad0