From c0f84b1ffa18eaf6f399aafe462f2a0f705dd009 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 7 Dec 2017 16:22:23 -0800 Subject: 4155 --- html/028call_return.cc.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'html/028call_return.cc.html') diff --git a/html/028call_return.cc.html b/html/028call_return.cc.html index 493c5e24..f69f1c47 100644 --- a/html/028call_return.cc.html +++ b/html/028call_return.cc.html @@ -101,7 +101,7 @@ if ('onhashchange' in window) { 38 case RETURN: { 39 // Begin Return 40 if (Trace_stream) { - 41 ¦ trace("trace") << current_instruction().name << ": decrementing callstack depth from " << Trace_stream->callstack_depth << end(); + 41 ¦ trace("trace") << current_instruction().name << ": decrementing callstack depth from " << Trace_stream->callstack_depth << end(); 42 ¦ --Trace_stream->callstack_depth; 43 ¦ if (Trace_stream->callstack_depth < 0) { 44 ¦ ¦ Current_routine->calls.clear(); @@ -112,9 +112,9 @@ if ('onhashchange' in window) { 49 // just in case 'main' returns a value, drop it for now 50 if (Current_routine->calls.empty()) goto stop_running_current_routine; 51 for (int i = 0; i < SIZE(ingredients); ++i) - 52 ¦ trace(9998, "run") << "result " << i << " is " << to_string(ingredients.at(i)) << end(); + 52 ¦ trace(9998, "run") << "result " << i << " is " << to_string(ingredients.at(i)) << end(); 53 // make return products available to caller - 54 copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); + 54 copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); 55 // End Return 56 break; // continue to process rest of *caller* instruction 57 } @@ -126,7 +126,7 @@ if ('onhashchange' in window) { 63 :(code) 64 void check_types_of_return_instructions(const recipe_ordinal r) { 65 const recipe& caller = get(Recipe, r); - 66 trace(9991, "transform") << "--- check types of return instructions in recipe " << caller.name << end(); + 66 trace(9991, "transform") << "--- check types of return instructions in recipe " << caller.name << end(); 67 for (int i = 0; i < SIZE(caller.steps); ++i) { 68 ¦ const instruction& caller_instruction = caller.steps.at(i); 69 ¦ if (caller_instruction.is_label) continue; @@ -138,7 +138,7 @@ if ('onhashchange' in window) { 75 ¦ ¦ if (return_inst.operation != RETURN) continue; 76 ¦ ¦ // check types with the caller 77 ¦ ¦ if (SIZE(caller_instruction.products) > SIZE(return_inst.ingredients)) { - 78 ¦ ¦ ¦ raise << maybe(caller.name) << "too few values returned from " << callee.name << '\n' << end(); + 78 ¦ ¦ ¦ raise << maybe(caller.name) << "too few values returned from " << callee.name << '\n' << end(); 79 ¦ ¦ ¦ break; 80 ¦ ¦ } 81 ¦ ¦ for (int i = 0; i < SIZE(caller_instruction.products); ++i) { @@ -146,8 +146,8 @@ if ('onhashchange' in window) { 83 ¦ ¦ ¦ reagent/*copy*/ rhs = caller_instruction.products.at(i); 84 ¦ ¦ ¦ // End Check RETURN Copy(lhs, rhs) 85 ¦ ¦ ¦ if (!types_coercible(rhs, lhs)) { - 86 ¦ ¦ ¦ ¦ raise << maybe(callee.name) << return_inst.name << " ingredient '" << lhs.original_string << "' can't be saved in '" << rhs.original_string << "'\n" << end(); - 87 ¦ ¦ ¦ ¦ raise << " ['" << to_string(lhs.type) << "' vs '" << to_string(rhs.type) << "']\n" << end(); + 86 ¦ ¦ ¦ ¦ raise << maybe(callee.name) << return_inst.name << " ingredient '" << lhs.original_string << "' can't be saved in '" << rhs.original_string << "'\n" << end(); + 87 ¦ ¦ ¦ ¦ raise << " ['" << to_string(lhs.type) << "' vs '" << to_string(rhs.type) << "']\n" << end(); 88 ¦ ¦ ¦ ¦ goto finish_return_check; 89 ¦ ¦ ¦ } 90 ¦ ¦ } @@ -157,16 +157,16 @@ if ('onhashchange' in window) { 94 ¦ ¦ ¦ if (has_property(return_inst.ingredients.at(i), "same-as-ingredient")) { 95 ¦ ¦ ¦ ¦ string_tree* tmp = property(return_inst.ingredients.at(i), "same-as-ingredient"); 96 ¦ ¦ ¦ ¦ if (!tmp || !tmp->atom) { - 97 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << to_original_string(return_inst) << "'\n" << end(); + 97 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << to_original_string(return_inst) << "'\n" << end(); 98 ¦ ¦ ¦ ¦ ¦ goto finish_return_check; 99 ¦ ¦ ¦ ¦ } 100 ¦ ¦ ¦ ¦ int ingredient_index = to_integer(tmp->value); 101 ¦ ¦ ¦ ¦ if (ingredient_index >= SIZE(caller_instruction.ingredients)) { -102 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(caller_instruction) << "'\n" << end(); +102 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(caller_instruction) << "'\n" << end(); 103 ¦ ¦ ¦ ¦ ¦ goto finish_return_check; 104 ¦ ¦ ¦ ¦ } 105 ¦ ¦ ¦ ¦ if (!is_dummy(caller_instruction.products.at(i)) && !is_literal(caller_instruction.ingredients.at(ingredient_index)) && caller_instruction.products.at(i).name != caller_instruction.ingredients.at(ingredient_index).name) { -106 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "'" << to_original_string(caller_instruction) << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end(); +106 ¦ ¦ ¦ ¦ ¦ raise << maybe(caller.name) << "'" << to_original_string(caller_instruction) << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end(); 107 ¦ ¦ ¦ ¦ } 108 ¦ ¦ ¦ } 109 ¦ ¦ } -- cgit 1.4.1-2-gfad0