about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-04-27 09:07:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-04-27 09:07:53 -0700
commitb8263692a6f2865482abbc21eae5a4e5163ab725 (patch)
treeb1b938d4a83cf2b420001c9188194a5800d12eb2 /030container.cc
parentf6645643953eeb0a493d258759a4421505d13539 (diff)
downloadmu-b8263692a6f2865482abbc21eae5a4e5163ab725.tar.gz
3841
Use the real original instruction in error messages.
Thanks Ella Couch.
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/030container.cc b/030container.cc
index de22f1e6..8346a240 100644
--- a/030container.cc
+++ b/030container.cc
@@ -178,9 +178,9 @@ void compute_container_sizes(const recipe_ordinal r) {
     instruction& inst = caller.steps.at(i);
     trace(9993, "transform") << "- compute container sizes for " << to_string(inst) << end();
     for (int i = 0;  i < SIZE(inst.ingredients);  ++i)
-      compute_container_sizes(inst.ingredients.at(i), " in '"+to_original_string(inst)+"'");
+      compute_container_sizes(inst.ingredients.at(i), " in '"+inst.original_string+"'");
     for (int i = 0;  i < SIZE(inst.products);  ++i)
-      compute_container_sizes(inst.products.at(i), " in '"+to_original_string(inst)+"'");
+      compute_container_sizes(inst.products.at(i), " in '"+inst.original_string+"'");
   }
 }
 
@@ -407,7 +407,7 @@ case GET: {
   // Update GET base in Run
   int base_address = base.value;
   if (base_address == 0) {
-    raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   const type_tree* base_type = base.type;
@@ -563,7 +563,7 @@ case PUT: {
   // Update PUT base in Run
   int base_address = base.value;
   if (base_address == 0) {
-    raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   const type_tree* base_type = base.type;