about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-24 20:49:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-24 20:49:53 -0700
commit0d7b60ed1dd71d48777b86d01849767f69fd2511 (patch)
tree3d814e090426a160572b91d62e5bc686844ea7a3 /cpp
parentf1b71a4461a2fca938897fc15de0214e48265c54 (diff)
downloadmu-0d7b60ed1dd71d48777b86d01849767f69fd2511.tar.gz
1178
Diffstat (limited to 'cpp')
-rw-r--r--cpp/037call_reply5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/037call_reply b/cpp/037call_reply
index adf75c7e..d48a17de 100644
--- a/cpp/037call_reply
+++ b/cpp/037call_reply
@@ -27,14 +27,13 @@ case REPLY: {
   }
   Current_routine->calls.pop();
   assert(!Current_routine->calls.empty());
-  size_t& caller_pc = Current_routine->calls.top().running_step_index;
-  instruction& caller_instruction = Recipe[Current_routine->calls.top().running_recipe].steps[caller_pc];
+  const instruction& caller_instruction = current_instruction();
   assert(caller_instruction.products.size() <= callee_results.size());
   for (size_t i = 0; i < caller_instruction.products.size(); ++i) {
     trace("run") << "result " << i << " is " << to_string(callee_results[i]);
     write_memory(caller_instruction.products[i], callee_results[i]);
   }
-  ++caller_pc;
+  ++current_step_index();  // caller
   break;
 }