about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--013update_operation.cc2
-rw-r--r--020run.cc6
-rw-r--r--022arithmetic.cc6
-rw-r--r--028call_return.cc6
-rw-r--r--030container.cc8
-rw-r--r--032array.cc10
-rw-r--r--033exclusive_container.cc2
-rw-r--r--035lookup.cc2
-rw-r--r--036refcount.cc4
-rw-r--r--042name.cc4
-rw-r--r--043space.cc4
-rw-r--r--054static_dispatch.cc4
-rw-r--r--056shape_shifting_recipe.cc4
-rw-r--r--073wait.cc6
14 files changed, 34 insertions, 34 deletions
diff --git a/013update_operation.cc b/013update_operation.cc
index 0468e80d..53ff252a 100644
--- a/013update_operation.cc
+++ b/013update_operation.cc
@@ -13,7 +13,7 @@ void update_instruction_operations(const recipe_ordinal r) {
     instruction& inst = caller.steps.at(index);
     if (inst.is_label) continue;
     if (!contains_key(Recipe_ordinal, inst.name)) {
-      raise << maybe(caller.name) << "instruction '" << inst.name << "' has no recipe in '" << to_original_string(inst) << "'\n" << end();
+      raise << maybe(caller.name) << "instruction '" << inst.name << "' has no recipe in '" << inst.original_string << "'\n" << end();
       continue;
     }
     inst.operation = get(Recipe_ordinal, inst.name);
diff --git a/020run.cc b/020run.cc
index f5b05ed1..d9d70334 100644
--- a/020run.cc
+++ b/020run.cc
@@ -94,7 +94,7 @@ void run_current_routine() {
     //: used by a later layer
     Writing_products_of_instruction = true;
     if (SIZE(products) < SIZE(current_instruction().products)) {
-      raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products in '" << to_original_string(current_instruction()) << "'\n" << end();
+      raise << SIZE(products) << " vs " << SIZE(current_instruction().products) << ": failed to write to all products in '" << current_instruction().original_string << "'\n" << end();
     }
     else {
       for (int i = 0;  i < SIZE(current_instruction().products);  ++i)
@@ -321,11 +321,11 @@ void write_memory(reagent/*copy*/ x, const vector<double>& data) {
   if (is_literal(x)) return;
   // End Preprocess write_memory(x, data)
   if (x.value == 0) {
-    raise << "can't write to location 0 in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << "can't write to location 0 in '" << current_instruction().original_string << "'\n" << end();
     return;
   }
   if (size_mismatch(x, data)) {
-    raise << maybe(current_recipe_name()) << "size mismatch in storing to '" << x.original_string << "' (" << size_of(x) << " vs " << SIZE(data) << ") at '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "size mismatch in storing to '" << x.original_string << "' (" << size_of(x) << " vs " << SIZE(data) << ") at '" << current_instruction().original_string << "'\n" << end();
     return;
   }
   // End write_memory(x) Special-cases
diff --git a/022arithmetic.cc b/022arithmetic.cc
index 7b74264f..0b842dd4 100644
--- a/022arithmetic.cc
+++ b/022arithmetic.cc
@@ -273,7 +273,7 @@ case DIVIDE_WITH_REMAINDER: {
   long long int a = static_cast<long long int>(ingredients.at(0).at(0));
   long long int b = static_cast<long long int>(ingredients.at(1).at(0));
   if (b == 0) {
-    raise << maybe(current_recipe_name()) << "divide by zero in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "divide by zero in '" << current_instruction().original_string << "'\n" << end();
     products.resize(2);
     products.at(0).push_back(0);
     products.at(1).push_back(0);
@@ -355,7 +355,7 @@ case SHIFT_LEFT: {
   int b = static_cast<int>(ingredients.at(1).at(0));
   products.resize(1);
   if (b < 0) {
-    raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << current_instruction().original_string << "'\n" << end();
     products.at(0).push_back(0);
     break;
   }
@@ -426,7 +426,7 @@ case SHIFT_RIGHT: {
   int b = static_cast<int>(ingredients.at(1).at(0));
   products.resize(1);
   if (b < 0) {
-    raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "second ingredient can't be negative in '" << current_instruction().original_string << "'\n" << end();
     products.at(0).push_back(0);
     break;
   }
diff --git a/028call_return.cc b/028call_return.cc
index 3e547f06..2b3b3904 100644
--- a/028call_return.cc
+++ b/028call_return.cc
@@ -93,16 +93,16 @@ void check_types_of_return_instructions(const recipe_ordinal r) {
         if (has_property(return_inst.ingredients.at(i), "same-as-ingredient")) {
           string_tree* tmp = property(return_inst.ingredients.at(i), "same-as-ingredient");
           if (!tmp || !tmp->atom) {
-            raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << to_original_string(return_inst) << "'\n" << end();
+            raise << maybe(caller.name) << "'same-as-ingredient' metadata should take exactly one value in '" << return_inst.original_string << "'\n" << end();
             goto finish_return_check;
           }
           int ingredient_index = to_integer(tmp->value);
           if (ingredient_index >= SIZE(caller_instruction.ingredients)) {
-            raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(caller_instruction) << "'\n" << end();
+            raise << maybe(caller.name) << "too few ingredients in '" << caller_instruction.original_string << "'\n" << end();
             goto finish_return_check;
           }
           if (!is_dummy(caller_instruction.products.at(i)) && !is_literal(caller_instruction.ingredients.at(ingredient_index)) && caller_instruction.products.at(i).name != caller_instruction.ingredients.at(ingredient_index).name) {
-            raise << maybe(caller.name) << "'" << to_original_string(caller_instruction) << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end();
+            raise << maybe(caller.name) << "'" << caller_instruction.original_string << "' should write to '" << caller_instruction.ingredients.at(ingredient_index).original_string << "' rather than '" << caller_instruction.products.at(i).original_string << "'\n" << end();
           }
         }
       }
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;
diff --git a/032array.cc b/032array.cc
index b586f930..64264ef8 100644
--- a/032array.cc
+++ b/032array.cc
@@ -342,14 +342,14 @@ case INDEX: {
   int base_address = base.value;
   trace(9998, "run") << "base address is " << base_address << end();
   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;
   }
   reagent/*copy*/ index = current_instruction().ingredients.at(1);
   // Update INDEX index in Run
   vector<double> index_val(read_memory(index));
   if (index_val.at(0) < 0 || index_val.at(0) >= get_or_insert(Memory, base_address)) {
-    raise << maybe(current_recipe_name()) << "invalid index " << no_scientific(index_val.at(0)) << " in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "invalid index " << no_scientific(index_val.at(0)) << " in '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   reagent/*local*/ element;
@@ -532,14 +532,14 @@ case PUT_INDEX: {
   // Update PUT_INDEX 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;
   }
   reagent/*copy*/ index = current_instruction().ingredients.at(1);
   // Update PUT_INDEX index in Run
   vector<double> index_val(read_memory(index));
   if (index_val.at(0) < 0 || index_val.at(0) >= get_or_insert(Memory, base_address)) {
-    raise << maybe(current_recipe_name()) << "invalid index " << no_scientific(index_val.at(0)) << " in '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "invalid index " << no_scientific(index_val.at(0)) << " in '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   int address = base_address + /*skip length*/1 + index_val.at(0)*size_of(array_element(base.type));
@@ -630,7 +630,7 @@ case LENGTH: {
   reagent/*copy*/ array = current_instruction().ingredients.at(0);
   // Update LENGTH array in Run
   if (array.value == 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;
   }
   products.resize(1);
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index bf79e064..6eac8f47 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -151,7 +151,7 @@ case MAYBE_CONVERT: {
   // Update MAYBE_CONVERT 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;
   }
   int tag = current_instruction().ingredients.at(1).value;
diff --git a/035lookup.cc b/035lookup.cc
index 6008338e..fa61100b 100644
--- a/035lookup.cc
+++ b/035lookup.cc
@@ -108,7 +108,7 @@ void lookup_memory_core(reagent& x, bool check_for_null) {
   }
   else if (check_for_null) {
     if (Current_routine)
-      raise << "tried to /lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end();
+      raise << "tried to /lookup 0 in '" << current_instruction().original_string << "'\n" << end();
     else
       raise << "tried to /lookup 0\n" << end();
   }
diff --git a/036refcount.cc b/036refcount.cc
index f90d6e3f..f3d27c82 100644
--- a/036refcount.cc
+++ b/036refcount.cc
@@ -317,9 +317,9 @@ void compute_container_address_offsets(const recipe_ordinal r) {
     instruction& inst = caller.steps.at(i);
     trace(9993, "transform") << "- compute address offsets for " << to_string(inst) << end();
     for (int i = 0;  i < SIZE(inst.ingredients);  ++i)
-      compute_container_address_offsets(inst.ingredients.at(i), " in '"+to_original_string(inst)+"'");
+      compute_container_address_offsets(inst.ingredients.at(i), " in '"+inst.original_string+"'");
     for (int i = 0;  i < SIZE(inst.products);  ++i)
-      compute_container_address_offsets(inst.products.at(i), " in '"+to_original_string(inst)+"'");
+      compute_container_address_offsets(inst.products.at(i), " in '"+inst.original_string+"'");
   }
 }
 
diff --git a/042name.cc b/042name.cc
index cae48c8a..a94fabf1 100644
--- a/042name.cc
+++ b/042name.cc
@@ -55,7 +55,7 @@ void transform_names(const recipe_ordinal r) {
       if (is_named_location(ingredient)) names_used = true;
       if (is_integer(ingredient.name)) continue;
       if (!already_transformed(ingredient, names)) {
-        raise << maybe(caller.name) << "tried to read ingredient '" << ingredient.name << "' in '" << to_original_string(inst) << "' but it hasn't been written to yet\n" << end();
+        raise << maybe(caller.name) << "tried to read ingredient '" << ingredient.name << "' in '" << inst.original_string << "' but it hasn't been written to yet\n" << end();
         // use-before-set Error
         return;
       }
@@ -232,7 +232,7 @@ $error: 0
 :(before "End update GET offset_value in Check")
 else {
   if (!offset.initialized) {
-    raise << maybe(get(Recipe, r).name) << "uninitialized offset '" << offset.name << "' in '" << to_original_string(inst) << "'\n" << end();
+    raise << maybe(get(Recipe, r).name) << "uninitialized offset '" << offset.name << "' in '" << inst.original_string << "'\n" << end();
     break;
   }
   offset_value = offset.value;
diff --git a/043space.cc b/043space.cc
index 770871c1..0cd16151 100644
--- a/043space.cc
+++ b/043space.cc
@@ -62,7 +62,7 @@ void absolutize(reagent& x) {
   if (is_raw(x) || is_dummy(x)) return;
   if (x.name == "default-space") return;
   if (!x.initialized)
-    raise << to_original_string(current_instruction()) << ": reagent not initialized: '" << x.original_string << "'\n" << end();
+    raise << current_instruction().original_string << ": reagent not initialized: '" << x.original_string << "'\n" << end();
   x.set_value(address(x.value, space_base(x)));
   x.properties.push_back(pair<string, string_tree*>("raw", NULL));
   assert(is_raw(x));
@@ -311,7 +311,7 @@ bool caller_uses_product(int product_index) {
 
 void rewrite_default_space_instruction(instruction& curr) {
   if (!curr.ingredients.empty())
-    raise << to_original_string(curr) << " can't take any ingredients\n" << end();
+    raise << "'" << curr.original_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"));
diff --git a/054static_dispatch.cc b/054static_dispatch.cc
index 00c9c645..a78411e9 100644
--- a/054static_dispatch.cc
+++ b/054static_dispatch.cc
@@ -215,9 +215,9 @@ string best_variant(instruction& inst, const recipe& caller_recipe) {
       const recipe& specializer_recipe = get(Recipe, p->running_recipe);
       const instruction& specializer_inst = specializer_recipe.steps.at(p->running_step_index);
       if (specializer_recipe.name != "interactive")
-        raise << "  (from '" << to_original_string(specializer_inst) << "' in " << specializer_recipe.name << ")\n" << end();
+        raise << "  (from '" << specializer_inst.original_string << "' in " << specializer_recipe.name << ")\n" << end();
       else
-        raise << "  (from '" << to_original_string(specializer_inst) << "')\n" << end();
+        raise << "  (from '" << specializer_inst.original_string << "')\n" << end();
       // One special-case to help with the rewrite_stash transform. (cross-layer)
       if (specializer_inst.products.at(0).name.find("stash_") == 0) {
         instruction stash_inst;
diff --git a/056shape_shifting_recipe.cc b/056shape_shifting_recipe.cc
index 787bfbd2..1cafbb13 100644
--- a/056shape_shifting_recipe.cc
+++ b/056shape_shifting_recipe.cc
@@ -316,7 +316,7 @@ void accumulate_type_ingredients(const type_tree* exemplar_type, const type_tree
     // probably a bug in mu
     // todo: make this smarter; only flag an error if exemplar_type contains some *new* type ingredient
     raise << maybe(exemplar.name) << "missing type ingredient for " << exemplar_reagent.original_string << '\n' << end();
-    raise << "  (called from '" << to_original_string(call_instruction) << "')\n" << end();
+    raise << "  (called from '" << call_instruction.original_string << "')\n" << end();
     return;
   }
   if (!exemplar_type->atom && exemplar_type->right == NULL && !refinement_type->atom && refinement_type->right != NULL) {
@@ -338,7 +338,7 @@ void accumulate_type_ingredients(const type_tree* exemplar_type, const type_tree
       }
       else {
         if (!deeply_equal_type_names(get(mappings, exemplar_type->name), curr_refinement_type)) {
-          raise << maybe(caller_recipe.name) << "no call found for '" << to_original_string(call_instruction) << "'\n" << end();
+          raise << maybe(caller_recipe.name) << "no call found for '" << call_instruction.original_string << "'\n" << end();
           *error = true;
           delete curr_refinement_type;
           return;
diff --git a/073wait.cc b/073wait.cc
index 99f56976..06bf7ec0 100644
--- a/073wait.cc
+++ b/073wait.cc
@@ -203,7 +203,7 @@ case GET_LOCATION: {
   canonize(base);
   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 = get_base_type(base.type);
@@ -337,7 +337,7 @@ case WAIT_FOR_ROUTINE: {
 :(before "End Primitive Recipe Implementations")
 case WAIT_FOR_ROUTINE: {
   if (ingredients.at(0).at(0) == Current_routine->id) {
-    raise << maybe(current_recipe_name()) << "routine can't wait for itself! '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "routine can't wait for itself! '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   Current_routine->state = WAITING;
@@ -499,7 +499,7 @@ case WAIT_FOR_ROUTINE_TO_BLOCK: {
 :(before "End Primitive Recipe Implementations")
 case WAIT_FOR_ROUTINE_TO_BLOCK: {
   if (ingredients.at(0).at(0) == Current_routine->id) {
-    raise << maybe(current_recipe_name()) << "routine can't wait for itself! '" << to_original_string(current_instruction()) << "'\n" << end();
+    raise << maybe(current_recipe_name()) << "routine can't wait for itself! '" << current_instruction().original_string << "'\n" << end();
     break;
   }
   Current_routine->state = WAITING;