diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-03-02 04:41:24 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-03-02 04:41:24 -0800 |
commit | a802f0cedc7b5580d746f46ae62fcf8074ae3c49 (patch) | |
tree | ab8f531d51374491f2998f63239dbb767b21e493 /html/043space.cc.html | |
parent | a1e4fa7194da184b74083362de537ece23a2f2f1 (diff) | |
download | mu-a802f0cedc7b5580d746f46ae62fcf8074ae3c49.tar.gz |
3749
Diffstat (limited to 'html/043space.cc.html')
-rw-r--r-- | html/043space.cc.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/html/043space.cc.html b/html/043space.cc.html index 2cdff102..657bfe46 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -126,7 +126,7 @@ if ('onhashchange' in window) { <span id="L62" class="LineNr"> 62 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='022arithmetic.cc.html#L108'>is_raw</a><span class="Delimiter">(</span>x<span class="Delimiter">)</span> || is_dummy<span class="Delimiter">(</span>x<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L63" class="LineNr"> 63 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>name == <span class="Constant">"default-space"</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L64" class="LineNr"> 64 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!x<span class="Delimiter">.</span>initialized<span class="Delimiter">)</span> -<span id="L65" class="LineNr"> 65 </span> <a href='003trace.cc.html#L178'>raise</a> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">": reagent not initialized: '"</span> << x<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L65" class="LineNr"> 65 </span> <a href='003trace.cc.html#L176'>raise</a> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">": reagent not initialized: '"</span> << x<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L66" class="LineNr"> 66 </span> x<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>value<span class="Delimiter">,</span> space_base<span class="Delimiter">(</span>x<span class="Delimiter">)));</span> <span id="L67" class="LineNr"> 67 </span> x<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span id="L68" class="LineNr"> 68 </span> assert<span class="Delimiter">(</span><a href='022arithmetic.cc.html#L108'>is_raw</a><span class="Delimiter">(</span>x<span class="Delimiter">));</span> @@ -143,7 +143,7 @@ if ('onhashchange' in window) { <span id="L79" class="LineNr"> 79 </span> <span class="Normal">int</span> size = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> base<span class="Delimiter">);</span> <span id="L80" class="LineNr"> 80 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>offset >= size<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L81" class="LineNr"> 81 </span> <span class="Comment">// todo: test</span> -<span id="L82" class="LineNr"> 82 </span> <a href='003trace.cc.html#L178'>raise</a> << <span class="Constant">"location "</span> << offset << <span class="Constant">" is out of bounds "</span> << size << <span class="Constant">" at "</span> << base << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L82" class="LineNr"> 82 </span> <a href='003trace.cc.html#L176'>raise</a> << <span class="Constant">"location "</span> << offset << <span class="Constant">" is out of bounds "</span> << size << <span class="Constant">" at "</span> << base << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L83" class="LineNr"> 83 </span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span> <span id="L85" class="LineNr"> 85 </span> <span class="Identifier">return</span> base + <span class="Comment">/*</span><span class="Comment">skip length</span><span class="Comment">*/</span><span class="Constant">1</span> + offset<span class="Delimiter">;</span> @@ -154,7 +154,7 @@ if ('onhashchange' in window) { <span id="L90" class="LineNr"> 90 </span><span class="Delimiter">:(after "Begin Preprocess write_memory(x, data)")</span> <span id="L91" class="LineNr"> 91 </span><span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>name == <span class="Constant">"default-space"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L92" class="LineNr"> 92 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!scalar<span class="Delimiter">(</span>data<span class="Delimiter">)</span> || !is_space<span class="Delimiter">(</span>x<span class="Delimiter">))</span> -<span id="L93" class="LineNr"> 93 </span> <a href='003trace.cc.html#L178'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"'default-space' should be of type <a href='043space.cc.html#L76'>address</a>:array:location, but is "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L93" class="LineNr"> 93 </span> <a href='003trace.cc.html#L176'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"'default-space' should be of type <a href='043space.cc.html#L76'>address</a>:array:location, but is "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L94" class="LineNr"> 94 </span> current_call<span class="Delimiter">().</span>default_space = data<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L95" class="LineNr"> 95 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L96" class="LineNr"> 96 </span><span class="Delimiter">}</span> @@ -248,12 +248,12 @@ if ('onhashchange' in window) { <span id="L184" class="LineNr">184 </span> vector<<span class="Normal">double</span>> result<span class="Delimiter">;</span> <span id="L185" class="LineNr">185 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>Name[get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> current_recipe_name<span class="Delimiter">())</span>][<span class="Constant">""</span>]<span class="Delimiter">);</span> <span id="L186" class="LineNr">186 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>back<span class="Delimiter">()</span> == <span class="Constant">0</span><span class="Delimiter">)</span> -<span id="L187" class="LineNr">187 </span> <a href='003trace.cc.html#L178'>raise</a> << <span class="Constant">"no space allocated for default-space in <a href='010vm.cc.html#L19'>recipe</a> "</span> << current_recipe_name<span class="Delimiter">()</span> << <span class="Constant">"; are you using names?</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L187" class="LineNr">187 </span> <a href='003trace.cc.html#L176'>raise</a> << <span class="Constant">"no space allocated for default-space in <a href='010vm.cc.html#L19'>recipe</a> "</span> << current_recipe_name<span class="Delimiter">()</span> << <span class="Constant">"; are you using names?</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L188" class="LineNr">188 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L189" class="LineNr">189 </span><span class="Delimiter">}</span> <span id="L190" class="LineNr">190 </span><span class="Delimiter">:(after "Begin Preprocess write_memory(x, data)")</span> <span id="L191" class="LineNr">191 </span><span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>name == <span class="Constant">"number-of-locals"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L192" class="LineNr">192 </span> <a href='003trace.cc.html#L178'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"can't write to special name 'number-of-locals'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L192" class="LineNr">192 </span> <a href='003trace.cc.html#L176'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"can't write to special name 'number-of-locals'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span id="L193" class="LineNr">193 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L194" class="LineNr">194 </span><span class="Delimiter">}</span> <span id="L195" class="LineNr">195 </span> @@ -311,12 +311,12 @@ if ('onhashchange' in window) { <span id="L247" class="LineNr">247 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_property<span class="Delimiter">(</span>product<span class="Delimiter">,</span> <span class="Constant">"raw"</span><span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// tests often want to check such locations after they run</span> <span id="L248" class="LineNr">248 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='043space.cc.html#L273'>escaping</a><span class="Delimiter">(</span>product<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L249" class="LineNr">249 </span> <span class="Comment">// End Checks For Reclaiming Locals</span> -<span id="L250" class="LineNr">250 </span> <a href='003trace.cc.html#L171'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"clearing "</span> << product<span class="Delimiter">.</span>original_string << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L250" class="LineNr">250 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"clearing "</span> << product<span class="Delimiter">.</span>original_string << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L251" class="LineNr">251 </span> zeros<span class="Delimiter">.</span>resize<span class="Delimiter">(</span>size_of<span class="Delimiter">(</span>product<span class="Delimiter">));</span> <span id="L252" class="LineNr">252 </span> write_memory<span class="Delimiter">(</span>product<span class="Delimiter">,</span> zeros<span class="Delimiter">);</span> <span id="L253" class="LineNr">253 </span> <span class="Delimiter">}</span> <span id="L254" class="LineNr">254 </span> <span class="Delimiter">}</span> -<span id="L255" class="LineNr">255 </span> <a href='003trace.cc.html#L171'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"automatically abandoning "</span> << current_call<span class="Delimiter">().</span>default_space << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L255" class="LineNr">255 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"automatically abandoning "</span> << current_call<span class="Delimiter">().</span>default_space << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L256" class="LineNr">256 </span> <a href='037abandon.cc.html#L28'>abandon</a><span class="Delimiter">(</span>current_call<span class="Delimiter">().</span>default_space<span class="Delimiter">,</span> <span id="L257" class="LineNr">257 </span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>type<span class="Delimiter">-></span>right<span class="Delimiter">,</span> <span id="L258" class="LineNr">258 </span> <span class="Comment">/*</span><span class="Comment">refcount</span><span class="Comment">*/</span><span class="Constant">1</span> + <span class="Comment">/*</span><span class="Comment">array length</span><span class="Comment">*/</span><span class="Constant">1</span> + <span class="Comment">/*</span><span class="Comment">number-of-locals</span><span class="Comment">*/</span>Name[r][<span class="Constant">""</span>]<span class="Delimiter">);</span> @@ -377,12 +377,12 @@ if ('onhashchange' in window) { <span id="L313" class="LineNr">313 </span> <span id="L314" class="LineNr">314 </span><span class="Normal">void</span> <a href='043space.cc.html#L314'>rewrite_default_space_instruction</a><span class="Delimiter">(</span>instruction& curr<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L315" class="LineNr">315 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> -<span id="L316" class="LineNr">316 </span> <a href='003trace.cc.html#L178'>raise</a> << to_original_string<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> << <span class="Constant">" can't take any ingredients</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L316" class="LineNr">316 </span> <a href='003trace.cc.html#L176'>raise</a> << to_original_string<span class="Delimiter">(</span>curr<span class="Delimiter">)</span> << <span class="Constant">" can't take any ingredients</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span id="L317" class="LineNr">317 </span> curr<span class="Delimiter">.</span>name = <span class="Constant">"new"</span><span class="Delimiter">;</span> <span id="L318" class="LineNr">318 </span> <span class="Constant">curr.ingredients.push_back(reagent("location:type</span><span class="Constant">"));</span> <span id="L319" class="LineNr">319 </span> <span class="Constant">curr.ingredients.push_back(reagent("number-of-locals:literal</span><span class="Constant">"));</span> <span id="L320" class="LineNr">320 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> -<span id="L321" class="LineNr">321 </span> <a href='003trace.cc.html#L178'>raise</a> << <span class="Constant">"new-default-space can't take any results</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L321" class="LineNr">321 </span> <a href='003trace.cc.html#L176'>raise</a> << <span class="Constant">"new-default-space can't take any results</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span id="L322" class="LineNr">322 </span> curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span><span class="Constant">"default-space:space"</span><span class="Delimiter">));</span> <span id="L323" class="LineNr">323 </span><span class="Delimiter">}</span> <span id="L324" class="LineNr">324 </span> @@ -466,11 +466,11 @@ if ('onhashchange' in window) { <span id="L402" class="LineNr">402 </span> <span class="Comment">// End check_default_space Special-cases</span> <span id="L403" class="LineNr">403 </span> <span class="Comment">// assume recipes with only numeric addresses know what they're doing (usually tests)</span> <span id="L404" class="LineNr">404 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!contains_non_special_name<span class="Delimiter">(</span>r<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> -<span id="L405" class="LineNr">405 </span> <a href='003trace.cc.html#L171'>trace</a><span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- check that <a href='010vm.cc.html#L19'>recipe</a> "</span> << caller<span class="Delimiter">.</span>name << <span class="Constant">" sets default-space"</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L405" class="LineNr">405 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- check that <a href='010vm.cc.html#L19'>recipe</a> "</span> << caller<span class="Delimiter">.</span>name << <span class="Constant">" sets default-space"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L406" class="LineNr">406 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L407" class="LineNr">407 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> <span id="L408" class="LineNr">408 </span> || caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name != <span class="Constant">"default-space"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L409" class="LineNr">409 </span> <a href='003trace.cc.html#L178'>raise</a> << caller<span class="Delimiter">.</span>name << <span class="Constant">" does not seem to start with default-space or local-scope</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> +<span id="L409" class="LineNr">409 </span> <a href='003trace.cc.html#L176'>raise</a> << caller<span class="Delimiter">.</span>name << <span class="Constant">" does not seem to start with default-space or local-scope</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> <span id="L410" class="LineNr">410 </span> <span class="Delimiter">}</span> <span id="L411" class="LineNr">411 </span><span class="Delimiter">}</span> <span id="L412" class="LineNr">412 </span><span class="Delimiter">:(after "Load Mu Prelude")</span> @@ -482,7 +482,7 @@ if ('onhashchange' in window) { <span id="L418" class="LineNr">418 </span> <span id="L419" class="LineNr">419 </span><span class="Delimiter">:(code)</span> <span id="L420" class="LineNr">420 </span><span class="Normal">bool</span> contains_non_special_name<span class="Delimiter">(</span><span class="Normal">const</span> <a href='010vm.cc.html#L14'>recipe_ordinal</a> r<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L421" class="LineNr">421 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<string<span class="Delimiter">,</span> <span class="Normal">int</span>>::iterator p = Name[r]<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Name[r]<span class="Delimiter">.</span><a href='003trace.cc.html#L195'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L421" class="LineNr">421 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<string<span class="Delimiter">,</span> <span class="Normal">int</span>>::iterator p = Name[r]<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Name[r]<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L422" class="LineNr">422 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L423" class="LineNr">423 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">.</span>find<span class="Delimiter">(</span><span class="Constant">"stash_"</span><span class="Delimiter">)</span> == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// generated by rewrite_stashes_to_text (cross-layer)</span> <span id="L424" class="LineNr">424 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_special_name<span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">))</span> |