about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-17 12:20:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-17 12:20:48 -0700
commite4fc73b1d73d7731f96e4c7692b96751ce1128bd (patch)
treeda20a499a325ba0435dcc92c21211ced874c8a65
parente951ecf5596121f244eb8188d1f8ed25afb2b858 (diff)
downloadmu-e4fc73b1d73d7731f96e4c7692b96751ce1128bd.tar.gz
3214
-rw-r--r--043space.cc2
-rw-r--r--044space_surround.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/043space.cc b/043space.cc
index d6204b39..b6bb82dd 100644
--- a/043space.cc
+++ b/043space.cc
@@ -240,10 +240,10 @@ void try_reclaim_locals() {
     const instruction& inst = exiting_recipe.steps.at(i);
     for (int i = 0; i < SIZE(inst.products); ++i) {
       // local variables only
-      if (has_property(inst.products.at(i), "space")) continue;
       if (has_property(inst.products.at(i), "lookup")) continue;
       if (has_property(inst.products.at(i), "raw")) continue;  // tests often want to check such locations after they run
       if (escaping(inst.products.at(i))) continue;
+      // End Checks For Reclaiming Locals
       trace(9999, "mem") << "clearing " << inst.products.at(i).original_string << end();
       zeros.resize(size_of(inst.products.at(i)));
       write_memory(inst.products.at(i), zeros);
diff --git a/044space_surround.cc b/044space_surround.cc
index 3c70c08f..341d25b5 100644
--- a/044space_surround.cc
+++ b/044space_surround.cc
@@ -28,6 +28,9 @@ def dummy [  # just for the /names: property above
 # store to chained space: /*contents of location 12*/20 + /*skip refcount*/1 + /*skip length*/1 + /*index*/1
 +mem: storing 33 in location 23
 
+:(before "End Checks For Reclaiming Locals")
+if (space_index(inst.products.at(i)) > 0) continue;
+
 //: If you think of a space as a collection of variables with a common
 //: lifetime, surrounding allows managing shorter lifetimes inside a longer
 //: one.