about summary refs log tree commit diff stats
path: root/cpp/012run
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-15 08:51:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-15 08:51:53 -0700
commitfa0c006672437f4e89f86d0f53e9e4b3da767a74 (patch)
treeda99f8f5ff835ea3ae62024f4a59b3c4e53e44f0 /cpp/012run
parenteb7afe5d4337637e86e27a01562c08de96dd5be1 (diff)
downloadmu-fa0c006672437f4e89f86d0f53e9e4b3da767a74.tar.gz
927
Diffstat (limited to 'cpp/012run')
-rw-r--r--cpp/012run4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/012run b/cpp/012run
index 03bb2be4..3f02c7b9 100644
--- a/cpp/012run
+++ b/cpp/012run
@@ -19,7 +19,7 @@ recipe main [
 
 :(before "End Types")
 // Each recipe can be 'called' many many times in a program. Each call needs a
-// little extra information.
+// little extra information. TODO: move this into the call layer somehow
 struct call {
   recipe_number running_recipe;
   size_t pc;
@@ -28,6 +28,7 @@ struct call {
 };
 typedef stack<call> call_stack;
 
+// TODO: move this into the scheduler layer somehow
 struct routine {
   size_t alloc;
   size_t alloc_max;
@@ -51,6 +52,7 @@ void run(recipe_number r) {
 void run(routine rr) {
   while (!rr.calls.empty()) {
     vector<instruction>& instructions = Recipe[rr.calls.top().running_recipe].steps;
+    // TODO: move this into the call layer somehow
     while (rr.calls.top().pc >= instructions.size()) {
       rr.calls.pop();
       if (rr.calls.empty()) return;