diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-24 09:16:17 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-24 09:18:20 -0700 |
commit | 23d3a02226973f80188e84fa5dcedb14413c5b7f (patch) | |
tree | 3c73284cb795e74d78e53b72df470cafca4c70cf /045closure_name.cc | |
parent | 377b00b045289a3fa8e88d4b2f129d797c687e2f (diff) | |
download | mu-23d3a02226973f80188e84fa5dcedb14413c5b7f.tar.gz |
4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
Diffstat (limited to '045closure_name.cc')
-rw-r--r-- | 045closure_name.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/045closure_name.cc b/045closure_name.cc index e478337d..98bf982c 100644 --- a/045closure_name.cc +++ b/045closure_name.cc @@ -9,14 +9,14 @@ :(scenario closure) def main [ default-space:space <- new location:type, 30 - 1:space/names:new-counter <- new-counter - 2:num/raw <- increment-counter 1:space/names:new-counter - 3:num/raw <- increment-counter 1:space/names:new-counter + 2:space/names:new-counter <- new-counter + 10:num/raw <- increment-counter 2:space/names:new-counter + 11:num/raw <- increment-counter 2:space/names:new-counter ] def new-counter [ default-space:space <- new location:type, 30 x:num <- copy 23 - y:num <- copy 3 # variable that will be incremented + y:num <- copy 13 # variable that will be incremented return default-space:space ] def increment-counter [ @@ -27,7 +27,7 @@ def increment-counter [ return y:num/space:1 ] +name: lexically surrounding space for recipe increment-counter comes from new-counter -+mem: storing 5 in location 3 ++mem: storing 15 in location 11 //: To make this work, compute the recipe that provides names for the //: surrounding space of each recipe. @@ -165,6 +165,6 @@ def use-scope [ ] def main [ 1:space/raw <- new-scope - 2:num/raw <- use-scope 1:space/raw + 3:num/raw <- use-scope 1:space/raw ] -+mem: storing 34 in location 2 ++mem: storing 34 in location 3 |