diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-04-13 22:04:52 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-04-13 22:04:52 -0700 |
commit | f404eb55720ce5bcfe9e78b74933a0a2b69badef (patch) | |
tree | 2ad1e781f376dc6f7296ad3fe35ba2bc95c79085 /020run.cc | |
parent | ad05221de91b9ec058de36319c617e7ac771e950 (diff) | |
download | mu-f404eb55720ce5bcfe9e78b74933a0a2b69badef.tar.gz |
3819
Yet another attempt at trying to clean up commit 3216. I think this solution might finally let me stop agonizing over the problem. State variables for distinguishing call-sites are a reasonable mechanism, orthogonal to waypoints and the hook functions to hold them.
Diffstat (limited to '020run.cc')
-rw-r--r-- | 020run.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/020run.cc b/020run.cc index 39168588..892800f4 100644 --- a/020run.cc +++ b/020run.cc @@ -91,7 +91,8 @@ void run_current_routine() { cout << "not a primitive op: " << current_instruction().operation << '\n'; } } - // Write Products of Instruction + //: used by a later layer + Writing_products_of_instruction = true; if (SIZE(products) < SIZE(current_instruction().products)) { raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products in '" << to_original_string(current_instruction()) << "'\n" << end(); } @@ -99,13 +100,15 @@ void run_current_routine() { for (int i = 0; i < SIZE(current_instruction().products); ++i) write_memory(current_instruction().products.at(i), products.at(i)); } - // End Write Products of Instruction + Writing_products_of_instruction = false; // End Running One Instruction finish_instruction:; ++current_step_index(); } stop_running_current_routine:; } +:(before "End Globals") +bool Writing_products_of_instruction = false; //: hook replaced in a later layer bool should_continue_running(const routine* current_routine) { |