From f91179bdfc4b8049e9b4609396e1d7a01e302304 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 19 Jun 2015 16:35:10 -0700 Subject: 1600 --- 037call_reply.cc | 4 ++++ 072scenario_screen.cc | 1 + 075scenario_keyboard.cc | 2 ++ 3 files changed, 7 insertions(+) diff --git a/037call_reply.cc b/037call_reply.cc index fa224216..8c69fa3f 100644 --- a/037call_reply.cc +++ b/037call_reply.cc @@ -126,6 +126,7 @@ recipe test1 [ if (curr.name == "reply-if") { assert(curr.products.empty()); curr.operation = Recipe_number["jump-unless"]; + curr.name = "jump-unless"; vector results; copy(++curr.ingredients.begin(), curr.ingredients.end(), inserter(results, results.end())); curr.ingredients.resize(1); @@ -133,6 +134,7 @@ if (curr.name == "reply-if") { result.steps.push_back(curr); curr.clear(); curr.operation = Recipe_number["reply"]; + curr.name = "reply"; curr.ingredients.swap(results); } // rewrite `reply-unless a, b, c, ...` to @@ -143,6 +145,7 @@ if (curr.name == "reply-if") { if (curr.name == "reply-unless") { assert(curr.products.empty()); curr.operation = Recipe_number["jump-if"]; + curr.name = "jump-if"; vector results; copy(++curr.ingredients.begin(), curr.ingredients.end(), inserter(results, results.end())); curr.ingredients.resize(1); @@ -150,5 +153,6 @@ if (curr.name == "reply-unless") { result.steps.push_back(curr); curr.clear(); curr.operation = Recipe_number["reply"]; + curr.name = "reply"; curr.ingredients.swap(results); } diff --git a/072scenario_screen.cc b/072scenario_screen.cc index 66febddc..b529a4fc 100644 --- a/072scenario_screen.cc +++ b/072scenario_screen.cc @@ -134,6 +134,7 @@ Name[tmp_recipe.at(0)]["screen"] = SCREEN; //? cout << "before: " << curr.to_string() << '\n'; //? 1 if (curr.name == "assume-screen") { curr.operation = Recipe_number["new-fake-screen"]; + curr.name = "new-fake-screen"; assert(curr.operation); assert(curr.products.empty()); curr.products.push_back(reagent("screen:address")); diff --git a/075scenario_keyboard.cc b/075scenario_keyboard.cc index 83d13b40..6a5da304 100644 --- a/075scenario_keyboard.cc +++ b/075scenario_keyboard.cc @@ -44,6 +44,7 @@ if (s == "keyboard") return true; if (curr.name == "assume-keyboard") { // insert first instruction curr.operation = Recipe_number["new"]; + curr.name = "new"; assert(curr.products.empty()); curr.products.push_back(reagent("keyboard:address")); curr.products.at(0).set_value(KEYBOARD); @@ -51,6 +52,7 @@ if (curr.name == "assume-keyboard") { // leave second instruction in curr curr.clear(); curr.operation = Recipe_number["new-fake-keyboard"]; + curr.name = "new-fake-keyboard"; assert(curr.ingredients.empty()); curr.ingredients.push_back(reagent("keyboard:address")); curr.ingredients.at(0).set_value(KEYBOARD); -- cgit 1.4.1-2-gfad0 ='n5' href='#n5'>5 6 7 8 9 10 11 12 13