about summary refs log tree commit diff stats
path: root/html/044space_surround.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-09-23 19:30:00 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-09-23 19:30:00 -0700
commit615f4a970a2fa5c91766ee585a7d531b083f4bff (patch)
tree5fce7848b60fe7e0dae089c94ca228ad74067ce1 /html/044space_surround.cc.html
parent72cf994869e19f6bdc4678e1122f0082d07d4a11 (diff)
downloadmu-615f4a970a2fa5c91766ee585a7d531b083f4bff.tar.gz
4003
Diffstat (limited to 'html/044space_surround.cc.html')
-rw-r--r--html/044space_surround.cc.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/html/044space_surround.cc.html b/html/044space_surround.cc.html
index ad5f42d4..524db0d9 100644
--- a/html/044space_surround.cc.html
+++ b/html/044space_surround.cc.html
@@ -70,10 +70,10 @@ if ('onhashchange' in window) {
 <span id="L7" class="LineNr"> 7 </span><span class="Delimiter">:(scenario surrounding_space)</span>
 <span id="L8" class="LineNr"> 8 </span><span class="Comment"># location 1 in space 1 refers to the space surrounding the default space, here 20.</span>
 <span id="L9" class="LineNr"> 9 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [
-<span id="L10" class="LineNr">10 </span>  <span class="Comment"># pretend address:array:location; in practice we'll use new</span>
+<span id="L10" class="LineNr">10 </span>  <span class="Comment"># pretend address:array:location; in practice we'll use 'new'</span>
 <span id="L11" class="LineNr">11 </span>  <span class="Constant">10</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>  <span class="Comment"># refcount</span>
 <span id="L12" class="LineNr">12 </span>  <span class="Constant">11</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">5</span>  <span class="Comment"># length</span>
-<span id="L13" class="LineNr">13 </span>  <span class="Comment"># pretend address:array:location; in practice we'll use new</span>
+<span id="L13" class="LineNr">13 </span>  <span class="Comment"># pretend address:array:location; in practice we'll use 'new&quot;</span>
 <span id="L14" class="LineNr">14 </span>  <span class="Constant">20</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>  <span class="Comment"># refcount</span>
 <span id="L15" class="LineNr">15 </span>  <span class="Constant">21</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">5</span>  <span class="Comment"># length</span>
 <span id="L16" class="LineNr">16 </span>  <span class="Comment"># actual start of this recipe</span>
@@ -93,7 +93,7 @@ if ('onhashchange' in window) {
 <span id="L30" class="LineNr">30 </span><span class="traceContains">+mem: storing 33 in location 23</span>
 <span id="L31" class="LineNr">31 </span>
 <span id="L32" class="LineNr">32 </span><span class="Delimiter">:(before &quot;End Checks For Reclaiming Locals&quot;)</span>
-<span id="L33" class="LineNr">33 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='044space_surround.cc.html#L52'>space_index</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> &gt; <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
+<span id="L33" class="LineNr">33 </span><span class="Normal">if</span> <span class="Delimiter">(</span>space_index<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> &gt; <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
 <span id="L34" class="LineNr">34 </span>
 <span id="L35" class="LineNr">35 </span><span class="Comment">//: If you think of a space as a collection of variables with a common</span>
 <span id="L36" class="LineNr">36 </span><span class="Comment">//: lifetime, surrounding allows managing shorter lifetimes inside a longer</span>
@@ -102,17 +102,17 @@ if ('onhashchange' in window) {
 <span id="L39" class="LineNr">39 </span><span class="Delimiter">:(replace{} &quot;int space_base(const reagent&amp; x)&quot;)</span>
 <span id="L40" class="LineNr">40 </span><span class="Normal">int</span> space_base<span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; x<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L41" class="LineNr">41 </span>  <span class="Normal">int</span> base = <a href='026call.cc.html#L79'>current_call</a><span class="Delimiter">().</span>default_space ? <span class="Delimiter">(</span><a href='026call.cc.html#L79'>current_call</a><span class="Delimiter">().</span>default_space+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">)</span> : <span class="Constant">0</span><span class="Delimiter">;</span>
-<span id="L42" class="LineNr">42 </span>  <span class="Identifier">return</span> space_base<span class="Delimiter">(</span>x<span class="Delimiter">,</span> <a href='044space_surround.cc.html#L52'>space_index</a><span class="Delimiter">(</span>x<span class="Delimiter">),</span> base<span class="Delimiter">);</span>
+<span id="L42" class="LineNr">42 </span>  <span class="Identifier">return</span> space_base<span class="Delimiter">(</span>x<span class="Delimiter">,</span> space_index<span class="Delimiter">(</span>x<span class="Delimiter">),</span> base<span class="Delimiter">);</span>
 <span id="L43" class="LineNr">43 </span><span class="Delimiter">}</span>
 <span id="L44" class="LineNr">44 </span>
-<span id="L45" class="LineNr">45 </span><span class="Normal">int</span> space_base<span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; x<span class="Delimiter">,</span> <span class="Normal">int</span> <a href='044space_surround.cc.html#L52'>space_index</a><span class="Delimiter">,</span> <span class="Normal">int</span> base<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span id="L46" class="LineNr">46 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span><a href='044space_surround.cc.html#L52'>space_index</a> == <span class="Constant">0</span><span class="Delimiter">)</span>
+<span id="L45" class="LineNr">45 </span><span class="Normal">int</span> space_base<span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; x<span class="Delimiter">,</span> <span class="Normal">int</span> space_index<span class="Delimiter">,</span> <span class="Normal">int</span> base<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L46" class="LineNr">46 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>space_index == <span class="Constant">0</span><span class="Delimiter">)</span>
 <span id="L47" class="LineNr">47 </span>  <span class="Conceal">¦</span> <span class="Identifier">return</span> base<span class="Delimiter">;</span>
 <span id="L48" class="LineNr">48 </span>  <span class="Normal">int</span> result = space_base<span class="Delimiter">(</span>x<span class="Delimiter">,</span> space_index-<span class="Constant">1</span><span class="Delimiter">,</span> <a href='001help.cc.html#L228'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> base+<span class="Comment">/*</span><span class="Comment">skip length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">))</span>+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
 <span id="L49" class="LineNr">49 </span>  <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span id="L50" class="LineNr">50 </span><span class="Delimiter">}</span>
 <span id="L51" class="LineNr">51 </span>
-<span id="L52" class="LineNr">52 </span><span class="Normal">int</span> <a href='044space_surround.cc.html#L52'>space_index</a><span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; x<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L52" class="LineNr">52 </span><span class="Normal">int</span> space_index<span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; x<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L53" class="LineNr">53 </span>  <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span>  i &lt; <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>properties<span class="Delimiter">);</span>  ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L54" class="LineNr">54 </span>  <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>first == <span class="Constant">&quot;space&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L55" class="LineNr">55 </span>  <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!x<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>second || x<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>second<span class="Delimiter">-&gt;</span>right<span class="Delimiter">)</span>