about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-22 16:10:23 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-22 16:10:23 -0700
commitd8509b41753c0e03eff15c462dbf09749218006f (patch)
tree54313e0b9c0e73d85853afc012976b4bce82d020
parent3b107f1863930433e771a630dfbba095fa1fd6b0 (diff)
downloadmu-d8509b41753c0e03eff15c462dbf09749218006f.tar.gz
3555
-rw-r--r--012transform.cc2
-rw-r--r--013update_operation.cc2
-rw-r--r--020run.cc2
-rw-r--r--028call_reply.cc2
-rw-r--r--030container.cc2
-rw-r--r--050scenario.cc2
-rw-r--r--053recipe_header.cc2
-rw-r--r--054static_dispatch.cc4
-rw-r--r--057immutable.cc4
-rw-r--r--060rewrite_literal_string.cc2
-rw-r--r--062convert_ingredients_to_text.cc2
-rw-r--r--072scheduler.cc4
12 files changed, 15 insertions, 15 deletions
diff --git a/012transform.cc b/012transform.cc
index e121865d..8395bcd6 100644
--- a/012transform.cc
+++ b/012transform.cc
@@ -22,7 +22,7 @@ int transformed_until;
 transformed_until = -1;
 
 :(before "End Types")
-typedef void (*transform_fn)(recipe_ordinal);
+typedef void (*transform_fn)(const recipe_ordinal);
 
 :(before "End Globals")
 vector<transform_fn> Transform;
diff --git a/013update_operation.cc b/013update_operation.cc
index 64cd66f8..418b3563 100644
--- a/013update_operation.cc
+++ b/013update_operation.cc
@@ -5,7 +5,7 @@
 Transform.push_back(update_instruction_operations);  // idempotent
 
 :(code)
-void update_instruction_operations(recipe_ordinal r) {
+void update_instruction_operations(const recipe_ordinal r) {
   trace(9991, "transform") << "--- compute instruction operations for recipe " << get(Recipe, r).name << end();
   recipe& caller = get(Recipe, r);
 //?   cerr << "--- compute instruction operations for recipe " << caller.name << '\n';
diff --git a/020run.cc b/020run.cc
index 70db6015..e8bb44fd 100644
--- a/020run.cc
+++ b/020run.cc
@@ -53,7 +53,7 @@ map<string, int> Locations_read;
 map<string, int> Locations_read_by_instruction;
 
 :(code)
-void run(recipe_ordinal r) {
+void run(const recipe_ordinal r) {
   routine rr(r);
   Current_routine = &rr;
   run_current_routine();
diff --git a/028call_reply.cc b/028call_reply.cc
index ea853058..067fd010 100644
--- a/028call_reply.cc
+++ b/028call_reply.cc
@@ -48,7 +48,7 @@ case RETURN: {
 :(before "End Checks")
 Transform.push_back(check_types_of_reply_instructions);  // idempotent
 :(code)
-void check_types_of_reply_instructions(recipe_ordinal r) {
+void check_types_of_reply_instructions(const recipe_ordinal r) {
   const recipe& caller = get(Recipe, r);
   trace(9991, "transform") << "--- check types of reply instructions in recipe " << caller.name << end();
   for (int i = 0;  i < SIZE(caller.steps);  ++i) {
diff --git a/030container.cc b/030container.cc
index 03e146ec..e11475a6 100644
--- a/030container.cc
+++ b/030container.cc
@@ -177,7 +177,7 @@ const type_tree* root_type(const type_tree* t) {
 :(after "End Type Modifying Transforms")
 Transform.push_back(compute_container_sizes);  // idempotent
 :(code)
-void compute_container_sizes(recipe_ordinal r) {
+void compute_container_sizes(const recipe_ordinal r) {
   recipe& caller = get(Recipe, r);
   trace(9992, "transform") << "--- compute container sizes for " << caller.name << end();
   for (int i = 0;  i < SIZE(caller.steps);  ++i) {
diff --git a/050scenario.cc b/050scenario.cc
index a4f57cf5..0212e499 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -202,7 +202,7 @@ void run_mu_scenario(const scenario& s) {
 //: Some variables for fake resources always get special /raw addresses in scenarios.
 
 // Should contain everything passed by is_special_name but failed by is_disqualified.
-void bind_special_scenario_names(recipe_ordinal r) {
+void bind_special_scenario_names(const recipe_ordinal r) {
   // Special Scenario Variable Names(r)
   // End Special Scenario Variable Names(r)
 }
diff --git a/053recipe_header.cc b/053recipe_header.cc
index 9845b3fa..fc6312b4 100644
--- a/053recipe_header.cc
+++ b/053recipe_header.cc
@@ -420,7 +420,7 @@ def add2 x:num, y:num -> z:num [
 Transform.push_back(fill_in_reply_ingredients);  // idempotent
 
 :(code)
-void fill_in_reply_ingredients(recipe_ordinal r) {
+void fill_in_reply_ingredients(const recipe_ordinal r) {
   recipe& caller_recipe = get(Recipe, r);
   if (!caller_recipe.has_header) return;
   trace(9991, "transform") << "--- fill in reply ingredients from header for recipe " << caller_recipe.name << end();
diff --git a/054static_dispatch.cc b/054static_dispatch.cc
index 79537a7c..c698edb2 100644
--- a/054static_dispatch.cc
+++ b/054static_dispatch.cc
@@ -150,7 +150,7 @@ Transform.push_back(resolve_ambiguous_calls);  // idempotent
 list<call> resolve_stack;
 
 :(code)
-void resolve_ambiguous_calls(recipe_ordinal r) {
+void resolve_ambiguous_calls(const recipe_ordinal r) {
   recipe& caller_recipe = get(Recipe, r);
   trace(9991, "transform") << "--- resolve ambiguous calls for recipe " << caller_recipe.name << end();
   for (int index = 0;  index < SIZE(caller_recipe.steps);  ++index) {
@@ -558,7 +558,7 @@ def foo x:num -> y:num [
 +mem: storing 35 in location 1
 
 :(code)
-string header_label(recipe_ordinal r) {
+string header_label(const recipe_ordinal r) {
   return header_label(get(Recipe, r));
 }
 string header_label(const recipe& caller) {
diff --git a/057immutable.cc b/057immutable.cc
index 7cd06f6f..2dde38a8 100644
--- a/057immutable.cc
+++ b/057immutable.cc
@@ -337,7 +337,7 @@ $error: 0
 Transform.push_back(check_immutable_ingredients);  // idempotent
 
 :(code)
-void check_immutable_ingredients(recipe_ordinal r) {
+void check_immutable_ingredients(const recipe_ordinal r) {
   // to ensure an address reagent isn't modified, it suffices to show that
   //   a) we never write to its contents directly,
   //   b) we never call 'put' or 'put-index' on it, and
@@ -483,7 +483,7 @@ void check_immutable_ingredient_in_instruction(const instruction& inst, const se
   }
 }
 
-bool is_modified_in_recipe(recipe_ordinal r, int ingredient_index, const recipe& caller) {
+bool is_modified_in_recipe(const recipe_ordinal r, const int ingredient_index, const recipe& caller) {
   const recipe& callee = get(Recipe, r);
   if (!callee.has_header) {
     raise << maybe(caller.name) << "can't check mutability of ingredients in recipe " << callee.name << " because it uses 'next-ingredient' directly, rather than a recipe header.\n" << end();
diff --git a/060rewrite_literal_string.cc b/060rewrite_literal_string.cc
index 30699644..f6f9888d 100644
--- a/060rewrite_literal_string.cc
+++ b/060rewrite_literal_string.cc
@@ -34,7 +34,7 @@ void initialize_transform_rewrite_literal_string_to_text() {
   // End initialize_transform_rewrite_literal_string_to_text()
 }
 
-void rewrite_literal_string_to_text(recipe_ordinal r) {
+void rewrite_literal_string_to_text(const recipe_ordinal r) {
   recipe& caller = get(Recipe, r);
   trace(9991, "transform") << "--- rewrite literal strings in recipe " << caller.name << end();
   if (contains_numeric_locations(caller)) return;
diff --git a/062convert_ingredients_to_text.cc b/062convert_ingredients_to_text.cc
index c67b58c7..642de92f 100644
--- a/062convert_ingredients_to_text.cc
+++ b/062convert_ingredients_to_text.cc
@@ -57,7 +57,7 @@ def bar -> x:foo [
 Transform.push_back(convert_ingredients_to_text);  // idempotent
 
 :(code)
-void convert_ingredients_to_text(recipe_ordinal r) {
+void convert_ingredients_to_text(const recipe_ordinal r) {
   recipe& caller = get(Recipe, r);
   trace(9991, "transform") << "--- convert some ingredients to text in recipe " << caller.name << end();
   // in recipes without named locations, 'stash' is still not extensible
diff --git a/072scheduler.cc b/072scheduler.cc
index c5cd616a..46be1e6b 100644
--- a/072scheduler.cc
+++ b/072scheduler.cc
@@ -53,8 +53,8 @@ int Current_routine_index = 0;
 :(before "End Setup")
 Scheduling_interval = 500;
 Routines.clear();
-:(replace{} "void run(recipe_ordinal r)")
-void run(recipe_ordinal r) {
+:(replace{} "void run(const recipe_ordinal r)")
+void run(const recipe_ordinal r) {
   run(new routine(r));
 }