From c5ffb6e1cc9c5ff880d037c53b8ebc8562be0008 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 25 May 2015 22:27:19 -0700 Subject: 1459 --- html/037call_reply.cc.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'html/037call_reply.cc.html') diff --git a/html/037call_reply.cc.html b/html/037call_reply.cc.html index d175190f..d9e0e834 100644 --- a/html/037call_reply.cc.html +++ b/html/037call_reply.cc.html @@ -2,7 +2,7 @@ -~/Desktop/s/mu/037call_reply.cc +037call_reply.cc @@ -42,7 +42,6 @@ recipe f [ 13:number <- add 1:literal, 12:number reply 12:number, 13:number ] -+run: instruction main/0 +mem: storing 34 in location 1 +mem: storing 35 in location 2 @@ -53,6 +52,7 @@ Recipe_number["reply"] = REPLY:(before "End Primitive Recipe Implementations") case REPLY: { const instruction& reply_inst = current_instruction(); // save pointer into recipe before pop + --Callstack_depth; Current_routine->calls.pop_front(); // just in case 'main' returns a value, drop it for now if (Current_routine->calls.empty()) goto stop_running_current_routine; @@ -61,12 +61,12 @@ case REPLY: { copy(ingredients.begin(), ingredients.end(), inserter(products, products.begin())); // check that any reply ingredients with /same-as-ingredient connect up // the corresponding ingredient and product in the caller. - for (index_t i = 0; i < caller_instruction.products.size(); ++i) { - trace("run") << "result " << i << " is " << to_string(ingredients.at(i)); + for (long long int i = 0; i < SIZE(caller_instruction.products); ++i) { + trace(Primitive_recipe_depth, "run") << "result " << i << " is " << to_string(ingredients.at(i)); if (has_property(reply_inst.ingredients.at(i), "same-as-ingredient")) { vector<string> tmp = property(reply_inst.ingredients.at(i), "same-as-ingredient"); - assert(tmp.size() == 1); - long long int ingredient_index = to_number(tmp.at(0)); + assert(SIZE(tmp) == 1); + long long int ingredient_index = to_integer(tmp.at(0)); if (caller_instruction.products.at(i).value != caller_instruction.ingredients.at(ingredient_index).value) raise << "'same-as-ingredient' result " << caller_instruction.products.at(i).value << " must be location " << caller_instruction.ingredients.at(ingredient_index).value << '\n'; } @@ -86,7 +86,6 @@ recipe f [ 13:number <- copy 35:literal reply 12:point ] -+run: instruction main/0 +run: result 0 is [2, 35] +mem: storing 2 in location 3 +mem: storing 35 in location 4 @@ -112,12 +111,12 @@ recipe test1 [ string to_string(const vector<double>& in) { if (in.empty()) return "[]"; ostringstream out; - if (in.size() == 1) { + if (SIZE(in) == 1) { out << in.at(0); return out.str(); } out << "["; - for (index_t i = 0; i < in.size(); ++i) { + for (long long int i = 0; i < SIZE(in); ++i) { if (i > 0) out << ", "; out << in.at(i); } -- cgit 1.4.1-2-gfad0