about summary refs log tree commit diff stats
path: root/043space.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-16 14:41:49 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-16 14:41:49 -0700
commit86033d4bdd44c5d50abfd6370adc026a14f8c9ae (patch)
treeb2f594aa10e3405e191f12d44003e1c03b79ea87 /043space.cc
parent7a29cf544e73fbd516b2e6118c093fd5df81a274 (diff)
downloadmu-86033d4bdd44c5d50abfd6370adc026a14f8c9ae.tar.gz
3198
Diffstat (limited to '043space.cc')
-rw-r--r--043space.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/043space.cc b/043space.cc
index bb221201..cb58d97d 100644
--- a/043space.cc
+++ b/043space.cc
@@ -256,6 +256,22 @@ void try_reclaim_locals() {
           /*refcount*/1 + /*array length*/1 + /*number-of-locals*/Name[r][""]);
 }
 
+:(code)
+// is this reagent one of the values returned by the current (reply) instruction?
+// is the corresponding ingredient saved in the caller?
+bool escaping(const reagent& r) {
+  assert(Current_routine);  // run-time only
+  // nothing escapes when you fall through past end of recipe
+  if (current_step_index() >= SIZE(Current_routine->steps())) return false;
+  for (long long i = 0; i < SIZE(current_instruction().ingredients); ++i) {
+    if (r == current_instruction().ingredients.at(i)) {
+    if (caller_uses_product(i))
+      return true;
+    }
+  }
+  return false;
+}
+
 //: since we don't decrement refcounts for escaping values above, make sure we
 //: don't increment them when the caller saves them either
 
@@ -273,21 +289,6 @@ bool should_update_refcounts_in_write_memory(bool conditional_update) {
 }
 
 :(code)
-// is this reagent one of the values returned by the current (reply) instruction?
-// is the corresponding ingredient saved in the caller?
-bool escaping(const reagent& r) {
-  assert(Current_routine);  // run-time only
-  // nothing escapes when you fall through past end of recipe
-  if (current_step_index() >= SIZE(Current_routine->steps())) return false;
-  for (long long i = 0; i < SIZE(current_instruction().ingredients); ++i) {
-    if (r == current_instruction().ingredients.at(i)) {
-    if (caller_uses_product(i))
-      return true;
-    }
-  }
-  return false;
-}
-
 bool caller_uses_product(int product_index) {
   assert(Current_routine);  // run-time only
   assert(!Current_routine->calls.empty());