about summary refs log tree commit diff stats
path: root/044space.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-28 18:19:41 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-28 18:26:05 -0700
commit70f70118f468b51ac14b7e992b0ec941c3a50d4d (patch)
tree07749a54af09d9bfbeb93b7b52dc4a175ed6a886 /044space.cc
parentb69daf785df8dee56f851ce9d6dd38d7779a04ca (diff)
downloadmu-70f70118f468b51ac14b7e992b0ec941c3a50d4d.tar.gz
2306 - recipe headers
Once a student has gotten used to recipes and ingredients using the
staged 'next-ingredient' approach there's no reason to avoid
conventional function headers. As an added bonus we can now:

a) check that all 'reply' instructions in a recipe are consistent
b) deduce what to reply without needing to say so everytime
c) start thinking about type parameters for recipes (generic functions!)
Diffstat (limited to '044space.cc')
-rw-r--r--044space.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/044space.cc b/044space.cc
index ed074336..56b494d5 100644
--- a/044space.cc
+++ b/044space.cc
@@ -117,7 +117,7 @@ if (x.name == "number-of-locals")
 :(before "End is_special_name Cases")
 if (s == "number-of-locals") return true;
 
-:(before "End Rewrite Instruction(curr)")
+:(before "End Rewrite Instruction(curr, recipe result)")
 // rewrite `new-default-space` to
 //   `default-space:address:array:location <- new location:type, number-of-locals:literal`
 // where N is Name[recipe][""]
@@ -162,7 +162,7 @@ try_reclaim_locals();
 
 //: now 'local-scope' is identical to 'new-default-space' except that we'll
 //: reclaim the default-space when the routine exits
-:(before "End Rewrite Instruction(curr)")
+:(before "End Rewrite Instruction(curr, recipe result)")
 if (curr.name == "local-scope") {
   rewrite_default_space_instruction(curr);
 }