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-29 17:15:09 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-29 17:15:09 -0700
commite6692482643dc007988188e2b19fbb9219ca2833 (patch)
treecbb805cba3bd46dfc7d71adaa2150d9acb5cc5ba /044space.cc
parent5a702544a6f8aa3fa520ba387a6c0e803e076476 (diff)
downloadmu-e6692482643dc007988188e2b19fbb9219ca2833.tar.gz
2321 - more preparations for static dispatch
Deduce operation id from name during transform rather than load, so that
earlier transforms have a chance to modify the name.
Diffstat (limited to '044space.cc')
-rw-r--r--044space.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/044space.cc b/044space.cc
index 56b494d5..dd579a4f 100644
--- a/044space.cc
+++ b/044space.cc
@@ -173,15 +173,15 @@ void try_reclaim_locals() {
   const recipe_ordinal r = Recipe_ordinal[current_recipe_name()];
   if (Recipe[r].steps.empty()) return;
   const instruction& inst = Recipe[r].steps.at(0);
-  if (inst.name != "local-scope") return;
+  if (inst.old_name != "local-scope") return;
   abandon(current_call().default_space,
           /*array length*/1+/*number-of-locals*/Name[r][""]);
 }
 
 void rewrite_default_space_instruction(instruction& curr) {
-  curr.operation = Recipe_ordinal["new"];
   if (!curr.ingredients.empty())
-    raise_error << "new-default-space can't take any ingredients\n" << end();
+    raise_error << curr.to_string() << " can't take any ingredients\n" << end();
+  curr.name = "new";
   curr.ingredients.push_back(reagent("location:type"));
   curr.ingredients.push_back(reagent("number-of-locals:literal"));
   if (!curr.products.empty())