From f344b250f6f062a1a1902bf69b23ebf9b565de0e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Sep 2016 15:01:51 -0700 Subject: 3395 --- html/062convert_ingredients_to_text.cc.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'html/062convert_ingredients_to_text.cc.html') diff --git a/html/062convert_ingredients_to_text.cc.html b/html/062convert_ingredients_to_text.cc.html index 34ef34f0..2228229c 100644 --- a/html/062convert_ingredients_to_text.cc.html +++ b/html/062convert_ingredients_to_text.cc.html @@ -38,7 +38,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color :(scenario rewrite_stashes_to_text) def main [ local-scope - n:number <- copy 34 + n:num <- copy 34 stash n ] +transform: {stash_2_0: ("address" "array" "character")} <- to-text-line {n: "number"} @@ -47,7 +47,7 @@ def main [ :(scenario rewrite_traces_to_text) def main [ local-scope - n:number <- copy 34 + n:num <- copy 34 trace 2, [app], n ] +transform: {trace_2_2: ("address" "array" "character")} <- to-text-line {n: "number"} @@ -59,7 +59,7 @@ def main [ :(scenario rewrite_stashes_of_arrays) def main [ local-scope - n:address:array:number <- new number:type, 3 + n:&:@:num <- new number:type, 3 stash *n ] +transform: {stash_2_0: ("address" "array" "character")} <- array-to-text-line {n: ("address" "array" "number")} @@ -68,14 +68,14 @@ def main [ :(scenario ignore_stashes_of_static_arrays) def main [ local-scope - n:array:number:3 <- create-array + n:@:num:3 <- create-array stash n ] +transform: stash {n: ("array" "number" "3")} :(scenario rewrite_stashes_of_recipe_header_products) container foo [ - x:number + x:num ] def bar -> x:foo [ local-scope @@ -107,7 +107,7 @@ Transform.push_back(// all these cases are getting hairy. how can we make this extensible? if (inst.name == "stash") { for (int j = 0; j < SIZE(inst.ingredients); ++j) { - if (is_literal_string(inst.ingredients.at(j))) continue; + if (is_literal_text(inst.ingredients.at(j))) continue; ostringstream ingredient_name; ingredient_name << "stash_" << i << '_' << j << ":address:array:character"; convert_ingredient_to_text(inst.ingredients.at(j), new_instructions, ingredient_name.str()); @@ -115,7 +115,7 @@ Transform.push_back(} else if (inst.name == "trace") { for (int j = /*skip*/2; j < SIZE(inst.ingredients); ++j) { - if (is_literal_string(inst.ingredients.at(j))) continue; + if (is_literal_text(inst.ingredients.at(j))) continue; ostringstream ingredient_name; ingredient_name << "trace_" << i << '_' << j << ":address:array:character"; convert_ingredient_to_text(inst.ingredients.at(j), new_instructions, ingredient_name.str()); @@ -127,7 +127,7 @@ Transform.push_back(// new variants that match: // append _:text, ___ // will never ever get used. - if (is_literal_string(inst.ingredients.at(0)) || is_mu_string(inst.ingredients.at(0))) { + if (is_literal_text(inst.ingredients.at(0)) || is_mu_text(inst.ingredients.at(0))) { for (int j = 0; j < SIZE(inst.ingredients); ++j) { ostringstream ingredient_name; ingredient_name << "append_" << i << '_' << j << ":address:array:character"; @@ -145,7 +145,7 @@ Transform.push_back(// replace r with converted text void convert_ingredient_to_text(reagent& r, vector<instruction>& out, const string& tmp_var) { if (!r.type) return; // error; will be handled elsewhere - if (is_mu_string(r)) return; + if (is_mu_text(r)) return; // don't try to extend static arrays if (is_static_array(r)) return; instruction def; @@ -182,11 +182,11 @@ Transform.push_back(:(scenario append_other_types_to_text) def main [ local-scope - n:number <- copy 11 + n:num <- copy 11 c:character <- copy 111/o a:text <- append [abc], 10, n, c expected:text <- new [abc1011o] - 10:boolean/raw <- equal a, expected + 10:bool/raw <- equal a, expected ] //: Make sure that the new system is strictly better than just the 'stash' @@ -195,8 +195,8 @@ def main [ :(scenario rewrite_stash_continues_to_fall_back_to_default_implementation) # type without a to-text implementation container foo [ - x:number - y:number + x:num + y:num ] def main [ local-scope -- cgit 1.4.1-2-gfad0